1.1.0 • Published 5 years ago
@gigasource/nodejs-proxy-server v1.1.0
How to use
- 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:
- Use this repository to get code for proxy client: https://github.com/gigasource/proxy-client-java
- Run file src/Example.java to start 2 clients as 2 devices with different clientId
- 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
- Sample request body:
{"clientId": "device2"}
- Sample response:
{"proxyPort": 10012}
- 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
{"clientId": "device"}
- Sample request body 2: stop a proxy at a specific port of a client:
{"clientId": "device", "port": 10012}
1.1.0
5 years ago
0.0.1-redis-adapter-experiment
5 years ago
0.0.0-redis-adapter-experiment
5 years ago
1.0.18
5 years ago
1.0.17
5 years ago
1.0.16
5 years ago
1.0.15
5 years ago
1.0.14
5 years ago
1.0.13
5 years ago
1.0.12
5 years ago
1.0.11
5 years ago
1.0.10
5 years ago
1.0.9
5 years ago
1.0.8
5 years ago
1.0.7
5 years ago
1.0.6
5 years ago
1.0.5
5 years ago
1.0.4
5 years ago
1.0.3
5 years ago
1.0.2
5 years ago
1.0.1
5 years ago
1.0.0
5 years ago