Skip to content
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

Support for socks5h #639

Open
ghost opened this issue Jul 6, 2023 · 4 comments
Open

Support for socks5h #639

ghost opened this issue Jul 6, 2023 · 4 comments
Labels
external Requires a fix in a dependency outside our control

Comments

@ghost
Copy link

ghost commented Jul 6, 2023

It would be nice if there was support for socks5h proxying. The h in the scheme ensures that DNS resolution is done by the remote server that's being proxied into.

https://github.com/algesten/ureq/blob/main/src/proxy.rs#L98 - passing socks5h currently does not appear to be supported.

@algesten
Copy link
Owner

Sounds good. I know very little about proxies. PR welcome!

@algesten
Copy link
Owner

This is still todo for ureq 3.x . Help wanted.

@algesten algesten added the help wanted Extra attention is needed label Nov 26, 2024
@algesten
Copy link
Owner

algesten commented Jan 4, 2025

This depends on sfackler/rust-socks#21

@algesten algesten added external Requires a fix in a dependency outside our control and removed help wanted Extra attention is needed labels Jan 4, 2025
@harmless-tech
Copy link
Contributor

harmless-tech commented Feb 8, 2025

sfackler/rust-socks does seem to support socks5h proxying already. If you pass a domain and port for target_addr for Socks5Stream::connect or Socks4Stream::connect at src/unversioned/transport/socks.rs#L156 it will be passed to the proxy server to do the DNS resolution.

The implementation for socks4a is probably wrong too since ureq resolves the domain name on the host instead of sending it forward to the proxy server to do the DNS lookup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external Requires a fix in a dependency outside our control
Projects
None yet
Development

No branches or pull requests

2 participants