orlandos-nl / Citadel

SSH Client & Server in Swift
MIT License
224 stars 36 forks source link

Support dynamic-tcpip port forwarding #43

Closed fsufyan closed 1 year ago

fsufyan commented 1 year ago

Hi Orlandos,

Will it be possible to introduce dynamic port forwarding aka socks proxy over ssh tunnel? The aim is to route all macOS or iOS traffic over a configured socks5 port using swift nio ssh.

Any guidance on how to implement this functionality would be very helpful.

Thanks

Joannis commented 1 year ago

SOCKS is not supported, and I'm not sure if it'll ever be. But if you're in control over the networking code that you want to proxy, you can definitely already do that with Citadel as found in the readme example, where this is done with the MongoKitten driver.

However, the SOCKS protocol is not very complicated, so you might be able to do it yourself if you dive into SwiftNIO. Alternatively, I could help you hire someone who can implement that for you.