Skip to content

Commit 7fe1820

Browse files
committed
Fix proxyFile regex to properly match an address with a -
1 parent 98e449e commit 7fe1820

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/core/option.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2324,7 +2324,7 @@ def _setProxyList():
23242324
return
23252325

23262326
conf.proxyList = []
2327-
for match in re.finditer(r"(?i)((http[^:]*|socks[^:]*)://)?([\w.]+):(\d+)", readCachedFileContent(conf.proxyFile)):
2327+
for match in re.finditer(r"(?i)((http[^:]*|socks[^:]*)://)?([\w\-.]+):(\d+)", readCachedFileContent(conf.proxyFile)):
23282328
_, type_, address, port = match.groups()
23292329
conf.proxyList.append("%s://%s:%s" % (type_ or "http", address, port))
23302330

0 commit comments

Comments
 (0)