Skip to content

feat(client): add proxy::Socks legacy util #173

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from

Conversation

JPDye
Copy link
Contributor

@JPDye JPDye commented Mar 9, 2025

cc hyperium/hyper#3851
builds atop #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.

@seanmonstar
Copy link
Member

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 seanmonstar force-pushed the proxy-tunnel branch 2 times, most recently from 0a8acb7 to 6c76441 Compare April 15, 2025 16:40
@seanmonstar
Copy link
Member

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.

@JPDye
Copy link
Contributor Author

JPDye commented Apr 15, 2025

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.

@seanmonstar seanmonstar force-pushed the proxy-tunnel branch 2 times, most recently from 2ede564 to 964e1ec Compare April 18, 2025 15:40
@seanmonstar seanmonstar deleted the branch hyperium:proxy-tunnel April 18, 2025 16:14
@seanmonstar
Copy link
Member

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

@JPDye JPDye deleted the proxy-tunnel branch April 25, 2025 14:03
seanmonstar pushed a commit that referenced this pull request May 19, 2025
Adds SocksV4 and SocksV5 connectors with simple configuration for local and remote DNS. Supports SOCKSv5 user/pass authentication and allows optimistic message sending (not in RFC but supported by most servers) to reduce number of round-trips in SOCKSv5 handshake.

cc hyperium/hyper#3851,  #173

Closes hyperium/hyper#3877
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants