hyper-util icon indicating copy to clipboard operation
hyper-util copied to clipboard

feat(client): add `proxy::Socks` legacy util

Open JPDye opened this issue 8 months ago • 1 comments

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.

JPDye avatar Mar 09 '25 18:03 JPDye

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.

seanmonstar avatar Mar 21 '25 20:03 seanmonstar

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.

seanmonstar avatar Apr 15 '25 16:04 seanmonstar

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.

JPDye avatar Apr 15 '25 17:04 JPDye

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...

seanmonstar avatar Apr 18 '25 16:04 seanmonstar