Documentation ¶
Index ¶
- Constants
- func Regist(name string, s Service, args interface{})
- type Args
- type BridgeItem
- type HTTP
- func (s *HTTP) Clean()
- func (s *HTTP) InitBasicAuth() (err error)
- func (s *HTTP) InitOutConnPool()
- func (s *HTTP) InitService()
- func (s *HTTP) IsBasicAuth() bool
- func (s *HTTP) IsDeadLoop(inLocalAddr string, host string) bool
- func (s *HTTP) OutToTCP(useProxy bool, address string, inConn *net.Conn, req *utils.HTTPRequest) (err error)
- func (s *HTTP) OutToUDP(inConn *net.Conn) (err error)
- func (s *HTTP) Start(args interface{}) (err error)
- func (s *HTTP) StopService()
- type HTTPArgs
- type Service
- type ServiceItem
- type TCP
- type TCPArgs
- type TunnelBridge
- func (s *TunnelBridge) Check()
- func (s *TunnelBridge) ChnDeamon(item *BridgeItem)
- func (s *TunnelBridge) Clean()
- func (s *TunnelBridge) ClientConn(inConn *net.Conn, key string)
- func (s *TunnelBridge) ClientControlConn(inConn *net.Conn, key string)
- func (s *TunnelBridge) ConnChn(key string, typ uint8) (chn chan *net.Conn, item *BridgeItem)
- func (s *TunnelBridge) InitService()
- func (s *TunnelBridge) ServerConn(inConn *net.Conn, key string)
- func (s *TunnelBridge) Start(args interface{}) (err error)
- func (s *TunnelBridge) StopService()
- type TunnelBridgeArgs
- type TunnelClient
- func (s *TunnelClient) Check()
- func (s *TunnelClient) Clean()
- func (s *TunnelClient) GetConn() (conn net.Conn, err error)
- func (s *TunnelClient) GetInConn(typ uint8) (outConn net.Conn, err error)
- func (s *TunnelClient) InitService()
- func (s *TunnelClient) ServeConn()
- func (s *TunnelClient) ServeUDP()
- func (s *TunnelClient) Start(args interface{}) (err error)
- func (s *TunnelClient) StopService()
- type TunnelClientArgs
- type TunnelServer
- func (s *TunnelServer) Check()
- func (s *TunnelServer) Clean()
- func (s *TunnelServer) GetConn() (conn net.Conn, err error)
- func (s *TunnelServer) GetOutConn() (outConn net.Conn, err error)
- func (s *TunnelServer) InitService()
- func (s *TunnelServer) Start(args interface{}) (err error)
- func (s *TunnelServer) StopService()
- func (s *TunnelServer) UDPConnDeamon()
- type TunnelServerArgs
- type UDP
- func (s *UDP) Clean()
- func (s *UDP) GetConn(connKey string) (conn net.Conn, isNew bool, err error)
- func (s *UDP) InitOutConnPool()
- func (s *UDP) InitService()
- func (s *UDP) OutToTCP(packet []byte, localAddr, srcAddr *net.UDPAddr) (err error)
- func (s *UDP) OutToUDP(packet []byte, localAddr, srcAddr *net.UDPAddr) (err error)
- func (s *UDP) Start(args interface{}) (err error)
- func (s *UDP) StopService()
- type UDPArgs
- type UDPItem
Constants ¶
View Source
const ( TYPE_TCP = "tcp" TYPE_UDP = "udp" TYPE_HTTP = "http" TYPE_TLS = "tls" CONN_CONTROL = uint8(1) CONN_SERVER = uint8(2) CONN_CLIENT = uint8(3) )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BridgeItem ¶
type HTTP ¶
type HTTP struct {
// contains filtered or unexported fields
}
func (*HTTP) InitBasicAuth ¶
func (*HTTP) InitOutConnPool ¶
func (s *HTTP) InitOutConnPool()
func (*HTTP) InitService ¶
func (s *HTTP) InitService()
func (*HTTP) IsBasicAuth ¶
func (*HTTP) StopService ¶
func (s *HTTP) StopService()
type Service ¶
type Service interface { Start(args interface{}) (err error) Clean() }
func NewTunnelBridge ¶
func NewTunnelBridge() Service
func NewTunnelClient ¶
func NewTunnelClient() Service
func NewTunnelServer ¶
func NewTunnelServer() Service
type ServiceItem ¶
func Run ¶
func Run(name string) (service *ServiceItem, err error)
type TCP ¶
type TCP struct {
// contains filtered or unexported fields
}
func (*TCP) InitOutConnPool ¶
func (s *TCP) InitOutConnPool()
func (*TCP) InitService ¶
func (s *TCP) InitService()
func (*TCP) StopService ¶
func (s *TCP) StopService()
type TCPArgs ¶
type TunnelBridge ¶
type TunnelBridge struct {
// contains filtered or unexported fields
}
func (*TunnelBridge) Check ¶
func (s *TunnelBridge) Check()
func (*TunnelBridge) ChnDeamon ¶
func (s *TunnelBridge) ChnDeamon(item *BridgeItem)
func (*TunnelBridge) Clean ¶
func (s *TunnelBridge) Clean()
func (*TunnelBridge) ClientConn ¶
func (s *TunnelBridge) ClientConn(inConn *net.Conn, key string)
func (*TunnelBridge) ClientControlConn ¶
func (s *TunnelBridge) ClientControlConn(inConn *net.Conn, key string)
func (*TunnelBridge) ConnChn ¶
func (s *TunnelBridge) ConnChn(key string, typ uint8) (chn chan *net.Conn, item *BridgeItem)
func (*TunnelBridge) InitService ¶
func (s *TunnelBridge) InitService()
func (*TunnelBridge) ServerConn ¶
func (s *TunnelBridge) ServerConn(inConn *net.Conn, key string)
func (*TunnelBridge) Start ¶
func (s *TunnelBridge) Start(args interface{}) (err error)
func (*TunnelBridge) StopService ¶
func (s *TunnelBridge) StopService()
type TunnelBridgeArgs ¶
type TunnelClient ¶
type TunnelClient struct {
// contains filtered or unexported fields
}
func (*TunnelClient) Check ¶
func (s *TunnelClient) Check()
func (*TunnelClient) Clean ¶
func (s *TunnelClient) Clean()
func (*TunnelClient) GetInConn ¶
func (s *TunnelClient) GetInConn(typ uint8) (outConn net.Conn, err error)
func (*TunnelClient) InitService ¶
func (s *TunnelClient) InitService()
func (*TunnelClient) ServeConn ¶
func (s *TunnelClient) ServeConn()
func (*TunnelClient) ServeUDP ¶
func (s *TunnelClient) ServeUDP()
func (*TunnelClient) Start ¶
func (s *TunnelClient) Start(args interface{}) (err error)
func (*TunnelClient) StopService ¶
func (s *TunnelClient) StopService()
type TunnelServer ¶
type TunnelServer struct {
// contains filtered or unexported fields
}
func (*TunnelServer) Check ¶
func (s *TunnelServer) Check()
func (*TunnelServer) Clean ¶
func (s *TunnelServer) Clean()
func (*TunnelServer) GetOutConn ¶
func (s *TunnelServer) GetOutConn() (outConn net.Conn, err error)
func (*TunnelServer) InitService ¶
func (s *TunnelServer) InitService()
func (*TunnelServer) Start ¶
func (s *TunnelServer) Start(args interface{}) (err error)
func (*TunnelServer) StopService ¶
func (s *TunnelServer) StopService()
func (*TunnelServer) UDPConnDeamon ¶
func (s *TunnelServer) UDPConnDeamon()
type UDP ¶
type UDP struct {
// contains filtered or unexported fields
}
func (*UDP) InitOutConnPool ¶
func (s *UDP) InitOutConnPool()
func (*UDP) InitService ¶
func (s *UDP) InitService()
func (*UDP) StopService ¶
func (s *UDP) StopService()
Click to show internal directories.
Click to hide internal directories.