cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: dns via socks5 failed?

From: Richard Atterer <richard_at_2008.atterer.net>
Date: Sun, 6 Jan 2008 13:33:11 +0100

On Sun, Jan 06, 2008 at 12:15:41PM +0100, Daniel Stenberg wrote:
> Just for the record, that's what I committed yesterday. If there are
> people around who use SOCKS5, they should now be able to test run
> SOCKS5_HOSTNAME and see how that runs...

--socks4a works, --socks5-hostname doesn't for me.

Are you sure you've committed your changes? I started fixing up some things
(see below), but then realized that there doesn't seem to be any code in
socks.c for SOCKS5_HOSTNAME...

Cheers,

  Richard

-- 
  __   _
  |_) /|  Richard Atterer     |  GnuPG key: 888354F7
  | \/|  http://atterer.net  |  08A9 7B7D 3D13 3EF2 3D25  D157 79E6 F6DC 8883 54F7
   '` 
Index: src/main.c
===================================================================
RCS file: /cvsroot/curl/curl/src/main.c,v
retrieving revision 1.443
diff -u -r1.443 main.c
--- src/main.c	5 Jan 2008 22:04:18 -0000	1.443
+++ src/main.c	6 Jan 2008 12:27:52 -0000
@@ -1517,7 +1517,7 @@
     {"*z", "disable-eprt", FALSE},
     {"$a", "ftp-ssl",    FALSE},
     {"$b", "ftp-pasv",   FALSE},
-    {"$c", "socks5ip",   TRUE},
+    {"$c", "socks5",   TRUE},
     {"$c", "socks",      TRUE}, /* this is how the option once was documented
                                    but we prefer the --socks5 version for
                                    explicit version */
@@ -1547,7 +1547,7 @@
     {"$#", "raw",        FALSE},
     {"$0", "post301",    FALSE},
     {"$1", "no-keep-alive",    FALSE},
-    {"$2", "socks5",    TRUE},
+    {"$2", "socks5-hostname",    TRUE},
 
     {"0", "http1.0",     FALSE},
     {"1", "tlsv1",       FALSE},
Index: lib/ftp.c
===================================================================
RCS file: /cvsroot/curl/curl/lib/ftp.c,v
retrieving revision 1.459
diff -u -r1.459 ftp.c
--- lib/ftp.c	3 Jan 2008 15:18:27 -0000	1.459
+++ lib/ftp.c	6 Jan 2008 12:27:56 -0000
@@ -1727,6 +1727,7 @@
 
           if(conn->bits.tunnel_proxy ||
              data->set.proxytype == CURLPROXY_SOCKS5 ||
+             data->set.proxytype == CURLPROXY_SOCKS5_HOSTNAME ||
              data->set.proxytype == CURLPROXY_SOCKS4 ||
              data->set.proxytype == CURLPROXY_SOCKS4A)
             /* proxy tunnel -> use other host info because ip_addr_str is the
@@ -1782,6 +1783,7 @@
             conn->ip_addr_str);
       if(conn->bits.tunnel_proxy ||
           data->set.proxytype == CURLPROXY_SOCKS5 ||
+          data->set.proxytype == CURLPROXY_SOCKS5_HOSTNAME ||
           data->set.proxytype == CURLPROXY_SOCKS4 ||
           data->set.proxytype == CURLPROXY_SOCKS4A)
         /* proxy tunnel -> use other host info because ip_addr_str is the
Received on 2008-01-06