Documentation ¶
Index ¶
- Constants
- Variables
- func GetDefaultHttpResponse() []byte
- func GetDstKey(packet []byte) string
- func GetIPv4Dst(packet []byte) net.IP
- func GetIPv4Src(packet []byte) net.IP
- func GetIPv6Dst(packet []byte) net.IP
- func GetIPv6Src(packet []byte) net.IP
- func GetSrcKey(packet []byte) string
- func IsIPv4(packet []byte) bool
- func IsIPv6(packet []byte) bool
- func ServerStart(config *Config) (err error)
- type Config
- type SniffConn
Constants ¶
View Source
const ( TypeHttp = iota TypeHttp2 TypeUnknown )
Variables ¶
View Source
var BufferSize = 64 * 1024
Functions ¶
func GetDefaultHttpResponse ¶
func GetDefaultHttpResponse() []byte
GetDefaultHttpResponse returns the default http response
func GetIPv4Dst ¶
GEtIPv4Dst returns the IPv4 destination address of the packet
func GetIPv4Src ¶
GetIPv4Src returns the IPv4 source address of the packet
func GetIPv6Dst ¶
GetIPv6Dst returns the IPv6 destination address of the packet
func GetIPv6Src ¶
GetIPv6Src returns the IPv6 source address of the packet
func ServerStart ¶
Types ¶
type SniffConn ¶
func NewPeekPreDataConn ¶
Click to show internal directories.
Click to hide internal directories.