Skip to content

Commit ef496d7

Browse files
comment cleanup
1 parent 521c168 commit ef496d7

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

listener.go

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff 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.
2424
func 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
//

0 commit comments

Comments
 (0)