Documentation
¶
Overview ¶
Package proxyproto wraps listeners so accepted connections have their PROXY header consumed and RemoteAddr() reports the client the header names.
It lives in its own package because two callers need it and they cannot import each other: core/singbox (the front listener for inject/relay mode) and protocol/mieru (whose Mux accepts on a listener Sing2 supplies).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Wrap ¶
Wrap returns a listener that strips PROXY headers.
The policy is USE, not REQUIRE: a connection without a header is still served with its own socket address. Turning a missing header into an outage is a worse failure than losing the client IP on that one connection — a load balancer missing `send-proxy` would otherwise take the whole node down.
Any sender is believed. A PROXY header is an unauthenticated claim, so whoever can reach this listener can claim any source address; keep the port reachable only from the load balancer.