-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
-4
option doesn't work when using --proxy
option
#11949
Comments
The Example:
Will make sure to connect to You could very well do Ipv4 to the proxy and send and IPv6 address to it (like you ask for) or send an IPv4 address to the proxy when speaking IPv6 with it. curl actually has no option for forcing the IP version of the address for the remote name to get passed to the socks proxy. |
I didn't know that. That's tricky and not something I'd expect. Also, see the doc: "This option tells curl to use IPv4 addresses only when resolving host names, and not for example try IPv6." |
A key property of curl is to have different options for different actions and not chain them, so that you can mix and match at your own choice. |
Thinking further, I think it is reasonable to apply the IP selection also on this resolve to do what is more likely asked for. A future improvement could be to introduce a more fine-grained selection. |
I did this
I expected the following
I want it not to resolve IPv6.
curl/libcurl version
curl 7.81.0 (x86_64-pc-linux-gnu) libcurl/7.81.0 OpenSSL/3.0.2 zlib/1.2.11 brotli/1.0.9 zstd/1.4.8 libidn2/2.3.2 libpsl/0.21.0 (+libidn2/2.3.2) libssh/0.9.6/openssl/zlib nghttp2/1.43.0 librtmp/2.3 OpenLDAP/2.5.16
Release-Date: 2022-01-05
Protocols: dict file ftp ftps gopher gophers http https imap imaps ldap ldaps mqtt pop3 pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: alt-svc AsynchDNS brotli GSS-API HSTS HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM NTLM_WB PSL SPNEGO SSL TLS-SRP UnixSockets zstd
operating system
Ubuntu 22.04
Linux integral2 6.6.0-rc2-af-home-2023-09-22-g7c039646b886 #1 SMP PREEMPT_DYNAMIC Thu Sep 21 22:16:01 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
The text was updated successfully, but these errors were encountered: