A rotating-IP VPN that routes your traffic through a pool of free SOCKS5 proxies and changes your public IP every N minutes. No paid APIs, no subscriptions.
ββββββββββββββββββββββββββββ
Your browser βββΆ tun0 βββΆ β iptables REDIRECT β
β β TCP :80/443 β :12345 β
β β UDP :53 β :5353 β
β ββββββββββββββ¬ββββββββββββββ
β β
β βββββββββββββββββββββββββββββββΌββββββββββββββββββ
β β TransProxy (:12345) β
β β TCP through SOCKS5 proxy pool β
β βββββββββββββββββββββββββββββββ¬ββββββββββββββββββ
β β
β βββββββββββββββββββββββββββββββΌββββββββββββββββββ
β β DnsProxy (:5353) β
β β DNS over TCP through SOCKS5 β 1.1.1.1 β
β βββββββββββββββββββββββββββββββββββββββββββββββββ
β
β ββββββββββββββββββββββββββββββββ
ββββββββββββββββ SOCKS5 proxy pool β
β (rotates every N s) β
β proxy1 βββΆ internet (IP 1) β
β proxy2 βββΆ internet (IP 2) β
β proxy3 βββΆ internet (IP 3) β
ββββββββββββββββββββββββββββββββ
Three modes:
- TUN mode (Linux) β system-wide VPN using
tun+iptables. All TCP traffic goes through the proxy automatically. DNS queries are forwarded through the proxy via a local DNS forwarder to prevent leaks. - Wintun mode (Windows) β system-wide VPN using Wintun TAP adapter. Routes all TCP traffic through the SOCKS5 proxy pool. DNS forwarded through the tunnel.
- SOCKS mode (Linux, macOS, Windows) β local SOCKS5 proxy on
127.0.0.1:10800. Configure your apps or system proxy to use it.
cd GhostVPN
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
# Interactive menu (recommended)
sudo .venv/bin/python3 vpn.py
# CLI mode (for scripts)
sudo .venv/bin/python3 vpn.py --cli --interval 30The interactive menu starts the VPN from option [1]. Configure settings via option [2].
cd GhostVPN
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
# Interactive menu (no root needed)
python3 vpn.py
# Or use settings β enable system proxy, or run directly:
python3 vpn.py --cli --mode socks --sys-proxyConfigure your browser to use SOCKS5 127.0.0.1:10800, or let GhostVPN set the system proxy automatically.
cd GhostVPN
python -m venv .venv
.venv\Scripts\activate
pip install -r requirements.txt
# Interactive menu (no admin needed, Wintun auto-downloaded)
python vpn.py
# CLI mode
python vpn.py --cli --mode windowsRun python vpn.py to see:
________ ______ ____________ ______ _ __
/ ____/ / / / __ \/ ___/_ __/ | / / __ \/ | / /
/ / __/ /_/ / / / /\__ \ / / | | / / /_/ / || /
/ /_/ / __ / /_/ /___/ // / | |/ / ____/ /| /
\____/_/ /_/\____//____//_/ |___/_/ /_/ |_/
π» ROTATING IP VPN π»
MAIN MENU
[1] βΆ START VPN (TUN (Linux) / Wintun (Windows))
interval=180s port=10800
[2] Settings
[3] About
[4] Exit
ββ Choice:
- [1] β starts the VPN with current settings
- [2] β configure mode, interval, port, proxy source, system proxy, kill switch
- [3] β version, license, repo link
- [4] β exit
python vpn.py --cli [options]
| Flag | Default | Description |
|---|---|---|
--mode |
tun (Linux), windows (Win), socks (else) |
tun = system VPN (Linux), windows = Wintun VPN (Windows), socks = local proxy |
--interval |
180 |
Seconds between IP rotations |
--proxies |
β |
Path to custom proxy list (host:port per line) |
--proxy-port |
10800 |
Local SOCKS proxy port (socks mode) |
--sys-proxy |
off |
Automatically set system proxy (macOS/Windows) |
--kill-switch |
off |
Drop connections if all proxies fail (no IP leak) |
--verbose |
off |
Debug-level logs |
python vpn.py --cli --mode socks --proxies proxies.txt| Feature | Linux (TUN) | macOS (SOCKS) | Windows (Wintun) |
|---|---|---|---|
| System-wide routing | β Automatic | β Automatic | |
| Root required | β Yes | β No | β No |
| Proxy rotation | β | β | β |
| Kill switch | β
--kill-switch |
β | β |
| DNS leak protection | β Built-in | β Built-in | |
| Auto system proxy | β | β
--sys-proxy |
β |
| UDP/ICMP | β Not supported | β Not supported | β Not supported |
watch -n 10 curl -s ifconfig.meGhostVPN has the following security features enabled:
- Private vulnerability reporting β report issues privately at https://github.com/20player11/GhostVPN/security/advisories
- Dependabot alerts β automatic notifications for vulnerable dependencies
- Dependabot security fixes β auto-generated PRs for patched dependencies
- CodeQL code scanning β runs on every push/PR via GitHub Actions
- SECURITY.md β disclosure policy with 24h/7d/30d response timeline
- Encryption β GhostVPN does not encrypt traffic end-to-end. SOCKS5 proxies see plaintext data. Use HTTPS/TLS for sensitive traffic.
- Privilege separation β The VPN runs in a single process. No sandboxing or seccomp is applied.
- DNS β DNS queries are redirected through the VPN via the built-in DNS proxy (
dns.py). No more DNS leaks. - IPv6 β IPv6 traffic is blocked in TUN mode to prevent leaks. SOCKS mode only handles IPv4.
vpn/
βββ vpn.py # CLI entry β interactive menu or --cli mode
βββ ui.py # Rich terminal UI (menus, status display, about)
βββ windows_vpn.py # Windows Wintun adapter, TCP forwarding, DNS tunnel
βββ wintun_dl.py # Auto-downloads wintun.dll at runtime
βββ tun.py # Linux TUN device, routing, iptables
βββ transproxy.py # Linux transparent TCP β SOCKS5 proxy
βββ local_proxy.py # Cross-platform SOCKS5 proxy server
βββ proxy_pool.py # Auto-fetch, health-check, rotation
βββ dns.py # DNS forwarder (prevents DNS leaks in TUN mode)
βββ utils.py # Logging, IP lookup, helpers
βββ requirements.txt # PySocks, pyfiglet, rich, questionary
βββ LICENSE # MIT
βββ README.md
sudo modprobe tunApprove Terminal in System Settings β Privacy & Security β Accessibility.
Proxy lists change. Try again later or use --proxies with your own list.
sudo iptables -t nat -F OUTPUT
sudo ip rule del pref 20000 2>/dev/null
sudo ip rule del pref 1000 2>/dev/null
sudo ip link del tun0 2>/dev/null- PySocks β SOCKS5 client protocol
- pyfiglet β ASCII art generation
- rich β Terminal UI components
- questionary β Interactive prompts
MIT