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

On SOCKS5 proxy: set hostname, not always IP #1072

Merged
merged 3 commits into from
Jun 16, 2024

Conversation

jjvaca
Copy link
Contributor

@jjvaca jjvaca commented Jan 27, 2023

The library always resolves the hostname to the IP. Some SOCKS5 proxies don't allow you to specify the IP, they want to resolve the hostname themselves.

The patch sends the proxy the same specified value, IP, or hostname.

The library always resolves the hostname to the IP. Some SOCKS5 proxies don't allow you to specify the IP, they want to resolve the hostname themselves.

The patch sends the proxy the same specified value, IP, or hostname.
@jjvaca jjvaca requested a review from drieseng as a code owner January 27, 2023 12:51
@jjvaca jjvaca changed the title On SOCKS5 proxy: On SOCKS5 proxy: set hostname, not always IP Jan 27, 2023
Copy link
Collaborator

@Rob-Hague Rob-Hague left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The proxy connector code is not well tested in the library, but we can cross reference with:

the RFC https://datatracker.ietf.org/doc/html/rfc1928#section-5
the .NET implementation https://github.com/dotnet/runtime/blob/5535e31a712343a63f5d7d796cd874e563e5ac14/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/SocksHelper.cs#L176
and even our own server implementation

case 0x03: // Domain name

to see that it is obviously missing here. Thanks!

@Rob-Hague Rob-Hague merged commit 27fad71 into sshnet:develop Jun 16, 2024
1 check was pending
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.

None yet

2 participants