tunnelr is one small binary. Run it as a server on a cheap VPS, run it as a client on your machine, and a public port on the VPS reaches a local port on your laptop.
A visitor hits the VPS on the public port. The server hands the connection over the tunnel to the client, which opens a TCP connection to the local port. Many connections share one WebSocket.
tunnelr server installs itself as a systemd service and survives reboots. Without server it is the client.
Cheap providers expose a couple of ports. One is the control port, the other is your public port. That is the whole requirement.
Wi-Fi drops, laptop sleeps, the client backs off and comes back. A new client for the same port takes over the old one.
tunnelr add vps … once, then plain tunnelr reopens it. Only the path to the key file is saved.
$ curl -fsSL sobanieca.github.io/tunnelr/install.sh | bash $ sudo tunnelr server -p 20185 Address: 203.0.113.10:20185 Key: kD3xW9q1mZ8pR4tY7uH2cV6bN0aS5fGj Key file: /root/.secret/tunnelr-key
$ curl -fsSL sobanieca.github.io/tunnelr/install.sh | bash $ echo kD3x… > ~/.secret/tunnelr-key $ tunnelr 203.0.113.10:20185 -p 30185:3000 203.0.113.10:30185 → localhost:3000 Ctrl+C closes it
curl -fsSL sobanieca.github.io/tunnelr/install.sh | bash
Same command on the VPS and on your machine: a single binary for Linux and macOS (x64 and arm64), no runtime needed. Debian is the tested server OS. Update it any time with tunnelr update. tunnelr --help lists every option and the small HTTP API for listing and closing ports.