Yet another solution to expose any HTTP server to the Internet through a tunnel.
Got a server running locally on port 3000? Run ssh srv.us -R 1:localhost:3000
and it'll respond with its public HTTPS URL.
It failed with Permission denied (publickey).
? You need an ssh key; use ssh-keygen -t ed25519
.
Helps developing webhooks, testing your mobile backend, etc.
Nothing to install. No accounts. Stable URLs. Developed in the open, operated responsibly. Your data is your data, we don't even parse headers (but we will count bytes).
Setup:
$ ssh srv.us
Usage: ssh srv.us -R 1:localhost:3000 -R 2:192.168.0.1:80 …
$ ssh srv.us -R 1:localhost:3000 -R 2:192.168.0.1:80
1: https://qp556ma755ktlag5b2xyt334ae.srv.us/
2: https://z2tdoto6u3mddntra45qkm45ci.srv.us/
Test:
$ printf 'HTTP/1.1 200 OK\r\n\r\nHello!\n' | nc -l 3000 > /dev/null &
$ curl https://qp556ma755ktlag5b2xyt334ae.srv.us/
Hello!
The provided URLs are stable for a given SSH key and number (1 and 2 in examples).
The number is optional, ssh
uses the port number by default.
When there are multiple connections for a URL, load is spread across them.
There are a lot of alternatives.
As with ident.me, I hope you enjoy this simple take on a common problem.
That's it.