From 81fb82479a8911dd53f8b222c6b6d91e600e8caf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juhani=20Krekel=C3=A4?= Date: Fri, 15 Oct 2021 13:05:43 +0300 Subject: [PATCH] Fix logic for separating port and host for IPv6 literal addresses --- untls_proxy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/untls_proxy.py b/untls_proxy.py index ad5441b..ff7ee64 100755 --- a/untls_proxy.py +++ b/untls_proxy.py @@ -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