Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for reverse connections #41

Open
siepkes opened this issue Dec 16, 2023 · 3 comments
Open

Support for reverse connections #41

siepkes opened this issue Dec 16, 2023 · 3 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@siepkes
Copy link

siepkes commented Dec 16, 2023

First of all let me say this seems like a really interesting project!

One thing I think it could also be useful for is remote access to IoT devices. IoT devices often sit behind a NAT and only have outbound HTTP access. Granted, sometimes they might not even have outbound HTTP/3 access due to UDP restrictions but I think those days are numbered and those cases are limited. These devices sometimes also have laggy Internet connections over 2G (for which SSH3 seems like a good fit). Therefore it would be beneficial if SSH3 supported a reverse persistent connection. Where the "client" sets up a persistent connection to a server (like for example autossh).

@francoismichel francoismichel added enhancement New feature or request help wanted Extra attention is needed labels Dec 17, 2023
@francoismichel
Copy link
Owner

Thanks for the feedback !
That would be great indeed. One "easy" way to achieve this would be to do reverse UDP port forwarding and then connect to the device using that, tunnelling the inbound connections through the UDP reverse tunnel.

I am a bit overloaded right now, so I might not implement this in the coming days but reverse port forwarding is for sure in the list of important features to implement next :-)

@ezbik
Copy link

ezbik commented Dec 17, 2023

There are numerous ways to achieve it, e.g. with the gost.run tool. You can make reverse connections (TCP / UDP ) to machines behind NAT.

@jdhozdiego
Copy link

I have been working on implementing this functionality and submitted a pull request for this (#148). In OpenSSH, the client sends a GLOBAL_REQUEST "tcpip-forward" message with information regarding reverse port forwarding, but in SSH3, it is not clear how these global messages are sent, so I used a channel request for that. More details are included in the pull request. Anyhow, I do not implement special UDP tunnels for reverse connections, relying only on the already existing SSH3 messages and channels framework.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants