From 7fe1820ce41f1017bcdcbc21f216861b37cbd4b1 Mon Sep 17 00:00:00 2001 From: Tomahock Date: Fri, 17 Feb 2017 23:32:32 +0000 Subject: [PATCH] Fix proxyFile regex to properly match an address with a - --- lib/core/option.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/core/option.py b/lib/core/option.py index 64722e1e2..0fcd0406f 100755 --- a/lib/core/option.py +++ b/lib/core/option.py @@ -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))