socksv5
socksv5 copied to clipboard
Higher level and/or interop features?
I'm opening this issue as a place to have a discussion about what other features (besides those listed in README) would be welcome in this library.
Things that came to mind while I was working with this crate:
- Some
From
implementations forSocksV5Host
. E.g. for Ipv4Addr, Ipv6addr, &str, maybe even a blanket impl forInto<Vec<u8>>
? - A function that, given a bidirectional stream, host and port, negotiates a NOAUTH handshake and a request with a proxy on the other side of the stream.
- A function (or a whole struct?) (for tokio and maybe something else? async-std?) that would take two socket addresses and set up a stream (using the corresponding async I/O library's utilities, like
TcpStream
) that connects through the proxy at first socket to the second. Or, similarly, for BIND command, something that acts as a one-off listening TCP socket and transitions to a bidirectional stream; or, for ASSOCIATE, an object that acts as a UDP socket but uses a proxy to send and receive the datagrams.
While all of this sounds fancy to have in general, this crate is described as containing "basic building blocks". Therefore, before making any PRs, I'd like to confirm whether you want to have such things here.
Personally, I would be adding such features as part of my work on my own project (a re-proxying server), so the above ideas are what I thought could be helpful for that task. But if you have any other ideas, I'd also love to hear about them and consider implementing.