Documentation ¶
Index ¶
- Constants
- func Regist(name string, s Service, args interface{}, log *logger.Logger)
- func Stop(name string)
- type HTTP
- func (s *HTTP) CheckArgs() (err error)
- func (s *HTTP) Clean()
- func (s *HTTP) ConnectSSH() (err error)
- func (s *HTTP) InitBasicAuth() (err error)
- func (s *HTTP) InitOutConnPool()
- func (s *HTTP) InitService() (err error)
- 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 interface{})
- func (s *HTTP) Resolve(address string) string
- func (s *HTTP) Start(args interface{}, log *logger.Logger) (err error)
- func (s *HTTP) StopService()
- type HTTPArgs
- type MuxBridge
- type MuxBridgeArgs
- type MuxClient
- func (s *MuxClient) CheckArgs() (err error)
- func (s *MuxClient) Clean()
- func (s *MuxClient) InitService() (err error)
- func (s *MuxClient) ServeConn(inConn *smux.Stream, localAddr, ID string)
- func (s *MuxClient) ServeUDP(inConn *smux.Stream, localAddr, ID string)
- func (s *MuxClient) Start(args interface{}, log *logger.Logger) (err error)
- func (s *MuxClient) StopService()
- type MuxClientArgs
- type MuxServer
- func (s *MuxServer) CheckArgs() (err error)
- func (s *MuxServer) Clean()
- func (s *MuxServer) GetConn(index string) (conn net.Conn, err error)
- func (s *MuxServer) GetOutConn() (outConn net.Conn, ID string, err error)
- func (s *MuxServer) InitService() (err error)
- func (s *MuxServer) Start(args interface{}, log *logger.Logger) (err error)
- func (s *MuxServer) StopService()
- func (s *MuxServer) UDPConnDeamon()
- type MuxServerArgs
- type MuxServerManager
- type MuxUDPItem
- type SPS
- func (s *SPS) CheckArgs() (err error)
- func (s *SPS) Clean()
- func (s *SPS) InitBasicAuth() (err error)
- func (s *SPS) InitOutConnPool()
- func (s *SPS) InitService() (err error)
- func (s *SPS) IsBasicAuth() bool
- func (s *SPS) OutToTCP(inConn *net.Conn) (err error)
- func (s *SPS) Resolve(address string) string
- func (s *SPS) Start(args interface{}, log *logger.Logger) (err error)
- func (s *SPS) StopService()
- type SPSArgs
- type ServerConn
- type Service
- func NewHTTP() Service
- func NewMuxBridge() Service
- func NewMuxClient() Service
- func NewMuxServer() Service
- func NewMuxServerManager() Service
- func NewSPS() Service
- func NewSocks() Service
- func NewTCP() Service
- func NewTunnelBridge() Service
- func NewTunnelClient() Service
- func NewTunnelServer() Service
- func NewTunnelServerManager() Service
- func NewUDP() Service
- type ServiceItem
- type Socks
- func (s *Socks) CheckArgs() (err error)
- func (s *Socks) Clean()
- func (s *Socks) ConnectSSH() (err error)
- func (s *Socks) InitBasicAuth() (err error)
- func (s *Socks) InitService() (err error)
- func (s *Socks) IsBasicAuth() bool
- func (s *Socks) IsDeadLoop(inLocalAddr string, host string) bool
- func (s *Socks) Resolve(address string) string
- func (s *Socks) Start(args interface{}, log *logger.Logger) (err error)
- func (s *Socks) StopService()
- func (s *Socks) UDPKey() []byte
- type SocksArgs
- type TCP
- func (s *TCP) CheckArgs() (err error)
- func (s *TCP) Clean()
- func (s *TCP) InitOutConnPool()
- func (s *TCP) InitService() (err error)
- func (s *TCP) OutToTCP(inConn *net.Conn) (err error)
- func (s *TCP) OutToUDP(inConn *net.Conn) (err error)
- func (s *TCP) Start(args interface{}, log *logger.Logger) (err error)
- func (s *TCP) StopService()
- type TCPArgs
- type TunnelBridge
- type TunnelBridgeArgs
- type TunnelClient
- func (s *TunnelClient) CheckArgs() (err error)
- func (s *TunnelClient) Clean()
- func (s *TunnelClient) GetConn() (conn net.Conn, err error)
- func (s *TunnelClient) GetInConn(typ uint8, data ...string) (outConn net.Conn, err error)
- func (s *TunnelClient) InitService() (err error)
- func (s *TunnelClient) ServeConn(localAddr, ID, serverID string)
- func (s *TunnelClient) ServeUDP(localAddr, ID, serverID string)
- func (s *TunnelClient) Start(args interface{}, log *logger.Logger) (err error)
- func (s *TunnelClient) StopService()
- type TunnelClientArgs
- type TunnelServer
- func (s *TunnelServer) CheckArgs() (err error)
- func (s *TunnelServer) Clean()
- func (s *TunnelServer) GetConn() (conn net.Conn, err error)
- func (s *TunnelServer) GetOutConn(typ uint8) (outConn net.Conn, ID string, err error)
- func (s *TunnelServer) InitService() (err error)
- func (s *TunnelServer) Start(args interface{}, log *logger.Logger) (err error)
- func (s *TunnelServer) StopService()
- func (s *TunnelServer) UDPConnDeamon()
- type TunnelServerArgs
- type TunnelServerManager
- func (s *TunnelServerManager) CheckArgs() (err error)
- func (s *TunnelServerManager) Clean()
- func (s *TunnelServerManager) GetConn() (conn net.Conn, err error)
- func (s *TunnelServerManager) GetOutConn(typ uint8) (outConn net.Conn, ID string, err error)
- func (s *TunnelServerManager) InitService() (err error)
- func (s *TunnelServerManager) Start(args interface{}, log *logger.Logger) (err error)
- func (s *TunnelServerManager) StopService()
- type UDP
- func (s *UDP) CheckArgs() (err error)
- 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() (err error)
- 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{}, log *logger.Logger) (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" TYPE_KCP = "kcp" CONN_CLIENT_CONTROL = uint8(1) CONN_CLIENT_HEARBEAT = uint8(2) CONN_SERVER_HEARBEAT = uint8(3) CONN_SERVER = uint8(4) CONN_CLIENT = uint8(5) CONN_SERVER_MUX = uint8(6) CONN_CLIENT_MUX = uint8(7) )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type HTTP ¶
type HTTP struct {
// contains filtered or unexported fields
}
func (*HTTP) ConnectSSH ¶
func (*HTTP) InitBasicAuth ¶
func (*HTTP) InitOutConnPool ¶
func (s *HTTP) InitOutConnPool()
func (*HTTP) InitService ¶
func (*HTTP) IsBasicAuth ¶
func (*HTTP) StopService ¶
func (s *HTTP) StopService()
type HTTPArgs ¶
type HTTPArgs struct { Parent *string CertFile *string KeyFile *string CaCertFile *string CaCertBytes []byte CertBytes []byte KeyBytes []byte Local *string Always *bool HTTPTimeout *int Interval *int Blocked *string Direct *string AuthFile *string Auth *[]string AuthURL *string AuthURLOkCode *int AuthURLTimeout *int AuthURLRetry *int ParentType *string LocalType *string Timeout *int CheckParentInterval *int SSHKeyFile *string SSHKeyFileSalt *string SSHPassword *string SSHUser *string SSHKeyBytes []byte SSHAuthMethod ssh.AuthMethod KCP kcpcfg.KCPConfigArgs LocalIPS *[]string DNSAddress *string DNSTTL *int LocalKey *string ParentKey *string LocalCompress *bool ParentCompress *bool }
type MuxBridge ¶
type MuxBridge struct {
// contains filtered or unexported fields
}
func (*MuxBridge) InitService ¶
func (*MuxBridge) StopService ¶
func (s *MuxBridge) StopService()
type MuxBridgeArgs ¶
type MuxClient ¶
type MuxClient struct {
// contains filtered or unexported fields
}
func (*MuxClient) InitService ¶
func (*MuxClient) StopService ¶
func (s *MuxClient) StopService()
type MuxClientArgs ¶
type MuxServer ¶
type MuxServer struct {
// contains filtered or unexported fields
}
func (*MuxServer) GetOutConn ¶
func (*MuxServer) InitService ¶
func (*MuxServer) StopService ¶
func (s *MuxServer) StopService()
func (*MuxServer) UDPConnDeamon ¶
func (s *MuxServer) UDPConnDeamon()
type MuxServerArgs ¶
type MuxServerManager ¶
type MuxServerManager struct {
// contains filtered or unexported fields
}
func (*MuxServerManager) CheckArgs ¶
func (s *MuxServerManager) CheckArgs() (err error)
func (*MuxServerManager) Clean ¶
func (s *MuxServerManager) Clean()
func (*MuxServerManager) InitService ¶
func (s *MuxServerManager) InitService() (err error)
func (*MuxServerManager) Start ¶
func (s *MuxServerManager) Start(args interface{}, log *logger.Logger) (err error)
func (*MuxServerManager) StopService ¶
func (s *MuxServerManager) StopService()
type MuxUDPItem ¶
type MuxUDPItem struct {
// contains filtered or unexported fields
}
type SPS ¶
type SPS struct {
// contains filtered or unexported fields
}
func (*SPS) InitBasicAuth ¶
func (*SPS) InitOutConnPool ¶
func (s *SPS) InitOutConnPool()
func (*SPS) InitService ¶
func (*SPS) IsBasicAuth ¶
func (*SPS) StopService ¶
func (s *SPS) StopService()
type SPSArgs ¶
type SPSArgs struct { Parent *string CertFile *string KeyFile *string CaCertFile *string CaCertBytes []byte CertBytes []byte KeyBytes []byte Local *string ParentType *string LocalType *string Timeout *int KCP kcpcfg.KCPConfigArgs ParentServiceType *string DNSAddress *string DNSTTL *int AuthFile *string Auth *[]string AuthURL *string AuthURLOkCode *int AuthURLTimeout *int AuthURLRetry *int LocalIPS *[]string ParentAuth *string LocalKey *string ParentKey *string LocalCompress *bool ParentCompress *bool DisableHTTP *bool DisableSocks5 *bool }
type ServerConn ¶
type Service ¶
func NewMuxBridge ¶
func NewMuxBridge() Service
func NewMuxClient ¶
func NewMuxClient() Service
func NewMuxServer ¶
func NewMuxServer() Service
func NewMuxServerManager ¶
func NewMuxServerManager() Service
func NewTunnelBridge ¶
func NewTunnelBridge() Service
func NewTunnelClient ¶
func NewTunnelClient() Service
func NewTunnelServer ¶
func NewTunnelServer() Service
func NewTunnelServerManager ¶
func NewTunnelServerManager() Service
type ServiceItem ¶
func GetService ¶
func GetService(name string) *ServiceItem
func Run ¶
func Run(name string, args interface{}) (service *ServiceItem, err error)
type Socks ¶
type Socks struct {
// contains filtered or unexported fields
}
func (*Socks) ConnectSSH ¶
func (*Socks) InitBasicAuth ¶
func (*Socks) InitService ¶
func (*Socks) IsBasicAuth ¶
func (*Socks) StopService ¶
func (s *Socks) StopService()
type SocksArgs ¶
type SocksArgs struct { Parent *string ParentType *string Local *string LocalType *string CertFile *string KeyFile *string CaCertFile *string CaCertBytes []byte CertBytes []byte KeyBytes []byte SSHKeyFile *string SSHKeyFileSalt *string SSHPassword *string SSHUser *string SSHKeyBytes []byte SSHAuthMethod ssh.AuthMethod Timeout *int Always *bool Interval *int Blocked *string Direct *string AuthFile *string Auth *[]string AuthURL *string AuthURLOkCode *int AuthURLTimeout *int AuthURLRetry *int KCP kcpcfg.KCPConfigArgs UDPParent *string UDPLocal *string LocalIPS *[]string DNSAddress *string DNSTTL *int LocalKey *string ParentKey *string LocalCompress *bool ParentCompress *bool }
type TCP ¶
type TCP struct {
// contains filtered or unexported fields
}
func (*TCP) InitOutConnPool ¶
func (s *TCP) InitOutConnPool()
func (*TCP) InitService ¶
func (*TCP) StopService ¶
func (s *TCP) StopService()
type TCPArgs ¶
type TunnelBridge ¶
type TunnelBridge struct {
// contains filtered or unexported fields
}
func (*TunnelBridge) CheckArgs ¶
func (s *TunnelBridge) CheckArgs() (err error)
func (*TunnelBridge) Clean ¶
func (s *TunnelBridge) Clean()
func (*TunnelBridge) InitService ¶
func (s *TunnelBridge) InitService() (err error)
func (*TunnelBridge) Start ¶
func (s *TunnelBridge) Start(args interface{}, log *logger.Logger) (err error)
func (*TunnelBridge) StopService ¶
func (s *TunnelBridge) StopService()
type TunnelBridgeArgs ¶
type TunnelClient ¶
type TunnelClient struct {
// contains filtered or unexported fields
}
func (*TunnelClient) CheckArgs ¶
func (s *TunnelClient) CheckArgs() (err error)
func (*TunnelClient) Clean ¶
func (s *TunnelClient) Clean()
func (*TunnelClient) InitService ¶
func (s *TunnelClient) InitService() (err error)
func (*TunnelClient) ServeConn ¶
func (s *TunnelClient) ServeConn(localAddr, ID, serverID string)
func (*TunnelClient) ServeUDP ¶
func (s *TunnelClient) ServeUDP(localAddr, ID, serverID string)
func (*TunnelClient) Start ¶
func (s *TunnelClient) Start(args interface{}, log *logger.Logger) (err error)
func (*TunnelClient) StopService ¶
func (s *TunnelClient) StopService()
type TunnelClientArgs ¶
type TunnelServer ¶
type TunnelServer struct {
// contains filtered or unexported fields
}
func (*TunnelServer) CheckArgs ¶
func (s *TunnelServer) CheckArgs() (err error)
func (*TunnelServer) Clean ¶
func (s *TunnelServer) Clean()
func (*TunnelServer) GetOutConn ¶
func (*TunnelServer) InitService ¶
func (s *TunnelServer) InitService() (err error)
func (*TunnelServer) Start ¶
func (s *TunnelServer) Start(args interface{}, log *logger.Logger) (err error)
func (*TunnelServer) StopService ¶
func (s *TunnelServer) StopService()
func (*TunnelServer) UDPConnDeamon ¶
func (s *TunnelServer) UDPConnDeamon()
type TunnelServerArgs ¶
type TunnelServerManager ¶
type TunnelServerManager struct {
// contains filtered or unexported fields
}
func (*TunnelServerManager) CheckArgs ¶
func (s *TunnelServerManager) CheckArgs() (err error)
func (*TunnelServerManager) Clean ¶
func (s *TunnelServerManager) Clean()
func (*TunnelServerManager) GetConn ¶
func (s *TunnelServerManager) GetConn() (conn net.Conn, err error)
func (*TunnelServerManager) GetOutConn ¶
func (*TunnelServerManager) InitService ¶
func (s *TunnelServerManager) InitService() (err error)
func (*TunnelServerManager) Start ¶
func (s *TunnelServerManager) Start(args interface{}, log *logger.Logger) (err error)
func (*TunnelServerManager) StopService ¶
func (s *TunnelServerManager) StopService()
type UDP ¶
type UDP struct {
// contains filtered or unexported fields
}
func (*UDP) InitOutConnPool ¶
func (s *UDP) InitOutConnPool()
func (*UDP) InitService ¶
func (*UDP) StopService ¶
func (s *UDP) StopService()
Source Files ¶
Click to show internal directories.
Click to hide internal directories.