Documentation
¶
Index ¶
- func GetPortFromString(portStr string) (int, error)
- func IsPortAvailable(port int) bool
- type Manager
- func (m *Manager) GetProxyStatus(proxyID string) (*models.ProxyStatus, error)
- func (m *Manager) ListProxies() *models.ListProxiesResponse
- func (m *Manager) StartProxy(target models.ProxyTarget, localPort int, remoteHost string, remotePort int) (*models.ProxyResponse, error)
- func (m *Manager) StopAllProxies() error
- func (m *Manager) StopProxy(proxyID string) error
- type ProxySession
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetPortFromString ¶
GetPortFromString parses a port from string and validates it
func IsPortAvailable ¶
IsPortAvailable checks if a port is available
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager handles proxy sessions
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 ¶
StopAllProxies stops all active proxy sessions
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
Click to show internal directories.
Click to hide internal directories.