hyper-util
hyper-util copied to clipboard
feat(client): add `proxy::Socks` legacy util
cc hyperium/hyper#3851 builds atop hyperium/hyper-util#140
Adds Socks connector. Didn't pull existing crates as it's a simple enough protocol. Behaviour is there, clean up still necessary for error handling, etc...
connect() function will be refactored to enum-based state machine to make optimistic sending of messages cleaner. Optimistic sending isn't in the RFC but most existing server implementations can handle it from my testing. Worth adding for RTT reduction; will document to make clear it might not work.
Awesome work in here! I just now after looking through it realized it is a PR to my draft PR, so I probably need to fix that up.
I'm wrapping up the Tunnel PR, so I'm checking back in here. Curious what you think, would it be possible here to support both socks v4 and v5, and also local and remote dns? Just noting that's what currently exists in reqwest.
Haven't thought about this in a few weeks as been busy but yeah, that's all easily possible. I'll sort that this weekend.
Ah, didn't mean for this to be automatically closed. Guess because it targeted a branch that was auto-deleted once I merged that PR...