Skip to content

Commit 29576be

Browse files
authored
parse hostname in url without port issue
Test case: pproxy -r socks5://10.0.0.1 Actual behavior: pproxy: error: argument -r: invalid compile_relay value: 'socks5://10.0.0.1' Expected behavior: pproxy started
1 parent ba9c155 commit 29576be

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pproxy/server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ def compile(cls, uri, relay=None):
482482
cipher.plugins.append(plugin)
483483
match = cls.compile_rule(url.query) if url.query else None
484484
if loc:
485-
host_name, _, port = loc.rpartition(':')
485+
host_name, _, port = loc.partition(':')
486486
port = int(port) if port else (22 if 'ssh' in rawprotos else 8080)
487487
else:
488488
host_name = port = None

0 commit comments

Comments
 (0)