Closed purkylin closed 6 years ago
Right now SwiftNIO does not have special hooks for relaying data from one channel to another. However, such a thing is fairly trivial to write for HTTP.
Note that even with an appropriate relay handler, you'll still need a SOCKS server handler, which NIO does not currently ship either.
Thanks. Any plan to support it or is’t possible without modify the code of nio
Both of these things can absolutely be written without modifying the NIO code. SOCKS is a fairly straightforward proxy protocol that can be written as a single ChannelHandler, and the relay code is also fairly straightforward. Both of these things may eventually end up in swift-nio-extras, but they are low-priority so unless the community contributes them I recommend building them yourself.
+1... this sounds like something for swift-nio-extras
contributed by the community :)
/me looks up the relevant RFCs…
I want to implement a socks proxy and I have look Netty source code. But I don't know how to forward/repay request like Netty, can someone give me some tips?