- Daniel Egger provided a patch that allows you to disable proxy support in
libcurl to somewhat reduce the size of the binary. Run configure --disable-proxy.
This commit is contained in:
parent
8f467b4288
commit
f3ab5d5500
5
CHANGES
5
CHANGES
@ -6,6 +6,11 @@
|
|||||||
|
|
||||||
Changelog
|
Changelog
|
||||||
|
|
||||||
|
Daniel Stenberg (29 Sep 2008)
|
||||||
|
- Daniel Egger provided a patch that allows you to disable proxy support in
|
||||||
|
libcurl to somewhat reduce the size of the binary. Run configure
|
||||||
|
--disable-proxy.
|
||||||
|
|
||||||
Daniel Fandrich (29 Sep 2008)
|
Daniel Fandrich (29 Sep 2008)
|
||||||
- Moved all signal-based name resolution timeout handling into a single new
|
- Moved all signal-based name resolution timeout handling into a single new
|
||||||
Curl_resolv_timeout function to reduce coupling.
|
Curl_resolv_timeout function to reduce coupling.
|
||||||
|
@ -13,6 +13,7 @@ This release includes the following changes:
|
|||||||
o Added CURLOPT_CERTINFO and CURLINFO_CERTINFO
|
o Added CURLOPT_CERTINFO and CURLINFO_CERTINFO
|
||||||
o Added CURLOPT_POSTREDIR
|
o Added CURLOPT_POSTREDIR
|
||||||
o Better detect HTTP 1.0 servers and don't do HTTP 1.1 requests on them
|
o Better detect HTTP 1.0 servers and don't do HTTP 1.1 requests on them
|
||||||
|
o configure --disable-proxy disables proxy
|
||||||
|
|
||||||
This release includes the following bugfixes:
|
This release includes the following bugfixes:
|
||||||
|
|
||||||
@ -45,6 +46,6 @@ advice from friends like these:
|
|||||||
Keith Mok, Yang Tse, Daniel Fandrich, Guenter Knauf, Dmitriy Sergeyev,
|
Keith Mok, Yang Tse, Daniel Fandrich, Guenter Knauf, Dmitriy Sergeyev,
|
||||||
Linus Nielsen Feltzing, Martin Drasar, Stefan Krause, Dmitry Kurochkin,
|
Linus Nielsen Feltzing, Martin Drasar, Stefan Krause, Dmitry Kurochkin,
|
||||||
Mike Revi, Andres Garcia, Michael Goffioul, Markus Moeller, Rob Crittenden,
|
Mike Revi, Andres Garcia, Michael Goffioul, Markus Moeller, Rob Crittenden,
|
||||||
Jamie Lokier, Emanuele Bovisio, Maxim Ivanov, Ian Lynagh
|
Jamie Lokier, Emanuele Bovisio, Maxim Ivanov, Ian Lynagh, Daniel Egger
|
||||||
|
|
||||||
Thanks! (and sorry if I forgot to mention someone)
|
Thanks! (and sorry if I forgot to mention someone)
|
||||||
|
16
configure.ac
16
configure.ac
@ -509,6 +509,22 @@ AC_HELP_STRING([--disable-ldaps],[Disable LDAPS support]),
|
|||||||
AC_SUBST(CURL_DISABLE_LDAPS, [1])
|
AC_SUBST(CURL_DISABLE_LDAPS, [1])
|
||||||
)
|
)
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([whether to support proxiesy])
|
||||||
|
AC_ARG_ENABLE(proxy,
|
||||||
|
AC_HELP_STRING([--enable-proxy],[Enable proxy support])
|
||||||
|
AC_HELP_STRING([--disable-proxy],[Disable proxy support]),
|
||||||
|
[ case "$enableval" in
|
||||||
|
no)
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
AC_DEFINE(CURL_DISABLE_PROXY, 1, [to disable proxies])
|
||||||
|
AC_SUBST(CURL_DISABLE_PROXY, [1])
|
||||||
|
;;
|
||||||
|
*) AC_MSG_RESULT(yes)
|
||||||
|
;;
|
||||||
|
esac ],
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
)
|
||||||
|
|
||||||
AC_MSG_CHECKING([whether to support dict])
|
AC_MSG_CHECKING([whether to support dict])
|
||||||
AC_ARG_ENABLE(dict,
|
AC_ARG_ENABLE(dict,
|
||||||
AC_HELP_STRING([--enable-dict],[Enable DICT support])
|
AC_HELP_STRING([--enable-dict],[Enable DICT support])
|
||||||
|
@ -1876,14 +1876,12 @@ static CURLcode ftp_state_pasv_resp(struct connectdata *conn,
|
|||||||
ftp_pasv_verbose(conn, conninfo, newhost, connectport);
|
ftp_pasv_verbose(conn, conninfo, newhost, connectport);
|
||||||
|
|
||||||
switch(data->set.proxytype) {
|
switch(data->set.proxytype) {
|
||||||
|
#ifndef CURL_DISABLE_PROXY
|
||||||
case CURLPROXY_SOCKS5:
|
case CURLPROXY_SOCKS5:
|
||||||
case CURLPROXY_SOCKS5_HOSTNAME:
|
case CURLPROXY_SOCKS5_HOSTNAME:
|
||||||
result = Curl_SOCKS5(conn->proxyuser, conn->proxypasswd, newhost, newport,
|
result = Curl_SOCKS5(conn->proxyuser, conn->proxypasswd, newhost, newport,
|
||||||
SECONDARYSOCKET, conn);
|
SECONDARYSOCKET, conn);
|
||||||
break;
|
break;
|
||||||
case CURLPROXY_HTTP:
|
|
||||||
/* do nothing here. handled later. */
|
|
||||||
break;
|
|
||||||
case CURLPROXY_SOCKS4:
|
case CURLPROXY_SOCKS4:
|
||||||
result = Curl_SOCKS4(conn->proxyuser, newhost, newport,
|
result = Curl_SOCKS4(conn->proxyuser, newhost, newport,
|
||||||
SECONDARYSOCKET, conn, FALSE);
|
SECONDARYSOCKET, conn, FALSE);
|
||||||
@ -1892,6 +1890,10 @@ static CURLcode ftp_state_pasv_resp(struct connectdata *conn,
|
|||||||
result = Curl_SOCKS4(conn->proxyuser, newhost, newport,
|
result = Curl_SOCKS4(conn->proxyuser, newhost, newport,
|
||||||
SECONDARYSOCKET, conn, TRUE);
|
SECONDARYSOCKET, conn, TRUE);
|
||||||
break;
|
break;
|
||||||
|
#endif /* CURL_DISABLE_PROXY */
|
||||||
|
case CURLPROXY_HTTP:
|
||||||
|
/* do nothing here. handled later. */
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
failf(data, "unknown proxytype option given");
|
failf(data, "unknown proxytype option given");
|
||||||
result = CURLE_COULDNT_CONNECT;
|
result = CURLE_COULDNT_CONNECT;
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
|
|
||||||
#include "setup.h"
|
#include "setup.h"
|
||||||
|
|
||||||
|
#ifndef CURL_DISABLE_PROXY
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#ifdef NEED_MALLOC_H
|
#ifdef NEED_MALLOC_H
|
||||||
@ -686,3 +687,6 @@ CURLcode Curl_SOCKS5(const char *proxy_name,
|
|||||||
Curl_nonblock(sock, TRUE);
|
Curl_nonblock(sock, TRUE);
|
||||||
return CURLE_OK; /* Proxy was successful! */
|
return CURLE_OK; /* Proxy was successful! */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif /* CURL_DISABLE_PROXY */
|
||||||
|
|
||||||
|
13
lib/url.c
13
lib/url.c
@ -2666,17 +2666,14 @@ static CURLcode ConnectPlease(struct SessionHandle *data,
|
|||||||
result = Curl_store_ip_addr(conn);
|
result = Curl_store_ip_addr(conn);
|
||||||
|
|
||||||
if(CURLE_OK == result) {
|
if(CURLE_OK == result) {
|
||||||
|
|
||||||
switch(data->set.proxytype) {
|
switch(data->set.proxytype) {
|
||||||
|
#ifndef CURL_DISABLE_PROXY
|
||||||
case CURLPROXY_SOCKS5:
|
case CURLPROXY_SOCKS5:
|
||||||
case CURLPROXY_SOCKS5_HOSTNAME:
|
case CURLPROXY_SOCKS5_HOSTNAME:
|
||||||
result = Curl_SOCKS5(conn->proxyuser, conn->proxypasswd,
|
result = Curl_SOCKS5(conn->proxyuser, conn->proxypasswd,
|
||||||
conn->host.name, conn->remote_port,
|
conn->host.name, conn->remote_port,
|
||||||
FIRSTSOCKET, conn);
|
FIRSTSOCKET, conn);
|
||||||
break;
|
break;
|
||||||
case CURLPROXY_HTTP:
|
|
||||||
/* do nothing here. handled later. */
|
|
||||||
break;
|
|
||||||
case CURLPROXY_SOCKS4:
|
case CURLPROXY_SOCKS4:
|
||||||
result = Curl_SOCKS4(conn->proxyuser, conn->host.name,
|
result = Curl_SOCKS4(conn->proxyuser, conn->host.name,
|
||||||
conn->remote_port, FIRSTSOCKET, conn, FALSE);
|
conn->remote_port, FIRSTSOCKET, conn, FALSE);
|
||||||
@ -2685,6 +2682,10 @@ static CURLcode ConnectPlease(struct SessionHandle *data,
|
|||||||
result = Curl_SOCKS4(conn->proxyuser, conn->host.name,
|
result = Curl_SOCKS4(conn->proxyuser, conn->host.name,
|
||||||
conn->remote_port, FIRSTSOCKET, conn, TRUE);
|
conn->remote_port, FIRSTSOCKET, conn, TRUE);
|
||||||
break;
|
break;
|
||||||
|
#endif /* CURL_DISABLE_PROXY */
|
||||||
|
case CURLPROXY_HTTP:
|
||||||
|
/* do nothing here. handled later. */
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
failf(data, "unknown proxytype option given");
|
failf(data, "unknown proxytype option given");
|
||||||
result = CURLE_COULDNT_CONNECT;
|
result = CURLE_COULDNT_CONNECT;
|
||||||
@ -3237,6 +3238,7 @@ static CURLcode setup_connection_internals(struct SessionHandle *data,
|
|||||||
return CURLE_UNSUPPORTED_PROTOCOL;
|
return CURLE_UNSUPPORTED_PROTOCOL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef CURL_DISABLE_PROXY
|
||||||
/****************************************************************
|
/****************************************************************
|
||||||
* Detect what (if any) proxy to use. Remember that this selects a host
|
* Detect what (if any) proxy to use. Remember that this selects a host
|
||||||
* name and is not limited to HTTP proxies only.
|
* name and is not limited to HTTP proxies only.
|
||||||
@ -3513,6 +3515,7 @@ static CURLcode parse_proxy_auth(struct SessionHandle *data,
|
|||||||
|
|
||||||
return CURLE_OK;
|
return CURLE_OK;
|
||||||
}
|
}
|
||||||
|
#endif /* CURL_DISABLE_PROXY */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
@ -4040,6 +4043,7 @@ static CURLcode create_conn(struct SessionHandle *data,
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef CURL_DISABLE_PROXY
|
||||||
/*************************************************************
|
/*************************************************************
|
||||||
* Extract the user and password from the authentication string
|
* Extract the user and password from the authentication string
|
||||||
*************************************************************/
|
*************************************************************/
|
||||||
@ -4068,6 +4072,7 @@ static CURLcode create_conn(struct SessionHandle *data,
|
|||||||
proxy = NULL;
|
proxy = NULL;
|
||||||
}
|
}
|
||||||
/* proxy must be freed later unless NULL */
|
/* proxy must be freed later unless NULL */
|
||||||
|
#endif /* CURL_DISABLE_PROXY */
|
||||||
|
|
||||||
/*************************************************************
|
/*************************************************************
|
||||||
* No protocol part in URL was used, add it!
|
* No protocol part in URL was used, add it!
|
||||||
|
Loading…
x
Reference in New Issue
Block a user