mhr-vps-worker is a specialized adaptation of the mhr-cfw engine that replaces Cloudflare Workers with a private VPS-based node.js worker. This is the procedure I used to test it.
In this step, you will connect to your VPS via SSH and install Node.JS and PM2 (a production-grade daemon process manager for Node.JS).
SSH into your server, substituting in your real server IP where it says YOUR_SERVER_IP:
ssh root@YOUR_SERVER_IP
Get your server up to date:
apt update && apt upgrade -y
Download and install nvm:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.4/install.sh | bash
In lieu of restarting your shell:
\. "$HOME/.nvm/nvm.sh"
Download and install Node.js:
nvm install 24
Verify the Node.js version:
node -v
It should print v24.15.0.
Verify npm version:
npm -v
It should print 11.12.1.
Install PM2:
npm install pm2 -g
Open port 8081 in your Linux firewall:
iptables -I INPUT -p tcp --dport 8081 -j ACCEPT
Persist the new rule across reboots:
dpkg reconfigure iptables-persistent
Deploy the server.js file from https://github.com/aliasoblomov/mhr-vps-worker/tree/main/node-worker, and run it:
apt install -y git
git clone https://github.com/aliasoblomov/mhr-vps-worker.git
cd mhr-vps-worker/node-worker
pm2 start server.js --name mhr-relay --node-args="--max-http-header-size=65536"
You should see a green status indicating that mhr-relay is online.
Take a snapshot of your currently running process list and save it to a file:
pm2 save
To double-check, run:
pm2 logs mhr-relay
You should see the message:
Rock-Solid Worker running on port 8081
To exit the live stream of PM2 logs in your terminal, press Ctrl+c.
Check that it is listening on port 8081:
ss -tulpn | grep 8081
Response:
tcp LISTEN 0 511 0.0.0.0:8081 0.0.0.0:* users:(("node /root/mhr-",pid=2714,fd=23))
Exit your SSH session:
exit
mhr-vps-worker.Code.gs file from this project https://github.com/aliasoblomov/mhr-vps-worker/tree/main/script (under script/), copy everything, and paste it into the Apps Script editor.STRONG_SECRET_KEY to something only you know.YOUR_VPS_IP.// Replace with your Secret const AUTH_KEY = "STRONG_SECRET_KEY"; // Replace with your VPS IP const VPS_IP = "YOUR_VPS_IP"; const WORKER_URL = "http://" + VPS_IP + ":8081";
mhr-vps-worker.Me (your Google account).Anyone.If you have not already done so, install Python for Windows from https://www.python.org/downloads.
Once the installation is complete, check that you now have Python installed:
py --version
If C:\Users\<your-windows-id>\AppData\Local\Python\pythoncore-3.14-64\Scripts does not already contain pip.exe, then download pip.exe like this:
get-pip.py script by right-clicking and Save Link As from https://bootstrap.pypa.io/get-pip.py.cd to the folder containing the get-pip.py file:py get-pip.pyWARNING: The scripts pip.exe, pip3.14.exe and pip3.exe are installed in 'C:\Users\<your-windows-id>\AppData\Local\Python\pythoncore-3.14-64\Scripts' which is not on PATH.Add pip.exe to your execution path:
env, and select Edit the system environment variables.C:\Users\<your-windows-id>\AppData\Local\Python\pythoncore-3.14-64\Scripts, replacing <your-windows-id> by your actual Windows id on your local PC.Restart your computer. After restarting, check that your path includes the Python scripts:
echo %PATH%$Env:PathCheck that you have pip installed:
pip --version
Response:
pip 26.1 from C:\Users\<your-windows-id>\AppData\Local\Python\pythoncore-3.14-64\Lib\site-packages\pip (python 3.14)
Now download the project from https://github.com/aliasoblomov/mhr-vps-worker/archive/refs/heads/main.zip.
Unzip the zip file main.zip.
Change into the unzipped folder:
cd Downloads\mhr-vps-worker-main\mhr-vps-worker-main
Open a command prompt window here. Install the requirements:
pip install -r requirements.txt
In the mhr-vps-worker-main folder, make a copy of config.example.json named config.json.
Edit the config.json file (for example with Notepad or Notepad++).
...
"script_id": "YOUR_APPS_SCRIPT_DEPLOYMENT_ID",
"auth_key": "CHANGE_ME_TO_A_STRONG_SECRET",
...
"relay_timeout": 25,
...
Make the following adjustments:
script_id. You can enter either one Deployment ID or multiple Deployment IDs separated by commas (for load balancing).relay_timeout to 60.Save the file with your changes in it.
Double-click the run.bat file to start the relay.
If necessary, click Run.
Say Yes to install the mhr-cfw root certificate.
You should see messages:
INFO [Proxy ] HTTP proxy listening on 0.0.0.0:8085
INFO [Proxy ] SOCKS5 proxy listening on 0.0.0.0:1080
A message may appear advising you to restart your browser at this stage.
Choose which proxy you prefer to use:
127.0.0.1 port 8085127.0.0.1 port 1080Also set up one of these method to direct your browser to use the proxy:
You should see your VPS IP address.