{"record":{"id":"c2bcfd3026d5febb","repo":"nats-io/nats-server","slug":"unsupported-proxy-protocol-feature","errorCode":null,"errorMessage":"unsupported PROXY protocol feature","messagePattern":"unsupported PROXY protocol feature","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/client_proxyproto.go","lineNumber":75,"sourceCode":"\tproxyProtoV2HeaderSize = 16 // Fixed header: 12 (sig) + 1 (ver/cmd) + 1 (fam/proto) + 2 (addr len)\n\n\t// Timeout for reading PROXY protocol header\n\tproxyProtoReadTimeout = 5 * time.Second\n)\n\n// PROXY protocol v1 constants\nconst (\n\tproxyProtoV1Prefix     = \"PROXY \"\n\tproxyProtoV1MaxLineLen = 107 // Maximum line length including CRLF\n\tproxyProtoV1TCP4       = \"TCP4\"\n\tproxyProtoV1TCP6       = \"TCP6\"\n\tproxyProtoV1Unknown    = \"UNKNOWN\"\n)\n\nvar (\n\t// Errors\n\terrProxyProtoInvalid      = errors.New(\"invalid PROXY protocol header\")\n\terrProxyProtoUnsupported  = errors.New(\"unsupported PROXY protocol feature\")\n\terrProxyProtoTimeout      = errors.New(\"timeout reading PROXY protocol header\")\n\terrProxyProtoUnrecognized = errors.New(\"unrecognized PROXY protocol format\")\n)\n\n// proxyProtoAddr contains the address information extracted from PROXY protocol header\ntype proxyProtoAddr struct {\n\tsrcIP   net.IP\n\tsrcPort uint16\n\tdstIP   net.IP\n\tdstPort uint16\n}\n\n// String implements net.Addr interface\nfunc (p *proxyProtoAddr) String() string {\n\treturn net.JoinHostPort(p.srcIP.String(), fmt.Sprintf(\"%d\", p.srcPort))\n}\n\n// Network implements net.Addr interface","sourceCodeStart":57,"sourceCodeEnd":93,"githubUrl":"https://github.com/nats-io/nats-server/blob/3a66a489d262bf89b71a71c955c94920394532f3/server/client_proxyproto.go#L57-L93","documentation":"Wrapped with detail when a syntactically valid PROXY protocol header uses a feature this server does not implement — anything other than STREAM/TCP transport, or an unsupported address family (reported as 0x??). The peer's PROXY header content is at fault, not the server configuration.","triggerScenarios":"Thrown at server/client_proxyproto.go:75 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure the upstream load balancer proxies STREAM/TCP connections","Upgrade the load balancer to emit a supported address family (TCP4/TCP6)","Disable PROXY protocol on that listener if the sender cannot comply"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3a66a489d262bf89b71a71c955c94920394532f3","analyzedAt":"2026-09-02T04:41:54.247Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}