ggs-nodejs-proxy-server
1.1.1 • Public • Published
- Run file example.js to start the server
- Start clients
- For Node.js clients:
- File example.js you ran in step 1 includes example for Node.js proxy clients
- For Java clients:
- Make a GET request at path /clients to retrieve list of connected clients
- Make a POST request at path /start-proxy to create a proxy server, clientId must be included in request body
- Use the returned proxyPort to connect to the proxy, in this case go to localhost:10012 with your browser to connect to the proxy
- Note: a proxy client can be created multiple times with different ports
- When finish using the proxy, make a POST request at path /stop-proxy to stop TCP server and free used port
- Sample request body 1: stop all proxies of a client
- Sample request body 2: stop a proxy at a specific port of a client:
{"clientId": "device", "port": 10012}
Package Sidebar
Install
npm i ggs-nodejs-proxy-server
Weekly Downloads