Documentation ¶
Index ¶
- Constants
- func GetServerNameFromClientHello(c net.Conn) (string, []byte)
- func NewHttp(bridge *bridge.Bridge, c *file.Tunnel) *httpServer
- func ProcessHttp(c *conn.Conn, s *TunnelModeServer) error
- func ProcessTunnel(c *conn.Conn, s *TunnelModeServer) error
- type BaseServer
- type HttpsListener
- type HttpsServer
- type P2PServer
- type Service
- type Sock5ModeServer
- type TunnelModeServer
- type UdpModeServer
- type WebServer
Constants ¶
View Source
const (
UserPassAuth = uint8(2)
)
Variables ¶
This section is empty.
Functions ¶
func GetServerNameFromClientHello ¶ added in v0.21.0
Types ¶
type BaseServer ¶ added in v0.0.16
Server BaseServer struct
func NewBaseServer ¶ added in v0.0.16
func NewBaseServer(bridge *bridge.Bridge, task *file.Tunnel) *BaseServer
func (*BaseServer) CheckFlowAndConnNum ¶ added in v0.19.0
func (s *BaseServer) CheckFlowAndConnNum(client *file.Client) error
func (*BaseServer) DealClient ¶ added in v0.0.16
func (s *BaseServer) DealClient(c *conn.Conn, client *file.Client, addr string, rb []byte, tp string, f func(), flow *file.Flow) error
与客户端建立通道
func (*BaseServer) FlowAdd ¶ added in v0.0.16
func (s *BaseServer) FlowAdd(in, out int64)
func (*BaseServer) FlowAddHost ¶ added in v0.0.16
func (s *BaseServer) FlowAddHost(host *file.Host, in, out int64)
type HttpsListener ¶ added in v0.21.0
type HttpsListener struct {
// contains filtered or unexported fields
}
func NewHttpsListener ¶ added in v0.21.0
func NewHttpsListener(l net.Listener) *HttpsListener
func (*HttpsListener) Accept ¶ added in v0.21.0
func (httpsListener *HttpsListener) Accept() (net.Conn, error)
func (*HttpsListener) Addr ¶ added in v0.21.0
func (httpsListener *HttpsListener) Addr() net.Addr
func (*HttpsListener) Close ¶ added in v0.21.0
func (httpsListener *HttpsListener) Close() error
type HttpsServer ¶ added in v0.21.0
type HttpsServer struct {
// contains filtered or unexported fields
}
func NewHttpsServer ¶ added in v0.21.0
func NewHttpsServer(l net.Listener, bridge *bridge.Bridge) *HttpsServer
func (*HttpsServer) Close ¶ added in v0.21.0
func (https *HttpsServer) Close() error
func (*HttpsServer) NewHttps ¶ added in v0.21.0
func (https *HttpsServer) NewHttps(l net.Listener, certFile string, keyFile string)
func (*HttpsServer) Start ¶ added in v0.21.0
func (https *HttpsServer) Start() error
type P2PServer ¶ added in v0.18.0
type P2PServer struct { BaseServer // contains filtered or unexported fields }
func NewP2PServer ¶ added in v0.18.0
type Sock5ModeServer ¶
type Sock5ModeServer struct { BaseServer // contains filtered or unexported fields }
func NewSock5ModeServer ¶
func NewSock5ModeServer(bridge *bridge.Bridge, task *file.Tunnel) *Sock5ModeServer
new
type TunnelModeServer ¶
type TunnelModeServer struct { BaseServer // contains filtered or unexported fields }
func NewTunnelModeServer ¶
func NewTunnelModeServer(process process, bridge *bridge.Bridge, task *file.Tunnel) *TunnelModeServer
tcp|http|host
type UdpModeServer ¶
type UdpModeServer struct { BaseServer // contains filtered or unexported fields }
func NewUdpModeServer ¶
func NewUdpModeServer(bridge *bridge.Bridge, task *file.Tunnel) *UdpModeServer
func (*UdpModeServer) Close ¶
func (s *UdpModeServer) Close() error
Click to show internal directories.
Click to hide internal directories.