From 95ca0c0e6792c6c4518cc9226bac36c43418ff6a Mon Sep 17 00:00:00 2001 From: rcourtman Date: Wed, 3 Dec 2025 20:25:08 +0000 Subject: [PATCH] fix: Default sensor-proxy HTTP to 0.0.0.0:8443 for IPv4 binding On systems with net.ipv6.bindv6only=1 (including some Proxmox 8 configurations), using ":8443" results in IPv6-only binding. Users reported curl to 127.0.0.1:8443 hanging while [::1]:8443 worked. Changed default from ":8443" to "0.0.0.0:8443" to explicitly bind IPv4. Related to #805 --- cmd/pulse-sensor-proxy/config.example.yaml | 2 +- cmd/pulse-sensor-proxy/config.go | 5 ++++- scripts/install-sensor-proxy.sh | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/cmd/pulse-sensor-proxy/config.example.yaml b/cmd/pulse-sensor-proxy/config.example.yaml index 11f8b3b..6ebb193 100644 --- a/cmd/pulse-sensor-proxy/config.example.yaml +++ b/cmd/pulse-sensor-proxy/config.example.yaml @@ -42,7 +42,7 @@ rate_limit: # HTTPS mode (for remote nodes) http_enabled: false -http_listen_addr: ":8443" +http_listen_addr: "0.0.0.0:8443" # Explicitly IPv4; use [::]:8443 for IPv6 http_tls_cert: "/etc/pulse-sensor-proxy/tls/server.crt" http_tls_key: "/etc/pulse-sensor-proxy/tls/server.key" http_auth_token: "" # Populated by installer; keep secret diff --git a/cmd/pulse-sensor-proxy/config.go b/cmd/pulse-sensor-proxy/config.go index e2147b0..d4275fc 100644 --- a/cmd/pulse-sensor-proxy/config.go +++ b/cmd/pulse-sensor-proxy/config.go @@ -354,7 +354,10 @@ func loadConfig(configPath string) (*Config, error) { // Validate HTTP configuration if enabled if cfg.HTTPEnabled { if cfg.HTTPListenAddr == "" { - cfg.HTTPListenAddr = ":8443" // Default port + // Use 0.0.0.0:8443 explicitly for IPv4 binding. + // Using just ":8443" can result in IPv6-only binding on systems + // with net.ipv6.bindv6only=1 (e.g., some Proxmox 8 configurations). + cfg.HTTPListenAddr = "0.0.0.0:8443" log.Info().Str("http_addr", cfg.HTTPListenAddr).Msg("Using default HTTP listen address") } if cfg.HTTPAuthToken == "" { diff --git a/scripts/install-sensor-proxy.sh b/scripts/install-sensor-proxy.sh index 7645bf4..0d3e875 100755 --- a/scripts/install-sensor-proxy.sh +++ b/scripts/install-sensor-proxy.sh @@ -1155,7 +1155,7 @@ QUIET=false PULSE_SERVER="" STANDALONE=false HTTP_MODE=false -HTTP_ADDR=":8443" +HTTP_ADDR="0.0.0.0:8443" # Explicitly IPv4 to avoid IPv6-only binding on some systems FALLBACK_BASE="${PULSE_SENSOR_PROXY_FALLBACK_URL:-}" SKIP_RESTART=false RESTART_PULSE=false