Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsSocketClosed ¶
IsSocketClosed returns true if err is a result of reading from closed network connection
Types ¶
type Modifier ¶
type Modifier struct {
ModifyRequest func(src, dst net.Conn, data []byte) ([]byte, error)
ModifyResponse func(src, dst net.Conn, data []byte) ([]byte, error)
}
Modifier define rules for tranforming incoming and outcoming TCP messages To filter response set data to empty To close connection, return error
type Proxy ¶
type Proxy struct {
sync.RWMutex
DialTLS func(network, addr string) (net.Conn, error)
Dial func(network, addr string) (net.Conn, error)
TLSConfigTarget *tls.Config
ReadTimeout time.Duration
WriteTimeout time.Duration
SyncStats func(Stat)
// Duration in which connection stats will be flushed. Defaults to one second.
StatsSyncInterval time.Duration
// contains filtered or unexported fields
}
func (*Proxy) AddDomainHandler ¶
func (*Proxy) RemoveDomainHandler ¶
Click to show internal directories.
Click to hide internal directories.