Documentation ¶ Index ¶ type ConnInfo func Sniff(conn net.Conn) (r *ConnInfo, readBuf bytes.Buffer, ok bool) Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type ConnInfo ¶ type ConnInfo struct { Protocol string // "http1","http2","websocket", "socks5" HTTPHeader http.Header HTTPVer string Socks5Target string // "www.google.com:443" "example.com:80" } func Sniff ¶ func Sniff(conn net.Conn) (r *ConnInfo, readBuf bytes.Buffer, ok bool) support: "http1","http2","websocket", "socks5" WARNING: data read by sniffler can't be read from conn again, but sniffer put what it read into readBuf, please handle readBuf manually Source Files ¶ View all Source files sniffer.go Click to show internal directories. Click to hide internal directories.