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

Name resolution with SOCKS5 proxy always uses atyp=x03 also if host is numeric IP address #8216

Closed
peterpiekarski opened this issue Jan 3, 2022 · 0 comments
Assignees

Comments

@peterpiekarski
Copy link
Contributor

@peterpiekarski peterpiekarski commented Jan 3, 2022

According to https://datatracker.ietf.org/doc/html/rfc1928#section-5, for atyp=x03, the host name passed to a SOCKS5 proxy must be a fully qualified domain name, which according to my understanding does not include the IP address form of host names. IPv4 addresses shall be given with atyp=x01 and IPv6 addresses with atyp=x04

I did this

Use socks5h:// proxy settings with a proxy that implements RFC1928 very strictly.
Send "GET" request to URL that contains IP address

I expected the following

IP address is detected and parsed by libcurl and passed to SOCKS5 proxy using atyp=x01 or atyp=x04, atyp=x03 is only used for FQDN
Resource is downloaded properly.

curl/libcurl version

7.80.0

[curl -V output]
N/A (using libcurl)

operating system

Any

@bagder bagder self-assigned this Jan 3, 2022
bagder added a commit that referenced this issue Jan 3, 2022
When not resolving the address locallly (known as socks5h).

Add test 719 and 720 to verify.

Reported-by: Peter Piekarski
Fixes #8216
bagder added a commit that referenced this issue Jan 3, 2022
When not resolving the address locallly (known as socks5h).

Add test 719 and 720 to verify.

Reported-by: Peter Piekarski
Fixes #8216
@bagder bagder closed this in effd2bd Jan 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants