mirror of
https://github.com/haiwen/seafile.git
synced 2025-01-07 03:17:13 +08:00
Socks5 support username and password (#2768)
Co-authored-by: yangheran <heran.yang@seafile.com>
This commit is contained in:
parent
8c2fe93154
commit
d6d8954e87
@ -641,6 +641,10 @@ set_proxy (CURL *curl, gboolean is_https)
|
||||
curl_easy_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5_HOSTNAME);
|
||||
curl_easy_setopt(curl, CURLOPT_PROXY, seaf->http_proxy_addr);
|
||||
curl_easy_setopt(curl, CURLOPT_PROXYPORT, seaf->http_proxy_port);
|
||||
if (seaf->http_proxy_username && g_strcmp0 (seaf->http_proxy_username, "") != 0)
|
||||
curl_easy_setopt(curl, CURLOPT_PROXYUSERNAME, seaf->http_proxy_username);
|
||||
if (seaf->http_proxy_password && g_strcmp0 (seaf->http_proxy_password, "") != 0)
|
||||
curl_easy_setopt(curl, CURLOPT_PROXYPASSWORD, seaf->http_proxy_password);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user