MisterTea / EternalTerminal

Re-Connectable secure remote shell
https://mistertea.github.io/EternalTerminal/
Apache License 2.0
3k stars 171 forks source link

Add support for ssh -D / DynamicForward #657

Open devnoname120 opened 3 weeks ago

devnoname120 commented 3 weeks ago

The -D option is an amazing feature of SSH that seamlessly creates a dynamic SOCKS proxy over SSH. It allows you to proxy your network traffic through an SSH connection, forwarding requests like a local proxy server. This is commonly used for securely routing network traffic through a remote machine, making it appear as though the traffic originates from that machine.

Here is an example:

ssh -D 1080 myvps

or the equivalent:

ssh -o DynamicForward=1080 myvps

And then you can easily configure your browser or your operating system to use this as a proxy:

image

This is extremely simple and doesn't require to install any VPN or firewall rules because everything it's a standard SSH feature and everything is tunneled through SSH like normally.

Why eternalterminal?

ssh -D is used for long-lived connections: you configure the proxy in e.g. your browser and you want it to run reliably even when you switch networks, or have internet hiccups, etc. Adding support in eternalterminal would perfectly complement this use case because long-lived resilient connections is where et shines the best!

I tried to run et --ssh-option DynamicForward=1080 myvps but unfortunately it doesn't work (connections to localhost:1080 are refused so I don't think that it actually listens to the port).