Documentation ¶
Index ¶
- Constants
- type ProxyServer
- type Tun2Socks
- func (t2s *Tun2Socks) FindAppUid(sourceIp string, sourcePort uint16, destIp string, destPort uint16) int
- func (t2s *Tun2Socks) Run()
- func (t2s *Tun2Socks) SetDefaultProxy(proxy *ProxyServer)
- func (t2s *Tun2Socks) SetProxyServers(proxyServerMap map[int]*ProxyServer)
- func (t2s *Tun2Socks) SetUidCallback(uidCallback UidCallback)
- func (t2s *Tun2Socks) Stop()
- func (t2s *Tun2Socks) Stopped() bool
- type UidCallback
Constants ¶
View Source
const ( // simplified server-side tcp states CLOSED tcpState = 0x0 SYN_RCVD tcpState = 0x1 ESTABLISHED tcpState = 0x2 FIN_WAIT_1 tcpState = 0x3 FIN_WAIT_2 tcpState = 0x4 CLOSING tcpState = 0x5 LAST_ACK tcpState = 0x6 TIME_WAIT tcpState = 0x7 MAX_RECV_WINDOW int = 65535 MAX_SEND_WINDOW int = 65535 CONNECT_NOT_SENT = -1 CONNECT_SENT = 0 CONNECT_ESTABLISHED = 1 TIMEOUT = 10 * time.Second ACTTIMEOUT = 10 * time.Millisecond )
View Source
const ( MTU = 10240 PROXY_TYPE_NONE = 0 PROXY_TYPE_SOCKS = 1 PROXY_TYPE_HTTP = 2 PROXY_TYPE_TRANSPARENT = 3 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ProxyServer ¶
type Tun2Socks ¶
type Tun2Socks struct {
// contains filtered or unexported fields
}
func (*Tun2Socks) FindAppUid ¶
func (*Tun2Socks) SetDefaultProxy ¶
func (t2s *Tun2Socks) SetDefaultProxy(proxy *ProxyServer)
func (*Tun2Socks) SetProxyServers ¶
func (t2s *Tun2Socks) SetProxyServers(proxyServerMap map[int]*ProxyServer)
func (*Tun2Socks) SetUidCallback ¶
func (t2s *Tun2Socks) SetUidCallback(uidCallback UidCallback)
Click to show internal directories.
Click to hide internal directories.