Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4d3aa16

Browse files
authored
Merge pull request #2401 from tomahock/master
Fix proxyFile regex to properly match an address with a -
2 parents 98e449e + 7fe1820 commit 4d3aa16

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)