
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
VPN-Chainer allows you to chain multiple WireGuard VPNs together, dynamically reordering routes for improved anonymity and security. It includes auto-installation as a system service, API-based VPN rotation, and a customizable pre/post spin-up/down hook system.
Now, you can optionally test VPN speeds and select the fastest VPNs using --fastest
.
📦 Available on PyPI - Install easily with pip install vpn-chainer
✅ Multi-Hop VPN Chaining – Connect through multiple WireGuard VPNs in random order.
✅ Speed-Tested VPN Selection – Use --fastest
to pick the top VPNs based on download speed.
✅ Automatic Routing & Firewall Rules – Seamless packet forwarding between VPN interfaces.
✅ Pre/Post Execution Hooks – Run custom scripts before and after VPN chain events.
✅ Remote API Support – Securely rotate VPNs via a web API.
✅ Auto-Installation as a Systemd Service – Persistently run VPN-Chainer in the background.
Ensure you have Python 3 and WireGuard installed:
sudo apt update
sudo apt install -y python3 python3-pip wireguard
Easy installation via pip:
sudo pip install vpn-chainer
If you prefer to install from source:
git clone https://github.com/a904guy/VPN-Chainer.git
cd VPN-Chainer
sudo python3 setup.py install
After installation, you can immediately start using VPN-Chainer:
# Install the package
sudo pip install vpn-chainer
# Set up your WireGuard configs in /etc/wireguard/
# Then run with 2 VPNs
sudo vpn-chainer 2
# Or use the fastest VPNs
sudo vpn-chainer 3 --fastest
sudo vpn-chainer <number_of_vpns>
For example, to create a 3-hop VPN chain:
sudo vpn-chainer 3
To test all VPNs first and pick the top N fastest VPNs, use --fastest
:
sudo vpn-chainer 3 --fastest
🚀 This will:
/etc/wireguard/
Automatically install and enable the VPN-Chainer service:
sudo vpn-chainer 3 --auto-install
Once installed, it will start automatically on boot.
To stop or restart the service:
sudo systemctl stop vpn-chainer
sudo systemctl restart vpn-chainer
To view logs:
sudo journalctl -u vpn-chainer -f
VPN-Chainer provides an API to trigger VPN rotations. The API key is displayed on startup:
[INFO] VPN-Chainer API running at:
🔗 http://127.0.0.1:5000/rotate_vpn?key=6a1f-45e9...
To rotate VPNs:
curl -X GET "http://127.0.0.1:5000/rotate_vpn?key=YOUR_API_KEY"
This will:
--fastest
).VPN-Chainer allows you to run scripts before and after VPN activation/deactivation.
Scripts should be placed in:
/etc/vpn-chainer/hooks/
Hook Script Name | Triggered When |
---|---|
pre-spin-up.sh | Before the VPN chain starts |
post-spin-up.sh | After the VPN chain is established |
pre-spin-down.sh | Before VPNs are torn down |
post-spin-down.sh | After all VPNs have shut down |
Edit /etc/vpn-chainer/hooks/post-spin-up.sh
:
# !/bin/bash
echo "[HOOK] Restarting Tor for anonymity..."
systemctl restart tor
Then enable the hook:
chmod +x /etc/vpn-chainer/hooks/post-spin-up.sh
VPN-Chainer automatically selects random WireGuard config files from:
/etc/wireguard/*.conf
Ensure that at least the number of VPN configs requested exists. Additionally the Address line is required.
Example VPN config:
[Interface]
PrivateKey = <YOUR_PRIVATE_KEY>
Address = 10.13.36.109/24
DNS = 10.8.0.1
[Peer]
PublicKey = <PEER_PUBLIC_KEY>
Endpoint = 10.10.10.24:51820
AllowedIPs = 0.0.0.0/0
PersistentKeepalive = 25
which wg
If missing, install it:
sudo apt install wireguard
/etc/wireguard/
.sudo systemctl status vpn-chainer
sudo systemctl restart vpn-chainer
sudo systemctl status vpn-chainer
5000
must be open):sudo ufw allow 5000/tcp
✔️ Multi-Hop Randomization
✔️ Pre/Post Execution Hooks
✔️ Auto-Install as a Systemd Service
✔️ Speed-Tested VPN Selection (--fastest
) (Added in v1.1)
🔜 Web Dashboard for Control & Logs
🔜 VPN Failover Detection ❓❓
🔜 Split-Tunneling (Selective Routing) ❓❓
🔜 Submit Your Ideas Via Issues
Want to improve VPN-Chainer? Contributions are welcome! Fork the repository and submit a PR.
Fork & Clone
git clone https://github.com/a904guy/VPN-Chainer.git
cd vpn-chainer
Make Changes & Test
sudo python3 vpn-chainer.py 3
Submit a Pull Request
This project is licensed under the MIT License.
💡 Created by Andy Hawkins
🌐 GitHub: a904guy GitHub Profile
🚀 VPN-Chainer is your ultimate tool for anonymous, multi-hop VPN tunneling! 🔥 💬 Have questions or feature requests? Open an Issue on GitHub! 😎
FAQs
A tool to chain multiple WireGuard VPNs and rotate them dynamically via API
We found that vpn-chainer demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.