Documentation
¶
Index ¶
- Variables
- func Dial(network, addr string, dialer gnet.Dialer, usage Usage) (net.Conn, error)
- func MatcherHTTP1(r io.Reader, info *Info) (int, error)
- func MatcherHTTP2(r io.Reader, info *Info) (int, error)
- func MatcherSocks5(r io.Reader, info *Info) (int, error)
- func MatcherUsage(r io.Reader, info *Info) (int, error)
- func NewClient(conn net.Conn, usage Usage) (net.Conn, error)
- type Conn
- type Err
- type Info
- type Listener
- func (ml *Listener) Accept() (net.Conn, error)
- func (ml *Listener) AddListen(network, addr string, matchers ...Matcher) error
- func (ml *Listener) AddListener(rawLn net.Listener, matchers ...Matcher) error
- func (ml *Listener) Addr() []string
- func (ml *Listener) Close() error
- func (ml *Listener) CloseOne(network, addr string) error
- type Matcher
- type Usage
Constants ¶
This section is empty.
Variables ¶
View Source
var (
AllMatchers = []Matcher{MatcherUsage, MatcherSocks5, MatcherHTTP2, MatcherHTTP2}
)
View Source
var (
UsageNone = MustMakeUsage("@nonono\n")
)
Functions ¶
Types ¶
type Conn ¶
Conn is server-side connection which could sniff info.
type Info ¶
type Info struct { Network string // listening network Addr string // listen address Usage Usage UsageExt string Protocols []string // "http1", "socks5", TODO "SMux", "http2", "websocket", "grpc"... HTTP1Req *http.Request HTTP2Fields [][2]string Reasons map[string]string }
Info is sniffed info.
type Listener ¶
type Listener struct {
// contains filtered or unexported fields
}
Listener is a multiple networks / ports / protocols listener.
func (*Listener) AddListener ¶
AddListener add new listener.
Click to show internal directories.
Click to hide internal directories.