Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoTunnelSession = errors.New("no tunnel session")
Functions ¶
This section is empty.
Types ¶
type BaseVisitor ¶
type BaseVisitor struct {
// contains filtered or unexported fields
}
func (*BaseVisitor) AcceptConn ¶
func (v *BaseVisitor) AcceptConn(conn net.Conn) error
func (*BaseVisitor) Close ¶
func (v *BaseVisitor) Close()
type Helper ¶
type Helper interface {
// ConnectServer directly connects to the frp server.
ConnectServer() (net.Conn, error)
// TransferConn transfers the connection to another visitor.
TransferConn(string, net.Conn) error
// MsgTransporter returns the message transporter that is used to send and receive messages
// to the frp server through the controller.
MsgTransporter() transport.MessageTransporter
// RunID returns the run id of current controller.
RunID() string
}
Helper wraps some functions for visitor to use.
type KCPTunnelSession ¶
type KCPTunnelSession struct {
// contains filtered or unexported fields
}
func (*KCPTunnelSession) Close ¶
func (ks *KCPTunnelSession) Close()
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func (*Manager) TransferConn ¶
TransferConn transfers a connection to a visitor.
func (*Manager) UpdateAll ¶
func (vm *Manager) UpdateAll(cfgs []v1.VisitorConfigurer)
type QUICTunnelSession ¶
type QUICTunnelSession struct {
// contains filtered or unexported fields
}
func (*QUICTunnelSession) Close ¶
func (qs *QUICTunnelSession) Close()
type STCPVisitor ¶
type STCPVisitor struct {
*BaseVisitor
// contains filtered or unexported fields
}
func (*STCPVisitor) Close ¶
func (sv *STCPVisitor) Close()
func (*STCPVisitor) Run ¶
func (sv *STCPVisitor) Run() (err error)
type SUDPVisitor ¶
type SUDPVisitor struct {
*BaseVisitor
// contains filtered or unexported fields
}
func (*SUDPVisitor) Close ¶
func (sv *SUDPVisitor) Close()
type TunnelSession ¶
type TunnelSession interface {
Init(listenConn *net.UDPConn, raddr *net.UDPAddr) error
OpenConn(context.Context) (net.Conn, error)
Close()
}
func NewKCPTunnelSession ¶
func NewKCPTunnelSession() TunnelSession
func NewQUICTunnelSession ¶
func NewQUICTunnelSession(clientCfg *v1.ClientCommonConfig) TunnelSession
type Visitor ¶
Visitor is used for forward traffics from local port tot remote service.
func NewVisitor ¶
func NewVisitor( ctx context.Context, cfg v1.VisitorConfigurer, clientCfg *v1.ClientCommonConfig, helper Helper, ) (visitor Visitor)
type XTCPVisitor ¶
type XTCPVisitor struct {
*BaseVisitor
// contains filtered or unexported fields
}
func (*XTCPVisitor) Close ¶
func (sv *XTCPVisitor) Close()
func (*XTCPVisitor) Run ¶
func (sv *XTCPVisitor) Run() (err error)
Click to show internal directories.
Click to hide internal directories.