proxy

package
v0.2.82 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPortFromString

func GetPortFromString(portStr string) (int, error)

GetPortFromString parses a port from string and validates it

func IsPortAvailable

func IsPortAvailable(port int) bool

IsPortAvailable checks if a port is available

Types

type Manager

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

Manager handles proxy sessions

func NewManager

func NewManager() *Manager

NewManager creates a new proxy manager

func (*Manager) GetProxyStatus

func (m *Manager) GetProxyStatus(proxyID string) (*models.ProxyStatus, error)

GetProxyStatus returns the status of a proxy

func (*Manager) ListProxies

func (m *Manager) ListProxies() *models.ListProxiesResponse

ListProxies returns all active proxy sessions

func (*Manager) StartProxy

func (m *Manager) StartProxy(target models.ProxyTarget, localPort int, remoteHost string, remotePort int) (*models.ProxyResponse, error)

StartProxy starts a new proxy session

func (*Manager) StopAllProxies

func (m *Manager) StopAllProxies() error

StopAllProxies stops all active proxy sessions

func (*Manager) StopProxy

func (m *Manager) StopProxy(proxyID string) error

StopProxy stops a proxy session

type ProxySession

type ProxySession struct {
	ID          string
	Target      models.ProxyTarget
	LocalPort   int
	RemoteHost  string
	RemotePort  int
	Status      string
	StartedAt   time.Time
	BytesIn     int64
	BytesOut    int64
	Connections int
	// contains filtered or unexported fields
}

ProxySession represents an active proxy session

Jump to

Keyboard shortcuts

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