Documentation
¶
Index ¶
- Variables
- func IsReplay(key string) bool
- func SetClientSelectMode(v any) error
- type Bridge
- func (s *Bridge) CliProcess(c *conn.Conn, tunnelType string)
- func (s *Bridge) DelClient(id int)
- func (s *Bridge) GetHealthFromClient(id int, c *conn.Conn, client *Client, node *Node)
- func (s *Bridge) IsServer() bool
- func (s *Bridge) SendLinkInfo(clientId int, link *conn.Link, t *file.Tunnel) (target net.Conn, err error)
- func (s *Bridge) StartTunnel() error
- type Client
- func (c *Client) AddFile(key, uuid string) error
- func (c *Client) AddNode(n *Node)
- func (c *Client) CheckNode() *Node
- func (c *Client) Close() error
- func (c *Client) GetNode() *Node
- func (c *Client) GetNodeByFile(key string) (*Node, bool)
- func (c *Client) GetNodeByUUID(uuid string) (*Node, bool)
- func (c *Client) IsClosed() bool
- func (c *Client) NodeCount() int
- func (c *Client) RemoveFile(key string)
- func (c *Client) RemoveOfflineNodes() (removed int)
- type IdleTimer
- type Node
- func (n *Node) AddNode(node *Node)
- func (n *Node) AddSignal(signal *conn.Conn)
- func (n *Node) AddTunnel(tunnel any)
- func (n *Node) Close() error
- func (n *Node) GetSignal() *conn.Conn
- func (n *Node) GetTunnel() any
- func (n *Node) IsOffline() bool
- func (n *Node) IsOnline() bool
- func (n *Node) IsTunnelClosed() bool
- func (n *Node) Retry() bool
- type SelectMode
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ServerTcpEnable = false ServerKcpEnable = false ServerQuicEnable = false ServerTlsEnable = false ServerWsEnable = false ServerWssEnable = false ServerSecureMode = false )
View Source
var ClientSelectMode = Primary
Functions ¶
func SetClientSelectMode ¶ added in v0.33.12
Types ¶
type Bridge ¶
type Bridge struct {
TunnelPort int
Client *sync.Map
Register *sync.Map
VirtualTcpListener *conn.VirtualListener
VirtualTlsListener *conn.VirtualListener
VirtualWsListener *conn.VirtualListener
VirtualWssListener *conn.VirtualListener
OpenHost chan *file.Host
OpenTask chan *file.Tunnel
CloseTask chan *file.Tunnel
CloseClient chan int
SecretChan chan *conn.Secret
// contains filtered or unexported fields
}
func (*Bridge) CliProcess ¶ added in v0.33.12
func (*Bridge) GetHealthFromClient ¶
GetHealthFromClient get health information form client
func (*Bridge) SendLinkInfo ¶
func (*Bridge) StartTunnel ¶
type Client ¶
func (*Client) GetNodeByFile ¶ added in v0.33.12
func (*Client) GetNodeByUUID ¶ added in v0.33.12
func (*Client) RemoveFile ¶ added in v0.33.12
func (*Client) RemoveOfflineNodes ¶ added in v0.33.12
type IdleTimer ¶ added in v0.33.12
type IdleTimer struct {
// contains filtered or unexported fields
}
func NewIdleTimer ¶ added in v0.33.12
type Node ¶ added in v0.33.12
type Node struct {
Client *Client
UUID string
Version string
BaseVer int
// contains filtered or unexported fields
}
func (*Node) IsTunnelClosed ¶ added in v0.33.12
type SelectMode ¶ added in v0.33.12
type SelectMode int32
const ( Primary SelectMode = iota RoundRobin Random )
Click to show internal directories.
Click to hide internal directories.