Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Sniffer ¶
type Sniffer struct {
Timeout time.Duration
RewriteDomain bool // Whether to rewrite the address even when it's already a domain
TCPPorts utils.PortUnion
UDPPorts utils.PortUnion
}
Sniffer is a server core RequestHook that performs packet inspection and possibly rewrites the request address based on what's in the protocol header. This is mainly for inbounds that inherently cannot get domain information (e.g. TUN), in which case sniffing can restore the domains and apply ACLs correctly. Currently supports HTTP, HTTPS (TLS) and QUIC.
Click to show internal directories.
Click to hide internal directories.