mirror of
https://github.com/curl/curl.git
synced 2026-08-26 02:03:32 +03:00
curl: normal socks proxies still use CURLOPT_PROXY
... the newly introduced CURLOPT_SOCKS_PROXY is special and should be asked for specially. (Needs new code.) Unified proxy type to a single variable in the config struct.
This commit is contained in:
parent
7907a2bec9
commit
642398c651
3 changed files with 14 additions and 15 deletions
|
|
@ -799,21 +799,21 @@ ParameterError getparameter(char *flag, /* f or -long-flag */
|
|||
break;
|
||||
case 'c': /* --socks5 specifies a socks5 proxy to use, and resolves
|
||||
the name locally and passes on the resolved address */
|
||||
GetStr(&config->socksproxy, nextarg);
|
||||
config->socksver = CURLPROXY_SOCKS5;
|
||||
GetStr(&config->proxy, nextarg);
|
||||
config->proxyver = CURLPROXY_SOCKS5;
|
||||
break;
|
||||
case 't': /* --socks4 specifies a socks4 proxy to use */
|
||||
GetStr(&config->socksproxy, nextarg);
|
||||
config->socksver = CURLPROXY_SOCKS4;
|
||||
GetStr(&config->proxy, nextarg);
|
||||
config->proxyver = CURLPROXY_SOCKS4;
|
||||
break;
|
||||
case 'T': /* --socks4a specifies a socks4a proxy to use */
|
||||
GetStr(&config->socksproxy, nextarg);
|
||||
config->socksver = CURLPROXY_SOCKS4A;
|
||||
GetStr(&config->proxy, nextarg);
|
||||
config->proxyver = CURLPROXY_SOCKS4A;
|
||||
break;
|
||||
case '2': /* --socks5-hostname specifies a socks5 proxy and enables name
|
||||
resolving with the proxy */
|
||||
GetStr(&config->socksproxy, nextarg);
|
||||
config->socksver = CURLPROXY_SOCKS5_HOSTNAME;
|
||||
GetStr(&config->proxy, nextarg);
|
||||
config->proxyver = CURLPROXY_SOCKS5_HOSTNAME;
|
||||
break;
|
||||
case 'd': /* --tcp-nodelay option */
|
||||
config->tcp_nodelay = toggle;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue