pahaz / sshtunnel

SSH tunnels to remote server.
MIT License
1.23k stars 184 forks source link

Support dynamic port forwarding #251

Open crane-denny opened 2 years ago

crane-denny commented 2 years ago

I am using a socks5 proxy to tunnel some of my requests through. I would love to setup this tunnel dynamicaly within my application instead of having it running always on my computer and then not knowing that it crashed or something.

ssh -D 127.0.0.1:8080 -q -C -N -f -v -l $USERNAME $IP

Paramiko is about to support this feature: https://github.com/paramiko/paramiko/pull/1873

liuhuan72 commented 2 years ago

Good idea!!!

liuhuan72 commented 2 years ago

https://github.com/pahaz/sshtunnel/pull/93

liuhuan72 commented 2 years ago

https:// github.com /paramiko/paramiko/blob/main/demos/forward.py

https:// github.com /paramiko/paramiko/blob/main/demos/rforward.py

https:// github.com /paramiko/paramiko/blob/5cd4a085a11940436111b6b6f93aa369c9fb2a92/demos/demo_socks_proxy.py