portforward

package
v0.68.0 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2026 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

func NewManager

func NewManager() *Manager

func (*Manager) GetMapping

func (m *Manager) GetMapping() *Mapping

GetMapping returns the current mapping if ready, nil otherwise

func (*Manager) GracefullyStop

func (m *Manager) GracefullyStop(ctx context.Context) error

GracefullyStop cancels the manager and attempts to delete the port mapping. After GracefullyStop returns, the manager cannot be restarted.

func (*Manager) Start

func (m *Manager) Start(ctx context.Context, wgPort uint16)

type Mapping

type Mapping struct {
	Protocol     string
	InternalPort uint16
	ExternalPort uint16
	ExternalIP   net.IP
	NATType      string
}

type State

type State struct {
	InternalPort uint16 `json:"internal_port,omitempty"`
	Protocol     string `json:"protocol,omitempty"`
}

State is persisted only for crash recovery cleanup

func (*State) Cleanup

func (s *State) Cleanup() error

Cleanup implements statemanager.CleanableState for crash recovery

func (*State) Name

func (s *State) Name() string

Jump to

Keyboard shortcuts

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