Documentation
¶
Overview ¶
Package ports checks and picks the ports that tunnels listen on, within the ports the server config allows.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Allowed ¶
type Allowed struct {
// contains filtered or unexported fields
}
Allowed is the set of ports tunnels may listen on. The zero value allows every port.
func ParseAllowed ¶
ParseAllowed returns the ports of spec, the allow_ports setting: ports and ranges such as "8000-9000,9999". An empty spec allows every port.
func (Allowed) GenerateServerPort ¶
GenerateServerPort picks a free allowed port for a listener of mode m, or 0 when there is none.
func (Allowed) GenerateTunnelPort ¶
GenerateTunnelPort picks a free allowed port for the listeners of t, or 0 when there is none.
func (Allowed) TestServerPort ¶
TestServerPort reports whether a listener of mode m can open on port p.