mirror of
https://github.com/masterking32/MasterHttpRelayVPN.git
synced 2026-05-17 21:24:37 +03:00
refactor: simplify setup script and update deployment documentation
This commit is contained in:
@@ -1,31 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
# =============================================================================
|
||||
# MasterHttpRelayVPN — VPS Exit Node Installer (Linux only)
|
||||
# =============================================================================
|
||||
# Installs and configures the vps_exit_node.py relay server as a systemd
|
||||
# service on a fresh Linux VPS.
|
||||
#
|
||||
# One-command install (fetches everything from GitHub automatically):
|
||||
# curl -fsSL https://raw.githubusercontent.com/masterking32/MasterHttpRelayVPN/python_testing/apps_script/setup_vps_exit_node.sh | sudo bash
|
||||
#
|
||||
# or with wget:
|
||||
# wget -qO- https://raw.githubusercontent.com/masterking32/MasterHttpRelayVPN/python_testing/apps_script/setup_vps_exit_node.sh | sudo bash
|
||||
#
|
||||
# What this script does:
|
||||
# 1. Verifies the OS is Linux (aborts otherwise)
|
||||
# 2. Downloads vps_exit_node.py from GitHub
|
||||
# 3. Installs Python 3 if not present
|
||||
# 4. Creates /opt/exit-node/ and copies vps_exit_node.py there
|
||||
# 5. Prompts for a PSK (or generates one automatically)
|
||||
# 6. Prompts for the listen port (default: 8181)
|
||||
# 7. Writes /etc/exit-node.env (holds EXIT_NODE_PSK — readable by root only)
|
||||
# 8. Installs a systemd service that auto-starts on boot
|
||||
# 9. Opens the chosen port in ufw / firewalld if either tool is present
|
||||
# 10. Prints the final config snippet to paste into config.json
|
||||
#
|
||||
# Usage (run as root or with sudo):
|
||||
# bash setup_vps_exit_node.sh
|
||||
#
|
||||
# MasterHttpRelayVPN — VPS Exit Node Installer
|
||||
# =============================================================================
|
||||
|
||||
set -euo pipefail
|
||||
@@ -252,5 +227,3 @@ cat <<JSON
|
||||
}
|
||||
JSON
|
||||
echo -e "${NC}"
|
||||
warn "For production: put nginx/Caddy in front and use HTTPS."
|
||||
warn "Replace the IP with your domain name if you have one."
|
||||
|
||||
@@ -75,7 +75,6 @@ Source files:
|
||||
Requirements:
|
||||
- A **Linux** VPS (Ubuntu / Debian / CentOS / Fedora / Arch — any systemd distro).
|
||||
- Python 3.10 or later (the installer will install it automatically if absent).
|
||||
- A public IP address or domain name.
|
||||
- Root / sudo access.
|
||||
|
||||
### One-command install (fetches everything from GitHub)
|
||||
@@ -92,9 +91,7 @@ wget -qO- https://raw.githubusercontent.com/masterking32/MasterHttpRelayVPN/pyth
|
||||
|
||||
The script automatically downloads `vps_exit_node.py` from GitHub, so no `git clone` is needed first. It will ask for a port (default: 8181) and a PSK (auto-generates one if left blank), then install everything and print the `config.json` snippet at the end.
|
||||
|
||||
Notes:
|
||||
- The server refuses to start on non-Linux platforms.
|
||||
- Requests to loopback (`127.x.x.x`) and private LAN addresses are blocked to prevent SSRF.
|
||||
Note:
|
||||
- To rotate the PSK, edit `/etc/exit-node.env` and restart: `systemctl restart exit-node`.
|
||||
|
||||
## 7) Configure MasterHttpRelayVPN
|
||||
@@ -127,7 +124,7 @@ For your own VPS:
|
||||
"psk": "CHANGE_ME_TO_A_STRONG_SECRET",
|
||||
"mode": "full",
|
||||
"hosts": [
|
||||
"chatgpt.com",
|
||||
"example.com",
|
||||
"openai.com",
|
||||
"claude.ai",
|
||||
"anthropic.com"
|
||||
@@ -139,7 +136,7 @@ Provider values:
|
||||
- `valtown`
|
||||
- `cloudflare`
|
||||
- `deno`
|
||||
- `vps` (also accepted: `self_hosted`, `self-hosted`, `server`)
|
||||
- `vps`
|
||||
|
||||
If `mode` is `selective`, only hosts listed in `hosts` use the exit node.
|
||||
If `mode` is `full`, all relayed traffic uses the exit node.
|
||||
|
||||
Reference in New Issue
Block a user