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
- func (s *BaseServer) Auth(r *http.Request, c *conn.Conn, u, p string, ...) error
- func (s *BaseServer) CheckFlowAndConnNum(client *file.Client) error
- func (s *BaseServer) DealClient(c *conn.Conn, client *file.Client, addr string, rb []byte, tp string, f func(), ...) error
- func (s *BaseServer) FlowAdd(in, out int64)
- func (s *BaseServer) FlowAddHost(host *file.Host, in, out int64)
- type NetBridge
- type P2PServer
- type SecretServer
- type Service
- type TunnelModeServer
- type UdpModeServer
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 ¶
func ProcessMix(c *conn.Conn, s *TunnelModeServer) error
func ProcessTunnel ¶
func ProcessTunnel(c *conn.Conn, s *TunnelModeServer) error
ProcessTunnel tcp proxy
Types ¶
type BaseServer ¶
type BaseServer struct {
Id int
Bridge NetBridge
Task *file.Tunnel
ErrorContent []byte
AllowLocalProxy bool
sync.Mutex
}
BaseServer struct
func NewBaseServer ¶
func NewBaseServer(bridge NetBridge, task *file.Tunnel, allowLocalProxy bool) *BaseServer
func (*BaseServer) Auth ¶ added in v0.33.12
func (s *BaseServer) Auth(r *http.Request, c *conn.Conn, u, p string, multiAccount, userAuth *file.MultiAccount) error
Auth check
func (*BaseServer) CheckFlowAndConnNum ¶
func (s *BaseServer) CheckFlowAndConnNum(client *file.Client) error
CheckFlowAndConnNum check flow limit of the client ,and decrease the allowed num of client
func (*BaseServer) DealClient ¶
func (*BaseServer) FlowAddHost ¶
func (s *BaseServer) FlowAddHost(host *file.Host, in, out int64)
FlowAddHost change the flow
type P2PServer ¶
type P2PServer struct {
*BaseServer
// contains filtered or unexported fields
}
func NewP2PServer ¶
type SecretServer ¶ added in v0.33.12
type SecretServer struct {
*BaseServer
// contains filtered or unexported fields
}
func NewSecretServer ¶ added in v0.33.12
func NewSecretServer(bridge NetBridge, task *file.Tunnel, allowLocalProxy, allowSecretLink, allowSecretLocal bool) *SecretServer
func (*SecretServer) HandleSecret ¶ added in v0.33.12
func (s *SecretServer) HandleSecret(src net.Conn) error
type TunnelModeServer ¶
type TunnelModeServer struct {
*BaseServer
// contains filtered or unexported fields
}
func NewTunnelModeServer ¶
func NewTunnelModeServer(process process, bridge NetBridge, task *file.Tunnel, allowLocalProxy bool) *TunnelModeServer
NewTunnelModeServer tcp|host|mixproxy
func (*TunnelModeServer) Close ¶
func (s *TunnelModeServer) Close() error
func (*TunnelModeServer) DialVirtual ¶ added in v0.33.12
func (s *TunnelModeServer) DialVirtual(rAddr string) (net.Conn, error)
func (*TunnelModeServer) ServeVirtual ¶ added in v0.33.12
func (s *TunnelModeServer) ServeVirtual(c net.Conn)
func (*TunnelModeServer) SocksAuth ¶ added in v0.33.12
func (s *TunnelModeServer) SocksAuth(c net.Conn) 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, allowLocalProxy bool) *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.