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

Problem with resolving hostname with socks5 proxy on 7.69.0 #5053

Closed
vitaha85 opened this issue Mar 6, 2020 · 3 comments
Closed

Problem with resolving hostname with socks5 proxy on 7.69.0 #5053

vitaha85 opened this issue Mar 6, 2020 · 3 comments

Comments

@vitaha85
Copy link

@vitaha85 vitaha85 commented Mar 6, 2020

Hi,
I have some problems with resolving host name

~ curl --version
curl 7.69.0 (x86_64-apple-darwin19.3.0) libcurl/7.69.0 SecureTransport zlib/1.2.11
Release-Date: 2020-03-04
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IPv6 Largefile libz NTLM NTLM_WB SSL UnixSockets

When trying to use socks5 proxy after upgrade i get :

  • Closing connection 0
    curl: (6) Couldn't resolve host name

Command: curl -x socks5://username:password@11.11.11.11:1080 https://google.com -v

if I use socks5h everything ok
Command curl -x socks5h://username:password@11.11.11.11:1080 https://google.com -v

On version 7.68.0 command curl -x socks5://username:password@11.11.11.11:1080 https://google.com -v works well

@bagder
Copy link
Member

@bagder bagder commented Mar 6, 2020

No doubt an efffect from #4907 and 4a4b63d. I'll investigate.

@bagder bagder self-assigned this Mar 6, 2020
@bagder bagder added the regression label Mar 6, 2020
bagder added a commit that referenced this issue Mar 6, 2020
Regression from 4a4b63d (and #4907)
Reported-by: vitaha85 on github
Fixes #5053
@bagder bagder closed this in 4b786ab Mar 7, 2020
@amishmm
Copy link

@amishmm amishmm commented Mar 8, 2020

Does the fix apply to socks4 proxy too?

I am using socks4 and facing similar problem after upgrading from curl 7.67.0 to 7.69

$ ssh -D 8888 -fN foo@bar.com
$ curl -v -x socks://127.0.0.1:8888 https://google.com

  • Trying 127.0.0.1:8888...
  • SOCKS4 communication to google.com:443
  • SOCKS4 non-blocking resolve of google.com
  • Closing connection 0
    curl: (6) Couldn't resolve host name

It worked fine with 7.67.0

@bagder
Copy link
Member

@bagder bagder commented Mar 8, 2020

Does the fix apply to socks4 proxy too?

It does not, as I wasn't aware of any problem there. Can you please submit this as a new issue and I'll see if it has the same bug there perhaps...

bagder added a commit that referenced this issue Mar 8, 2020
1. The socks4 state machine was broken in the host resolving phase

2. The code now insists on IPv4-only when using SOCKS4 as the protocol
only supports that.

Regression from #4907 and 4a4b63d, shipped in 7.69.0

Reported-by: amishmm on github
Bug: #5053 (comment)
bagder added a commit that referenced this issue Mar 8, 2020
1. The socks4 state machine was broken in the host resolving phase

2. The code now insists on IPv4-only when using SOCKS4 as the protocol
only supports that.

Regression from #4907 and 4a4b63d, shipped in 7.69.0

Reported-by: amishmm on github
Bug: #5053 (comment)
Closes #5061
@lock lock bot locked as resolved and limited conversation to collaborators Jun 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

3 participants
You can’t perform that action at this time.