Menu

#1218 socks5 not used properly in ftp EPSV mode with ALL_PROXY set

closed-fixed
socks proxy (2)
5
2013-06-21
2013-04-25
Zekun Ni
No

Steps to reproduce:
export ALL_PROXY=socks5://127.0.0.1:1080 (assume a SOCKS5 proxy server is there);
curl a ftp resource with no extra options;
you can see from strace that curl tries to connect to the ftp server directly but then take it as a SOCKS5 server.

A strace result is available in the attachment list. In addition, curl works fine with --socks5/--socks5-hostname option.

1 Attachments

Discussion

  • Daniel Stenberg

    Daniel Stenberg - 2013-04-25
    • summary: curl acts problematically in ftp EPSV mode with ALL_PROXY set --> socks5 not used properly in ftp EPSV mode with ALL_PROXY set
    • assigned_to: Daniel Stenberg
     
  • Daniel Stenberg

    Daniel Stenberg - 2013-04-25

    Which curl version is this?

     
    • Zekun Ni

      Zekun Ni - 2013-04-25

      $ curl -V
      curl 7.30.0 (x86_64-unknown-linux-gnu) libcurl/7.30.0 OpenSSL/1.0.1e zlib/1.2.7 libssh2/1.4.3
      Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp scp sftp smtp smtps telnet tftp
      Features: AsynchDNS IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP

       
  • Daniel Stenberg

    Daniel Stenberg - 2013-04-25

    I've written a test case now that seems to repeat it. Oddly it works if --socks5 [proxy] is used (as in test 707), but not if set in an environment variable.

    Now I'll just have to figure out why so and fix!

     
  • Daniel Stenberg

    Daniel Stenberg - 2013-04-25

    I'm attaching test711 that repeats the problem.

     
  • Daniel Stenberg

    Daniel Stenberg - 2013-04-26

    Thanks a lot for your report! I've now pushed a fix (together with 2 new test cases to help us avoid regressions), available in commit 0523152ad6e9d558. Closing this issue.

     
  • Daniel Stenberg

    Daniel Stenberg - 2013-04-26
    • status: open-confirmed --> closed-fixed