New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@gigasource/nodejs-proxy-server

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gigasource/nodejs-proxy-server

1. Run file example.js to start the server 2. 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://gith

  • 1.1.0
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

How to use

  1. Run file example.js to start the server
  2. 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
  1. Make a GET request at path /clients to retrieve list of connected clients
  2. 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
  1. 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}

FAQs

Package last updated on 27 May 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc