mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=9974
This commit is contained in:
parent
566cd6f85c
commit
6d367a4317
|
@ -4059,3 +4059,20 @@ David 19 Apr 2006
|
|||
|
||||
sched/
|
||||
server_types.C
|
||||
|
||||
|
||||
Walt 19 Apr 2006
|
||||
- Code cleanup: remove duplicate calls to xml_unescape.
|
||||
- Bug Fix: Change HTTP redirect limit to 50
|
||||
- Bug Fix: Fix problems with socks5 proxys:
|
||||
- Auth negotiation is handled by libcurl, remove that from BOINC
|
||||
- Set connection timeouts to 20 seconds
|
||||
*NOTE* Using socks5 proxies will cause BOINC to block until a
|
||||
connection is made to the end server. BOINC will 'lock up'
|
||||
until the connection attempt completes or times out.
|
||||
|
||||
client/
|
||||
http_curl.C
|
||||
lib/
|
||||
proxy_info.C
|
||||
|
||||
|
|
|
@ -301,7 +301,7 @@ The checking this option controls is of the identity that the server claims. The
|
|||
|
||||
// force curl to use HTTP/1.1
|
||||
curlErr = curl_easy_setopt(curlEasy, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
|
||||
curlErr = curl_easy_setopt(curlEasy, CURLOPT_MAXREDIRS, 5L);
|
||||
curlErr = curl_easy_setopt(curlEasy, CURLOPT_MAXREDIRS, 50L);
|
||||
curlErr = curl_easy_setopt(curlEasy, CURLOPT_AUTOREFERER, 1L);
|
||||
curlErr = curl_easy_setopt(curlEasy, CURLOPT_FOLLOWLOCATION, 1L);
|
||||
|
||||
|
@ -701,18 +701,17 @@ void HTTP_OP::setupProxyCurl() {
|
|||
curlErr = curl_easy_setopt(curlEasy, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);
|
||||
curlErr = curl_easy_setopt(curlEasy, CURLOPT_PROXYPORT, (long) pi.socks_server_port);
|
||||
curlErr = curl_easy_setopt(curlEasy, CURLOPT_PROXY, (char*) pi.socks_server_name);
|
||||
// libcurl uses blocking sockets with socks proxy, so limit timeout.
|
||||
// - imlemented with local patch to libcurl
|
||||
curlErr = curl_easy_setopt(curlEasy, CURLOPT_CONNECTTIMEOUT, 20L);
|
||||
|
||||
if (
|
||||
strlen(pi.socks5_user_passwd)>0 || strlen(pi.socks5_user_name)>0
|
||||
) {
|
||||
auth_flag = false;
|
||||
sprintf(szCurlProxyUserPwd, "%s:%s", pi.socks5_user_name, pi.socks5_user_passwd);
|
||||
curlErr = curl_easy_setopt(curlEasy, CURLOPT_PROXYUSERPWD, szCurlProxyUserPwd);
|
||||
auth_flag = true;
|
||||
if (auth_type) {
|
||||
curlErr = curl_easy_setopt(curlEasy, CURLOPT_PROXYAUTH, auth_type);
|
||||
} else {
|
||||
curlErr = curl_easy_setopt(curlEasy, CURLOPT_PROXYAUTH, CURLAUTH_ANY);
|
||||
}
|
||||
curlErr = curl_easy_setopt(curlEasy, CURLOPT_PROXYAUTH, CURLAUTH_ANY);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ using std::string;
|
|||
#include "proxy_info.h"
|
||||
|
||||
int PROXY_INFO::parse(MIOFILE& in) {
|
||||
char buf[256], buf2[1024];
|
||||
char buf[1024];
|
||||
string s5un, s5up, hun, hup, temp;
|
||||
|
||||
memset(this, 0, sizeof(PROXY_INFO));
|
||||
|
@ -47,22 +47,10 @@ int PROXY_INFO::parse(MIOFILE& in) {
|
|||
else if (parse_int(buf, "<socks_server_port>", socks_server_port)) continue;
|
||||
else if (parse_str(buf, "<http_server_name>", http_server_name, sizeof(http_server_name))) continue;
|
||||
else if (parse_int(buf, "<http_server_port>", http_server_port)) continue;
|
||||
else if (parse_str(buf, "<socks5_user_name>", buf2, 1024)) {
|
||||
xml_unescape(buf2, socks5_user_name);
|
||||
continue;
|
||||
}
|
||||
else if (parse_str(buf, "<socks5_user_passwd>", buf2, 1024)) {
|
||||
xml_unescape(buf2, socks5_user_passwd);
|
||||
continue;
|
||||
}
|
||||
else if (parse_str(buf, "<http_user_name>", buf2, 1024)) {
|
||||
xml_unescape(buf2, http_user_name);
|
||||
continue;
|
||||
}
|
||||
else if (parse_str(buf, "<http_user_passwd>", buf2, 1024)) {
|
||||
xml_unescape(buf2, http_user_passwd);
|
||||
continue;
|
||||
}
|
||||
else if (parse_str(buf, "<socks5_user_name>", socks5_user_name,sizeof(socks5_user_name))) continue;
|
||||
else if (parse_str(buf, "<socks5_user_passwd>", socks5_user_passwd,sizeof(socks5_user_passwd))) continue;
|
||||
else if (parse_str(buf, "<http_user_name>", http_user_name,sizeof(http_user_name))) continue;
|
||||
else if (parse_str(buf, "<http_user_passwd>", http_user_passwd,sizeof(http_user_passwd))) continue;
|
||||
}
|
||||
return ERR_XML_PARSE;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue