$ ssh -R 2000:localhost:8080 localhost.run
The authenticity of host 'localhost.run (35.171.254.69)' can't be established.
RSA key fingerprint is SHA256:FV8IMJ4IYjYUTnd6on7PqbRjaZf4c1EhhEBgeUdE94I.
Are you sure you want to continue connecting (yes/no/[fingerprint])?
Make it so it prints the url without more input, so it can be called from scripts easily. Like this
Port 2000 is not allowed. Only port 80 and 443 are allowed.
I didn't see easily that it's the 8080 I should change.
3. Can you make it so someone can control my xterm? This could be a useful (and dangerous, but also useful) feature. Check out https://github.com/paradoxxxzero/butterfly
Thanks for trying it and for such a detailed response!
That host check prompt is a SSH security feature, it will only ask you the first time to accept the key and after that it will only check that the key hasn't changed, to verify no one is impersonating my ssh server, and allow you in without a prompt if it is ok. It's kind of like how your browser expects a valid certificate signed by a certificate authority when visiting https sites, but without the certificate authority.
In most cases accepting the first time means you will never be asked again. Certainly the check can be skipped as you described tho if preferred tho.
for port 2000 try this:
ssh -R 80:localhost:2000 localhost.run
The first port number needs to either be 80 or 443, and for most people 80 is the port they will use. the second port number is the port your local app runs on. https://localhost.run/docs/http-tunnels explains what 80 does and https://localhost.run/docs/tls-passthru-tunnels 443, but 443 is for very specific use cases.
Butterfly looks awesome! If i'm understanding what you're after you want to be able to run butterfly locally and give someone else an internet URL to connect to your butterfly server, right? I'm not clear on how authentication in butterfly works, I'd need to read more, but certainly you could do client x509 authentication with a TLS passthru tunnel (that's the 443 advanced use case I mentioned), altho I'm not sure if someone like letsencrypt does client certs, so you might need to live with a certificate warning in your browser unless you can get a CA signed client/server cert. Maybe butterfly allows other authn/authz methods tho, like username/password over http, in which case you could use a normal http tunnel and connect it to the internet. If I get a chance to try it I'll reply back, and you get it working before me pls let me know!
Now I want something more. I want to be able to run localhost.run locally and give someone else an internet URL to connect to my local xterm, or to my local X display (vnc?). I want them to see my text editor and type stuff in it.
I wrote localhost.run to help me quickly and easily work on webhooks and collaborate on web apps.
It uses the SSH protocol, the 3 main operating systems already have clients installed for this, which means you can use it without signup or even a download to instantly to share something running on localhost.
If you want to try it now, start a webapp, it can be a react frontend, nodejs, python's flask, ror, anything, listening on port 3000 and run "ssh -R 80:localhost:3000 nokey@localhost.run" on the command line.
I'm most often using this for reactjs apps which listen on port 3000 by default but you can change the port 3000 in that command line to any local port.
I've been lurking on HN for years and I've found many awesome products on show HN with some great feedback given in the comments, so I'm now hoping that you can also let me know what you think about my product, maybe features you'd like to see, maybe even someone wants to know more about the SSH protocol and what else it can do.
I like the idea that this does not require a download or account setup. It is not clear from your documentation how the url that I get will look like after I run the command -
```ssh -R 80:localhost:8080 localhost.run```
I think it would be good to make that clear. For example, I currently use https://ngrok.io whenever I need to make an app running on my localhost available over the web and it gives you something like - https://XXXXX.ngrok.io
i'll make that clearer, thanks for the tip! to answer immediately tho, it's a similar shape, https://?????.localhost.run, and it is printed out when you run the command.
3. Can you make it so someone can control my xterm? This could be a useful (and dangerous, but also useful) feature. Check out https://github.com/paradoxxxzero/butterfly