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).
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user