Key Information

Register
Submit
The challenge is finished.

Challenge Overview

For a particular Hercules web application, the client-side Javascript connects to a websocket on a server hosted by the client.  The actual websocket URL is dynamic and is relayed to the caller via specific calls from a root server.  

Right now, we have a problem where the root server is sending back URLs that are not publicly accessible, so the user has to be on the VPN for them to work.  To get around this, we have built a temporary proxy to do some basic redirection / proxying of websocket requests, but now we need something a bit more formal to make sure we can support arbitrary URLs in the future.  The current implementation is installed and running on an EC2 instance that has a perpetual VPN connection to the customer's infrastructure.

Requirements

General proxy:

Your deliverable must include a Node application that can proxy between a given websocket URL and a client, routing requests from the client down to a connection on the server where Node is running.

The Node application will support requests and will route the websocket connection down through the default route on the server, which will be set up to use the VPN connection.

Status page:

Your solution must include a small status page that we can use to determine if the VPN is running and the proxy is available.  This should just make a small GET request to a configurable server URL and if a 200 level request is returned, the status will be "success", otherwise it will be "failure".  The URL configured will eventually be a server that is only accessible on the customer's VPN connection.

Multiple connections

The solution must support multiple separate connections for a given client, and there may be 3-4 clients running against the instance at any one time.  Normally a client will have 3-5 websockets open at any one time.

Deploy

The deploy should be very basic - "npm install" / "npm start" would be preferable.  The target environment will be Ubuntu 14, but that shouldn't be a hard requirement - the app should run on any recent Node / Unix environment.

Documentation

No video is required for this challenge, and the deployment guide can be in a basic markdown format.  

Testing

You won't have access to the customer's VPN or environment, so you'll have to think of some way to test and validate the submission without that access.
 

Final Submission Guidelines

Please see above.

ELIGIBLE EVENTS:

2016 TopCoder(R) Open

REVIEW STYLE:

Final Review:

Community Review Board

Approval:

User Sign-Off

SHARE:

ID: 30054156