Fix #2476, recognize SOCKS5, SOCKS4 in proxy.

This commit is contained in:
Amos Bird 2017-03-29 14:01:03 +08:00
parent 93a12797aa
commit caf0a87e16

View File

@ -155,7 +155,7 @@ class PACResolver:
raise ParseProxyError("Invalid number of parameters for PROXY")
host, port = PACResolver._parse_proxy_host(config[1])
return QNetworkProxy(QNetworkProxy.HttpProxy, host, port)
elif config[0] == "SOCKS":
elif config[0] in ["SOCKS", "SOCKS5"]:
if len(config) != 2:
raise ParseProxyError("Invalid number of parameters for SOCKS")
host, port = PACResolver._parse_proxy_host(config[1])