There was an error while loading. Please reload this page.
1 parent c61f74c commit c8704c2Copy full SHA for c8704c2
2 files changed
pproxy/__doc__.py
@@ -1,5 +1,5 @@
1
__title__ = "pproxy"
2
-__version__ = "2.4.6"
+__version__ = "2.4.7"
3
__license__ = "MIT"
4
__description__ = "Proxy server that can tunnel among remote servers by regex rules."
5
__keywords__ = "proxy socks http shadowsocks shadowsocksr ssr redirect pf tunnel cipher ssl udp"
pproxy/server.py
@@ -482,7 +482,11 @@ def compile(cls, uri, relay=None):
482
cipher.plugins.append(plugin)
483
match = cls.compile_rule(url.query) if url.query else None
484
if loc:
485
- host_name, _, port = loc.partition(':')
+ ipv6 = re.fullmatch('\[([0-9a-fA-F:]*)\](?::(\d+)?)?', loc)
486
+ if ipv6:
487
+ host_name, port = loc.groups()
488
+ else:
489
+ host_name, _, port = loc.partition(':')
490
port = int(port) if port else (22 if 'ssh' in rawprotos else 8080)
491
else:
492
host_name = port = None
0 commit comments