Documentation
¶
Index ¶
- Constants
- func HandleTrans(c *conn.Conn, s *TunnelModeServer) error
- func IsGlobalBlackIp(ipPort string) bool
- func NewHttp(bridge *bridge.Bridge, task *file.Tunnel, httpPort, httpsPort int, ...) *httpServer
- func ProcessHttp(c *conn.Conn, s *TunnelModeServer) error
- func ProcessTunnel(c *conn.Conn, s *TunnelModeServer) error
- type BaseServer
- type HttpsEntry
- type HttpsListener
- type HttpsServer
- type NetBridge
- type P2PServer
- type Service
- type Sock5ModeServer
- type TunnelModeServer
- type UdpModeServer
- type WebServer
Constants ¶
View Source
const SO_ORIGINAL_DST = 80
View Source
const (
UserPassAuth = uint8(2)
)
Variables ¶
This section is empty.
Functions ¶
func HandleTrans ¶
func HandleTrans(c *conn.Conn, s *TunnelModeServer) error
Types ¶
type BaseServer ¶
BaseServer struct
func NewBaseServer ¶
func NewBaseServer(bridge *bridge.Bridge, task *file.Tunnel) *BaseServer
func (*BaseServer) CheckFlowAndConnNum ¶
func (s *BaseServer) CheckFlowAndConnNum(client *file.Client) error
check flow limit of the client ,and decrease the allow num of client
func (*BaseServer) DealClient ¶
func (s *BaseServer) DealClient(c *conn.Conn, client *file.Client, addr string, rb []byte, tp string, f func(), flow *file.Flow, proxyProtocol int, localProxy bool, task *file.Tunnel) error
处理客户端连接
func (*BaseServer) FlowAddHost ¶
func (s *BaseServer) FlowAddHost(host *file.Host, in, out int64)
change the flow
type HttpsEntry ¶
type HttpsEntry struct {
Listener *HttpsListener
CertContent string
KeyContent string
}
type HttpsListener ¶
type HttpsListener struct {
// contains filtered or unexported fields
}
HttpsListener wraps a parent listener.
func NewHttpsListener ¶
func NewHttpsListener(l net.Listener) *HttpsListener
func (*HttpsListener) Addr ¶
func (httpsListener *HttpsListener) Addr() net.Addr
func (*HttpsListener) Close ¶
func (httpsListener *HttpsListener) Close() error
type HttpsServer ¶
type HttpsServer struct {
// contains filtered or unexported fields
}
func NewHttpsServer ¶
func (*HttpsServer) Close ¶
func (https *HttpsServer) Close() error
func (*HttpsServer) NewHttps ¶
func (https *HttpsServer) NewHttps(l net.Listener, certText string, keyText string)
func (*HttpsServer) Start ¶
func (https *HttpsServer) Start() error
type P2PServer ¶
type P2PServer struct {
BaseServer
// contains filtered or unexported fields
}
func NewP2PServer ¶
type Sock5ModeServer ¶
type Sock5ModeServer struct {
BaseServer
// contains filtered or unexported fields
}
func NewSock5ModeServer ¶
func NewSock5ModeServer(bridge NetBridge, task *file.Tunnel) *Sock5ModeServer
new
type TunnelModeServer ¶
type TunnelModeServer struct {
BaseServer
// contains filtered or unexported fields
}
func NewTunnelModeServer ¶
func NewTunnelModeServer(process process, bridge NetBridge, 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.