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
This commit is contained in:
parent
bfdc2cfcfe
commit
95ca0c0e67
3 changed files with 6 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 == "" {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue