tunnelman

package module
v0.0.0-...-32e3e1b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 10, 2024 License: MIT Imports: 9 Imported by: 2

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

func (*TunnelManager) Run

func (m *TunnelManager) Run() error

Main logic

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL