Documentation
¶
Index ¶
- func AddQuitSignal(group *run.Group)
- type Entry
- type QuicConn
- type Whitelist
- func (p *Whitelist) AddFromString(s string)
- func (p *Whitelist) AddHost(host string, minPort, maxPort int)
- func (p *Whitelist) AddIP(ip net.IP, minPort, maxPort int)
- func (p *Whitelist) AddNetwork(ipNet *net.IPNet, minPort, maxPort int)
- func (p *Whitelist) AddZone(zone string, minPort, maxPort int)
- func (p *Whitelist) Contains(ctx context.Context, network, addr string, opts ...gost.BypassOption) bool
- func (p *Whitelist) IsAddrAllowed(host string, port int) bool
- func (p *Whitelist) IsPortAllowed(port int, entry *Entry[any]) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddQuitSignal ¶
Types ¶
type Entry ¶
func (Entry[T]) IsPortAllowed ¶
type QuicConn ¶
func (*QuicConn) RemoteAddr ¶
type Whitelist ¶
type Whitelist struct { Networks []Entry[*net.IPNet] IPs []Entry[net.IP] Zones []Entry[string] Hosts []Entry[string] // contains filtered or unexported fields }
func NewWhitelist ¶
func NewWhitelist() *Whitelist
func WhitelistFromStrings ¶
WhitelistFromStrings creates a Whitelist if the host list is not empty, nil otherwise.
func (*Whitelist) AddFromString ¶
func (*Whitelist) AddIP ¶
AddIP specifies an IP address that will use the bypass proxy. Note that this will only take effect if a literal IP address is dialed. A connection to a named host will never match an IP.
func (*Whitelist) AddNetwork ¶
AddNetwork specifies an IP range that will use the bypass proxy. Note that this will only take effect if a literal IP address is dialed. A connection to a named host will never match.
func (*Whitelist) AddZone ¶
AddZone specifies a DNS suffix that will use the bypass proxy. A zone of "example.com" matches "example.com" and all of its subdomains.
Click to show internal directories.
Click to hide internal directories.