Fix logic for separating port and host for IPv6 literal addresses
This commit is contained in:
parent
e854fb1ad3
commit
81fb82479a
|
@ -245,7 +245,7 @@ def proxy(sock, host):
|
|||
elif b':' not in remote_host:
|
||||
port = None
|
||||
else:
|
||||
remote_host, port = remote_host.rsplit(b':')
|
||||
remote_host, port = remote_host.rsplit(b':', 1)
|
||||
try:
|
||||
port = int(port)
|
||||
if port < 1 or port > 0xffff: raise ValueError
|
||||
|
|
Loading…
Reference in New Issue