Commit 2e42b0a2 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

Based on Maxim Perenesenko's patch, we now do SOCKS5 operations and let the

proxy do the host name resolving and only if --socks5ip (or
CURLOPT_SOCKS5_RESOLVE_LOCAL) is used we resolve the host name locally and
pass on the IP address only to the proxy.
parent fcc48509
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -6,6 +6,12 @@

                                  Changelog

Daniel S (4 Jan 2008)
- Based on Maxim Perenesenko's patch, we now do SOCKS5 operations and let the
  proxy do the host name resolving and only if --socks5ip (or
  CURLOPT_SOCKS5_RESOLVE_LOCAL) is used we resolve the host name locally and
  pass on the IP address only to the proxy.

Yang Tse (3 Jan 2008)
- Modified test harness to allow SCP, SFTP and SOCKS4 tests to run with
  OpenSSH 2.9.9, SunSSH 1.0 or later versions. SOCKS5 tests need OpenSSH
+5 −3
Original line number Diff line number Diff line
Curl and libcurl 7.17.2

 Public curl releases:         103
 Command line options:         124
 curl_easy_setopt() options:   148
 Command line options:         125
 curl_easy_setopt() options:   149
 Public functions in libcurl:  55
 Public web site mirrors:      42
 Known libcurl bindings:       36
@@ -14,6 +14,7 @@ This release includes the following changes:
 o CURLOPT_PROXY_TRANSFER_MODE was added
 o --no-keep-alive was added
 o --socks4a added (proxy type CURLPROXY_SOCKS4A for libcurl)
 o --socks5ip added (CURLOPT_SOCKS5_RESOLVE_LOCAL for libcurl)

This release includes the following bugfixes:

@@ -42,6 +43,7 @@ This release includes the following bugfixes:
 o bad connection re-use check with environment variable-activated proxy use
 o --libcurl now generates a return statement as well
 o socklen_t is no longer used in the public includes
 o SOCKS5 uses now let the proxy resolve the host names by default

This release includes the following known bugs:

@@ -63,6 +65,6 @@ advice from friends like these:
 Robin Johnson, Michal Marek, Ates Goral, Andres Garcia, Rob Crittenden,
 Emil Romanus, Alessandro Vesely, Ray Pekowski, Spacen Jasset, Andrew Moise,
 Gilles Blanc, David Wright, Vikram Saxena, Mateusz Loskot, Gary Maxwell,
 Dmitry Kurochkin, Mohun Biswas, Richard Atterer
 Dmitry Kurochkin, Mohun Biswas, Richard Atterer, Maxim Perenesenko
 
        Thanks! (and sorry if I forgot to mention someone)
+13 −2
Original line number Diff line number Diff line
@@ -1084,8 +1084,19 @@ mutually exclusive.

If this option is used several times, the last one will be used.
.IP "--socks5 <host[:port]>"
Use the specified SOCKS5 proxy. If the port number is not specified, it is
assumed at port 1080. (Added in 7.11.1)
Use the specified SOCKS5 proxy (and let the proxy resolve the host name). If
the port number is not specified, it is assumed at port 1080. (Added in
7.11.1)

This option overrides any previous use of \fI-x/--proxy\fP, as they are
mutually exclusive.

If this option is used several times, the last one will be used. (This option
was previously wrongly documented and used as --socks without the number
appended.)
.IP "--socks5ip <host[:port]>"
Use the specified SOCKS5 proxy - but resolve the host name locally. If the
port number is not specified, it is assumed at port 1080. (Added in 7.17.2)

This option overrides any previous use of \fI-x/--proxy\fP, as they are
mutually exclusive.
+9 −1
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@
.\" * $Id$
.\" **************************************************************************
.\"
.TH curl_easy_setopt 3 "30 Aug 2007" "libcurl 7.17.0" "libcurl Manual"
.TH curl_easy_setopt 3 "4 Jan 2008" "libcurl 7.17.2" "libcurl Manual"
.SH NAME
curl_easy_setopt \- set options for a curl easy handle
.SH SYNOPSIS
@@ -433,11 +433,19 @@ Pass a long with this option to set type of the proxy. Available options for
this are \fICURLPROXY_HTTP\fP, \fICURLPROXY_SOCKS4\fP (added in 7.15.2),
\fICURLPROXY_SOCKS5\fP and \fICURLPROXY_SOCKS4A\fP (added in 7.17.2). The HTTP
type is default. (Added in 7.10)

See also \fIURLOPT_SOCKS5_RESOLVE_LOCAL\fP.
.IP CURLOPT_HTTPPROXYTUNNEL
Set the parameter to non-zero to get the library to tunnel all operations
through a given HTTP proxy. There is a big difference between using a proxy
and to tunnel through it. If you don't know what this means, you probably
don't want this tunneling option.
.IP CURLOPT_SOCKS5_RESOLVE_LOCAL
Set the parameter to 1 to get the library to resolve the host name locally
instead of passing it to the proxy to resolve, when using a SOCKS5 proxy.

Note that libcurl before 7.17.2 always resolved the host name locally even
when SOCKS5 was used. (Added in 7.17.2)
.IP CURLOPT_INTERFACE
Pass a char * as parameter. This set the interface name to use as outgoing
network interface. The name can be an interface name, an IP address or a host
+5 −0
Original line number Diff line number Diff line
@@ -1172,6 +1172,11 @@ typedef enum {
  /* set transfer mode (;type=<a|i>) when doing FTP via an HTTP proxy */
  CINIT(PROXY_TRANSFER_MODE, LONG, 166),

  /* Set using of SOCKS5 to resolve host names locally instead of sending them
     to the proxy to let it resolve them. Valid only if CURLOPT_PROXYTYPE ==
     CURLPROXY_SOCKS5, otherwise ignored. */
  CINIT(SOCKS5_RESOLVE_LOCAL, LONG, 167),

  CURLOPT_LASTENTRY /* the last unused */
} CURLoption;

Loading