Set up an encrypted WebSocket tunnel between a server in Iran and an overseas VPS using a guided menu instead of manual config files
Register a network tunnel as a systemd service so it restarts automatically on server reboot
Generate a self-signed TLS certificate for a secure WebSocket tunnel without running OpenSSL commands manually
Back up and restore all Backhaul tunnel configurations before migrating or reinstalling a server
Requires two Linux servers with root access and systemd, the Backhaul binary is downloaded and installed automatically by the script.
BackhaulManager is a shell script that provides an interactive terminal interface for setting up and managing network tunnels built on Backhaul, an open-source tunneling tool. Rather than configuring Backhaul by hand through config files and system commands, BackhaulManager walks you through the process with a guided menu. The tool is built around a two-server model. One server sits in Iran (called the Iran role) and one sits outside the country (called the Kharej role, meaning "outside" in Persian). You run the script on each server, pick the appropriate role, and it guides you through creating a matching tunnel pair. Supported tunnel types include plain TCP, TCP multiplexing, WebSocket multiplexing, and secure WebSocket multiplexing with TLS. Once a tunnel is created, BackhaulManager registers it as a systemd service so it starts automatically on reboot and can be managed like any other system service. The management menu gives you controls to start, stop, restart, view live logs, and delete tunnel services. A built-in link test checks both ping reachability and TCP connectivity between the two servers. Additional features include automatic installation and updating of the Backhaul binary, backup and restore of tunnel configurations, and a firewall helper for UFW or iptables. For the secure WebSocket transport, the script can generate a self-signed TLS certificate with OpenSSL without requiring manual setup. The README recommends the WSSMUX transport with Preset tuning mode as the best starting point for most setups. Configuration files are stored in /etc/backhaul. Each service is named with a pattern that includes the role, transport, and port, making it straightforward to identify running tunnels. Root access and a Linux system with systemd are required.
← b3hnamr on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.