It's a simple NGROK alternative.
This repository contains two apps that can make a proxy between localhost and a domain on your server. All communication is via the WebSocket. The client app connects to the server application through the WebSocket.
Functionality:
- HTTP requests
- WebSocket (is not supported)
Requirements
- Node.js Platform
+19
- Total.js v5 framework
$ npm install total5
The server app must be hosted on your server and must be available via HTTP protocol because the client will connect to it via WebSocket. This app is a standard Total.js web app.
Installation:
- install Node.js Platform
- install dependencies (only Total.js v5):
cd server
npm install
npm start
# or run it via: node index.js
The client app connects to the proxy server app. After the client connects, the server will "redirect" all HTTP requests to your local port.
-
Install Node.js Platform
-
Install Total.js v5 globally:
npm install -g total5
To start the proxy client, use the following command:
total5 proxyclient SERVER_ENDPOINT LOCAL_PORT
For example:
total5 proxyclient https://localhost.zapwize.com 8000
This will connect to the proxy server and forward all HTTP requests to your local port 8000.
If you prefer to install dependencies locally and run the script manually:
# Clone this repository and follow the steps below
cd client
npm install
node client.js SERVER_ENDPOINT LOCAL_PORT
# or
node client.js SERVER_ENDPOINT LOCAL_HOST:LOCAL_PORT
Example:
node client.js http://yourserverproxy.com 8000
# or
node client.js http://yourserverproxy.com 127.0.0.1:8000