File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,9 +18,9 @@ type Listener struct {
1818}
1919
2020// NewListener will wrap nl, automatically handling PROXY headers for all connections.
21- // To only require PROXY headers from certain connections , use SetFilter.
21+ // To expect PROXY headers only from certain addresses/subnets , use SetFilter.
2222//
23- // By default, all connections must provide a PROXY header within the provided timeout.
23+ // By default, all connections must provide a PROXY header within the specified timeout.
2424func NewListener (nl net.Listener , t time.Duration ) * Listener {
2525 l := & Listener {
2626 Listener : nl ,
@@ -88,11 +88,10 @@ func (l *Listener) Filter() []Rule {
8888 return f
8989}
9090
91- // SetFilter allows limiting PROXY header parsing to matching Subnets with an optional timeout.
92- // If filter is nil, all connections will be required to provide a PROXY header.
91+ // SetFilter allows limiting PROXY header requirements to matching Subnets with an optional timeout.
92+ // If filter is nil, all connections will be required to provide a PROXY header (the default) .
9393//
94- // Connections not matching any rule will be returned from Accept from the underlying listener
95- // directly without reading a PROXY header.
94+ // Connections not matching any rule will be returned directly without reading a PROXY header.
9695//
9796// Duplicate subnet rules will automatically be removed and the lowest non-zero timeout will be used.
9897//
You can’t perform that action at this time.
0 commit comments