diff options
author | Jay Satiro <raysatiro@yahoo.com> | 2019-09-21 03:39:21 -0400 |
---|---|---|
committer | Jay Satiro <raysatiro@yahoo.com> | 2019-09-21 23:45:02 -0400 |
commit | 5ee88eee6861ab1c98c03bc0b1c8f63c447c7fdc (patch) | |
tree | 1f0ab6db83db13b7cfb576d6495cc1c74ee61f2f /docs/examples/imap-delete.c | |
parent | e09749dd435e46d7c3a0a74019dcb135e2fc301c (diff) |
socks: Fix destination host shown on SOCKS5 error
Prior to this change when a server returned a socks5 connect error then
curl would parse the destination address:port from that data and show it
to the user as the destination:
curld -v --socks5 10.0.3.1:1080 http://google.com:99
* SOCKS5 communication to google.com:99
* SOCKS5 connect to IPv4 172.217.12.206 (locally resolved)
* Can't complete SOCKS5 connection to 253.127.0.0:26673. (1)
curl: (7) Can't complete SOCKS5 connection to 253.127.0.0:26673. (1)
That's incorrect because the address:port included in the connect error
is actually a bind address:port (typically unused) and not the
destination address:port. This fix changes curl to show the destination
information that curl sent to the server instead:
curld -v --socks5 10.0.3.1:1080 http://google.com:99
* SOCKS5 communication to google.com:99
* SOCKS5 connect to IPv4 172.217.7.14:99 (locally resolved)
* Can't complete SOCKS5 connection to 172.217.7.14:99. (1)
curl: (7) Can't complete SOCKS5 connection to 172.217.7.14:99. (1)
curld -v --socks5-hostname 10.0.3.1:1080 http://google.com:99
* SOCKS5 communication to google.com:99
* SOCKS5 connect to google.com:99 (remotely resolved)
* Can't complete SOCKS5 connection to google.com:99. (1)
curl: (7) Can't complete SOCKS5 connection to google.com:99. (1)
Ref: https://tools.ietf.org/html/rfc1928#section-6
Closes https://github.com/curl/curl/pull/4394
Diffstat (limited to 'docs/examples/imap-delete.c')
0 files changed, 0 insertions, 0 deletions