Skip to content

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

Closed

Description

@piekarpr

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions