Fix proxyFile regex to properly match an address with a -

This commit is contained in:
Tomahock 2017-02-17 23:32:32 +00:00
parent 98e449e38c
commit 7fe1820ce4

View File

@ -2324,7 +2324,7 @@ def _setProxyList():
return
conf.proxyList = []
for match in re.finditer(r"(?i)((http[^:]*|socks[^:]*)://)?([\w.]+):(\d+)", readCachedFileContent(conf.proxyFile)):
for match in re.finditer(r"(?i)((http[^:]*|socks[^:]*)://)?([\w\-.]+):(\d+)", readCachedFileContent(conf.proxyFile)):
_, type_, address, port = match.groups()
conf.proxyList.append("%s://%s:%s" % (type_ or "http", address, port))