From e1b495ca4709192cb000e35973fe2d1efb811d62 Mon Sep 17 00:00:00 2001 From: kobaltgit Date: Mon, 6 Apr 2026 12:46:57 +0300 Subject: [PATCH] fix: resolve port doubling issue in status display - Modified Docker inspect template to include spaces between port bindings. - Updated proxy_info logic to extract only the first port instance. - Fixed concatenation of TCP and UDP ports (e.g., 2725727257 -> 27257). --- install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 3e62962..11d1fb2 100644 --- a/install.sh +++ b/install.sh @@ -270,8 +270,8 @@ async def proxy_info() -> dict | None: if not await proxy_running(): return None cmd_str = await docker_val("{{range .Config.Cmd}}{{.}} {{end}}") secret = cmd_str.split()[-1] if cmd_str else "" - hp = await docker_val("{{range $p,$c := .HostConfig.PortBindings}}{{(index $c 0).HostPort}}{{end}}") - port = hp or "443" + hp = await docker_val("{{range $p,$c := .HostConfig.PortBindings}}{{(index $c 0).HostPort}} {{end}}") + port = hp.split()[0] if hp else "443" ip4 = await get_ip4() ip6 = await get_ip6() cfg = load_config()