netpump is a tiny network daemon written in Ruby. It creates a websocket tunnel to forward traffic from your local machine to a remote HTTPS proxy server.
Install Ruby
macOS. Ruby is already pre-installed.
Linux. You've got this.
Windows. There are several installation options.
Option A. Use the Windows Package Manager CLI. Open PowerShell and run:
> winget install RubyInstallerTeam.RubyWithDevKit.3.4
To uninstall:
> winget uninstall RubyInstallerTeam.RubyWithDevKit.3.4
Option B. Go to rubyinstaller.org and install Ruby+Devkit version 2.5 or higher.
If you are getting the runtime error "Encryption is not available on this event-machine", then you need build EventMachine with SSL.
Install OpenSSL:
> winget install ShiningLight.OpenSSL.Dev
Install EventMachine:
> gem install eventmachine -- \ --with-ssl-dir='C:\Program Files\OpenSSL-XXX-YYY'
Install netpump
Execute the following in Terminal or PowerShell:
$ gem install -u netpump
To uninstall:
$ gem uninstall -ax netpump
netpump can operate as a client, a server, or both. The client supports two modes with different use cases.
In this mode, the client establishes a direct websocket tunnel to a remote netpump server, which acts as a proxy server.
Purpose: A private proxy server. Since the client and server communicate over the websocket protocol, you can run your own netpump server on any web platform that supports websockets, including Hеrоku, Kоyеb (free), and Rеndеr (free).
netpump starts in this mode by default, but you can explicitly enable
the direct
mode with:
$ netpump -cd
That's it. Now you have a local HTTPS proxy server listening on port
3128
. It will forward all traffic to a public netpump
instance with logging disabled. You are encouraged to run your own
private server instance, which is described later in this document.
In this mode, the client connects to the server indirectly, via a web browser running on another device. Nothing needs to be installed on the device, and only a browser with websocket support is required. The browser opens pairs of websocket connections that are spliced together. One connects to the local netpump client and the other to a remote netpump server.
Purpose: In this indirect mode, netpump can reliably bypass hotspot speed and data limits. It's been successfully tested on Verizon, Visible, T-Mobile, MetroPCS, and other carriers.
Enable hotspot on your phone or tablet and connect your machine to it.
Start netpump in the browser
client mode on your local
machine:
$ netpump -cb
The client will output a URL. Open it on the phone you want to use as a proxy. Make sure that the firewall on your local machine is not blocking incoming connections.
The web browser on your phone will act as a proxy, so it must run in foreground all the time.
Once you connect your device to netpump, it will become operational by
starting a local HTTPS proxy server listening on port
3128
. You will need to route your traffic through this
proxy.
Change the proxy settings in your browser:
HTTPS
127.0.0.1
3128
To verify that it works:
$ curl -px 127.0.0.1:3128 https://netpump.org
In this mode, netpump starts a websocket server on port
10000
(default) and acts as an HTTPS proxy server.
Purpose: Run your own private netpump instance.
To start netpump in server mode:
$ netpump -s
To change the port, add the --server-port
option:
$ netpump -s --server-port $PORT
To stop netpump, press C-c.
To see all available options, use the --help
flag
There are easy ways to run your own instance of netpump server.
Deploying to Rеndеr
This option is completely free, with no credit card required.
Deployment configuration is defined in rеndеr.yaml
.
Deploying to Kоyеb
This option is completely free, with no credit card required.
If the repository URL isn't populated, enter it manually.
Deploy to KоyеbDeploying to Hеrоku
Students can get one year of free service.
Deployment configuration is defined in app.json
.
To use your new server, specify its address using the
--server-url
option:
$ netpump -cd --server-url wss://your-private-netpump
If you run into connectivity issues, the following tips may help.
Try closing all other browser tabs on your proxy device. You might be exceeding the global websocket limit.
Connection speed may be slow due to network congestion rather than artificial throttling. If you wait, the speed might improve.
To narrow down the issue, try switching from browser
to
direct
mode on your local machine, cutting your proxy
device from the traffic flow.
Check that your netpump server is up:
$ curl -i https://<your-netpump>/healthcheck ... OK
Manually send a proxy request to your netpump server.
You will need wscat2
for this:
$ npm install -g wscat2
Connect and send the request:
$ wscat -b wss://<your-netpump>/ws/rem/relay > CONNECT netpump.org:80 HTTP/1.1 < HTTP/1.1 200 Connection established > GET / HTTP/1.1 > Host: netpump.org < HTTP/1.1 200 OK < ...
Check the logs:
MIT
Any feedback is welcome: [email protected]