←back to thread

331 points willm | 4 comments | | HN request time: 0.863s | source
Show context
zokier ◴[] No.41221976[source]
Many people here mention SSH as one motivating uses for TUIs. It's a shame that we don't have standardized HTTP forwarding over SSH that would work as seamlessly as X forwarding can work.
replies(1): >>41222392 #
1. f1refly ◴[] No.41222392[source]
We have -L though, isn't that kind of what you're looking for?
replies(1): >>41222901 #
2. zokier ◴[] No.41222901[source]
Common ssh (port) forwarding has lots of shortcomings that make it far less practical than X forwarding for this sort of use.

Sketching out this idea, what I'd want is that ssh would set some standardized env var pointing to unix socket (analogous to $DISPLAY), and applications when starting up should pick that up. That should trigger applications to start listening on another unix socket (instead of tcp port), and notify ssh through the socket pointed by the env var. Upon that notification, ssh should set up new tunnel and open new browser window pointing to the tunnel.

Nothing about that is technically particularly difficult (I'd say its almost trivial), but it'd need standardization to be truly useful.

replies(1): >>41225946 #
3. SoftTalker ◴[] No.41225946[source]
> Common ssh (port) forwarding has lots of shortcomings

What are the shortcomings? It always works very well when I use it.

replies(1): >>41226179 #
4. zokier ◴[] No.41226179{3}[source]
Biggest problem is that manually adding/removing forwards in a session is a hassle. There is no standard way to communicate (to user or to ssh client) that application wants something forwarded. Finally tcp sockets do not have any sort of access control, which is problem especially on server-side.

Smaller problem is that because the applications all appear as localhost you lose some of the compartmentalization that browsers have, so different applications might end up seeing each others cookies/localstorage/cache/etc.