Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientTunnelData ¶
type ClientTunnelData struct { TunnelOn bool TunnelAddr string TunnelPorts []int Ping string // for udp tunnel EndPIP string EndPPort string EndPAPorts []int }
ClientTunnelData has all data about client's local tunnel status
type TunnelManager ¶
type TunnelManager struct { // keep list of clients and their tunnel infos TunClients map[string]ClientTunnelData // contains filtered or unexported fields }
Define the Tunnel Manager Struct
func NewTunnelManager ¶
func NewTunnelManager(l *zap.Logger) *TunnelManager
Initiallises a pointer to a new TunnelManager struct
func (*TunnelManager) AddClient ¶
func (m *TunnelManager) AddClient(Client, TunnelAddr string, TunnelPorts []int, EndPIP, EndPPort string, EndPAPorts []int, Ping string)
Allow client info to be populated by HPClient
func (*TunnelManager) CloseTunnel ¶
func (m *TunnelManager) CloseTunnel(Client string)
func (*TunnelManager) OpenTunnel ¶
func (m *TunnelManager) OpenTunnel(Self, SelfPort, Client string)
Commands
Click to show internal directories.
Click to hide internal directories.