Merge pull request #2401 from tomahock/master

Fix proxyFile regex to properly match an address with a -
This commit is contained in:
Miroslav Stampar 2017-02-19 01:31:12 +01:00 committed by GitHub
commit 4d3aa1605c

View File

@ -2324,7 +2324,7 @@ def _setProxyList():
return return
conf.proxyList = [] 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() _, type_, address, port = match.groups()
conf.proxyList.append("%s://%s:%s" % (type_ or "http", address, port)) conf.proxyList.append("%s://%s:%s" % (type_ or "http", address, port))