JuliusBrussee/caveman · error

listen address is not loopback; standalone proxy has no…

Error message

listen address %q is not loopback; standalone proxy has no inbound authentication

What it means

validateListen rejects non-loopback hosts because the standalone proxy has no inbound authentication; binding 0.0.0.0 or a LAN IP would expose every configured provider key to the network. This is a security guard, not a formatting check.

Solutions

  1. Bind to 127.0.0.1 or localhost only
  2. Put an authenticating reverse proxy in front if remote access is required
  3. Use a tunnel (e.g. SSH port forward) for remote use
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at proxy/internal/config/config.go:133 when the library encounters an invalid state.

Common situations: See trigger scenarios.

Understand the failure class


AI-assisted analysis of JuliusBrussee/caveman@5184b3d11a (2026-08-18). Data as JSON: /api/errors/63c951c61ce8dbdf. Report an issue: GitHub.

Appendix: source

Thrown at proxy/internal/config/config.go:131

		return Config{}, err
	}
	return cfg, nil
}

// validateListen keeps standalone's unauthenticated BYOK proxy local to one
// operator. Binding an empty, wildcard, or non-loopback host would expose every
// configured provider credential to the network with no inbound authentication.
func validateListen(listen string) error {
	host, port, err := net.SplitHostPort(strings.TrimSpace(listen))
	if err != nil || port == "" {
		return fmt.Errorf("listen address %q must be loopback host:port", listen)
	}
	if strings.EqualFold(host, "localhost") {
		return nil
	}
	ip := net.ParseIP(host)
	if ip == nil || !ip.IsLoopback() {
		return fmt.Errorf("listen address %q is not loopback; standalone proxy has no inbound authentication", listen)
	}
	return nil
}

func (c Config) withDefaults() Config {
	if label := env.String("CAVEMAN_LABEL", ""); label != "" {
		c.Label = label
	}
	if c.Label == "" {
		c.Label = "local"
	}
	if mode := env.String("CAVEMAN_MODE", ""); mode != "" {
		c.Mode = mode
	}
	if listen := env.String("CAVEMAN_LISTEN", ""); listen != "" {
		c.Listen = listen
	}
	if sub := env.String("CAVEMAN_SUBSCRIPTION_COMPRESS", ""); sub != "" {

View on GitHub (pinned to 5184b3d11a)