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 15:19:00 +0100

On Sun, Jan 06, 2008 at 01:57:29PM +0100, Daniel Stenberg wrote:
> Ooops. Yes it was committed but it wasn't good enough! I committed your
> two corrections and I found an additional one myself. Please try again!

OK - I tried HTTP via tor and it works now with --socks5-hostname! :-)

I didn't try FTP, but below is another fix, and a mini comment change.

Ah, when I prepared my SOCKS 4a patch, I wasn't aware that the proxy type
is available in conn->data->set.proxytype - maybe I should eliminate the
protocol4a parameter of Curl_SOCKS4()...

Cheers,

  Richard

-- 
  __   _
  |_) /|  Richard Atterer     |  GnuPG key: 888354F7
  | \/¯|  http://atterer.net  |  08A9 7B7D 3D13 3EF2 3D25  D157 79E6 F6DC 8883 54F7
  ¯ '` ¯
? socks4a-ra080102.patch
Index: lib/ftp.c
===================================================================
RCS file: /cvsroot/curl/curl/lib/ftp.c,v
retrieving revision 1.460
diff -u -r1.460 ftp.c
--- lib/ftp.c	6 Jan 2008 12:56:34 -0000	1.460
+++ lib/ftp.c	6 Jan 2008 14:13:19 -0000
@@ -1882,6 +1882,7 @@
 
   switch(data->set.proxytype) {
   case CURLPROXY_SOCKS5:
+  case CURLPROXY_SOCKS5_HOSTNAME:
     result = Curl_SOCKS5(conn->proxyuser, conn->proxypasswd, newhost, newport,
                          SECONDARYSOCKET, conn);
     break;
Index: lib/url.c
===================================================================
RCS file: /cvsroot/curl/curl/lib/url.c,v
retrieving revision 1.689
diff -u -r1.689 url.c
--- lib/url.c	6 Jan 2008 12:54:16 -0000	1.689
+++ lib/url.c	6 Jan 2008 14:13:22 -0000
@@ -1868,7 +1868,7 @@
 
   case CURLOPT_PROXYTYPE:
     /*
-     * Set proxy type. HTTP/SOCKS4/SOCKS4a/SOCKS5
+     * Set proxy type. HTTP/SOCKS4/SOCKS4a/SOCKS5/SOCKS5_HOSTNAME
      */
     data->set.proxytype = (curl_proxytype)va_arg(param, long);
     break;
Received on 2008-01-06