Documentation
¶
Index ¶
- Constants
- func HandleTrans(c *conn.Conn, s *TunnelModeServer) error
- func IsGlobalBlackIp(ipPort string) bool
- func ProcessHttp(c *conn.Conn, s *TunnelModeServer) error
- func ProcessMix(c *conn.Conn, s *TunnelModeServer) error
- func ProcessTunnel(c *conn.Conn, s *TunnelModeServer) error
- type BaseServer
- type Http3Server
- type HttpServer
- func (s *HttpServer) Close() error
- func (s *HttpServer) DialContext(ctx context.Context, network, addr string) (net.Conn, error)
- func (s *HttpServer) DialTlsContext(ctx context.Context, network, addr string) (net.Conn, error)
- func (s *HttpServer) NewServer(port int, scheme string) *http.Server
- func (s *HttpServer) Start() error
- type HttpsListener
- type HttpsServer
- type NetBridge
- type P2PServer
- type Service
- type TunnelModeServer
- type UdpModeServer
- type WebServer
Constants ¶
View Source
const (
UserPassAuth = uint8(2)
)
Variables ¶
This section is empty.
Functions ¶
func HandleTrans ¶
func HandleTrans(c *conn.Conn, s *TunnelModeServer) error
func IsGlobalBlackIp ¶
func ProcessMix ¶ added in v0.29.0
func ProcessMix(c *conn.Conn, s *TunnelModeServer) error
Types ¶
type BaseServer ¶
BaseServer struct
func NewBaseServer ¶
func NewBaseServer(bridge NetBridge, 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 (*BaseServer) FlowAddHost ¶
func (s *BaseServer) FlowAddHost(host *file.Host, in, out int64)
change the flow
type Http3Server ¶ added in v0.29.28
type Http3Server struct {
*HttpsServer
// contains filtered or unexported fields
}
func NewHttp3Server ¶ added in v0.29.28
func NewHttp3Server(httpsSrv *HttpsServer, udpConn net.PacketConn) *Http3Server
func (*Http3Server) Close ¶ added in v0.29.28
func (h3 *Http3Server) Close() error
func (*Http3Server) Start ¶ added in v0.29.28
func (h3 *Http3Server) Start() error
type HttpServer ¶ added in v0.29.28
type HttpServer struct {
BaseServer
// contains filtered or unexported fields
}
func NewHttp ¶
func NewHttp(bridge NetBridge, task *file.Tunnel, httpPort, httpsPort, http3Port int, httpOnlyPass string, addOrigin bool, httpProxyCache *index.AnyIntIndex) *HttpServer
func (*HttpServer) Close ¶ added in v0.29.28
func (s *HttpServer) Close() error
func (*HttpServer) DialContext ¶ added in v0.29.31
func (*HttpServer) DialTlsContext ¶ added in v0.29.31
func (*HttpServer) NewServer ¶ added in v0.29.28
func (s *HttpServer) NewServer(port int, scheme string) *http.Server
func (*HttpServer) Start ¶ added in v0.29.28
func (s *HttpServer) Start() error
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 {
HttpServer
// contains filtered or unexported fields
}
func NewHttpsServer ¶
func (*HttpsServer) Close ¶
func (https *HttpsServer) Close() error
func (*HttpsServer) Start ¶
func (https *HttpsServer) Start() error
type P2PServer ¶
type P2PServer struct {
BaseServer
// contains filtered or unexported fields
}
func NewP2PServer ¶
type TunnelModeServer ¶
type TunnelModeServer struct {
BaseServer
// contains filtered or unexported fields
}
func NewTunnelModeServer ¶
func NewTunnelModeServer(process process, bridge NetBridge, task *file.Tunnel) *TunnelModeServer
tcp|host|mixproxy
func (*TunnelModeServer) Auth ¶ added in v0.29.0
func (s *TunnelModeServer) Auth(c net.Conn) error
socks5 auth
func (*TunnelModeServer) Close ¶
func (s *TunnelModeServer) Close() error
func (*TunnelModeServer) Start ¶
func (s *TunnelModeServer) Start() error
type UdpModeServer ¶
type UdpModeServer struct {
BaseServer
// contains filtered or unexported fields
}
func NewUdpModeServer ¶
func NewUdpModeServer(bridge NetBridge, task *file.Tunnel) *UdpModeServer
func (*UdpModeServer) Close ¶
func (s *UdpModeServer) Close() error
func (*UdpModeServer) Start ¶
func (s *UdpModeServer) Start() error
Click to show internal directories.
Click to hide internal directories.