Loading CHANGES +6 −0 Original line number Diff line number Diff line Loading @@ -6,6 +6,12 @@ Changelog Daniel(30 January 2004) - Added --socks as a recognized option. It works just like --proxy but sets a SOCKS5 proxy to use. SOCKS5 support has been available in libcurl for a while, just not provided by the curl tool. This does not currently work for IPv6-enabled libcurls. Daniel(29 January 2004) - Stadler Stephan pointed out that src/hugehelp.c included config.h without checking the define if its present... Loading src/main.c +14 −1 Original line number Diff line number Diff line Loading @@ -335,6 +335,7 @@ static void help(void) " -R/--remote-time Set the remote file's time on the local output", " -s/--silent Silent mode. Don't output anything", " -S/--show-error Show error. With -s, make curl show errors when they occur", " --socks <host[:port]> Use SOCKS5 proxy on given host + port", " --stderr <file> Where to redirect stderr. - means stdout", " -t/--telnet-option <OPT=val> Set telnet option", " --trace <file> Dump a network/debug trace to the given file", Loading Loading @@ -481,6 +482,8 @@ struct Configurable { size_t lastrecvsize; bool ftp_ssl; char *socks5proxy; }; /* global variable to hold info about libcurl */ Loading Loading @@ -1113,6 +1116,7 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */ {"*z", "disable-eprt", FALSE}, {"$a", "ftp-ssl", FALSE}, {"$b", "ftp-pasv", FALSE}, {"$c", "socks5", TRUE}, {"0", "http1.0", FALSE}, {"1", "tlsv1", FALSE}, {"2", "sslv2", FALSE}, Loading Loading @@ -1433,6 +1437,9 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */ free(config->ftpport); config->ftpport = NULL; break; case 'c': /* --socks specifies a socks5 proxy to use */ GetStr(&config->socks5proxy, nextarg); break; } break; case '#': /* added 19990617 larsa */ Loading Loading @@ -3250,10 +3257,16 @@ operate(struct Configurable *config, int argc, char *argv[]) curl_easy_setopt(curl, CURLOPT_MAXFILESIZE_LARGE, config->max_filesize); /* new in curl 7.10.9 */ /* new in curl 7.11.0 */ if(config->ftp_ssl) curl_easy_setopt(curl, CURLOPT_FTP_SSL, CURLFTPSSL_TRY); /* new in curl 7.11.1 */ if(config->socks5proxy) { curl_easy_setopt(curl, CURLOPT_PROXY, config->socks5proxy); curl_easy_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5); } res = curl_easy_perform(curl); if((config->progressmode == CURL_PROGRESS_BAR) && Loading Loading
CHANGES +6 −0 Original line number Diff line number Diff line Loading @@ -6,6 +6,12 @@ Changelog Daniel(30 January 2004) - Added --socks as a recognized option. It works just like --proxy but sets a SOCKS5 proxy to use. SOCKS5 support has been available in libcurl for a while, just not provided by the curl tool. This does not currently work for IPv6-enabled libcurls. Daniel(29 January 2004) - Stadler Stephan pointed out that src/hugehelp.c included config.h without checking the define if its present... Loading
src/main.c +14 −1 Original line number Diff line number Diff line Loading @@ -335,6 +335,7 @@ static void help(void) " -R/--remote-time Set the remote file's time on the local output", " -s/--silent Silent mode. Don't output anything", " -S/--show-error Show error. With -s, make curl show errors when they occur", " --socks <host[:port]> Use SOCKS5 proxy on given host + port", " --stderr <file> Where to redirect stderr. - means stdout", " -t/--telnet-option <OPT=val> Set telnet option", " --trace <file> Dump a network/debug trace to the given file", Loading Loading @@ -481,6 +482,8 @@ struct Configurable { size_t lastrecvsize; bool ftp_ssl; char *socks5proxy; }; /* global variable to hold info about libcurl */ Loading Loading @@ -1113,6 +1116,7 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */ {"*z", "disable-eprt", FALSE}, {"$a", "ftp-ssl", FALSE}, {"$b", "ftp-pasv", FALSE}, {"$c", "socks5", TRUE}, {"0", "http1.0", FALSE}, {"1", "tlsv1", FALSE}, {"2", "sslv2", FALSE}, Loading Loading @@ -1433,6 +1437,9 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */ free(config->ftpport); config->ftpport = NULL; break; case 'c': /* --socks specifies a socks5 proxy to use */ GetStr(&config->socks5proxy, nextarg); break; } break; case '#': /* added 19990617 larsa */ Loading Loading @@ -3250,10 +3257,16 @@ operate(struct Configurable *config, int argc, char *argv[]) curl_easy_setopt(curl, CURLOPT_MAXFILESIZE_LARGE, config->max_filesize); /* new in curl 7.10.9 */ /* new in curl 7.11.0 */ if(config->ftp_ssl) curl_easy_setopt(curl, CURLOPT_FTP_SSL, CURLFTPSSL_TRY); /* new in curl 7.11.1 */ if(config->socks5proxy) { curl_easy_setopt(curl, CURLOPT_PROXY, config->socks5proxy); curl_easy_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5); } res = curl_easy_perform(curl); if((config->progressmode == CURL_PROGRESS_BAR) && Loading