proxy

package
v1.0.2-rc.1 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2026 License: EPL-2.0 Imports: 11 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
}

Manager manages SSH proxy connections

func GetInstance

func GetInstance() *Manager

GetInstance returns the singleton SSH Proxy Manager instance

func (*Manager) Update

func (m *Manager) Update(config map[string]any) error

Update starts or stops SSH tunnel according to current config

type SSHConnection

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

SSHConnection represents an SSH connection for tunneling

func NewSSHConnection

func NewSSHConnection() *SSHConnection

NewSSHConnection creates a new SSH connection

func (*SSHConnection) Close

func (c *SSHConnection) Close() error

Close closes the SSH connection

func (*SSHConnection) GetClient

func (c *SSHConnection) GetClient() *ssh.Client

GetClient returns the SSH client (for testing)

func (*SSHConnection) GetHost

func (c *SSHConnection) GetHost() string

GetHost returns the host

func (*SSHConnection) GetLocalPort

func (c *SSHConnection) GetLocalPort() int

GetLocalPort returns the local port

func (*SSHConnection) GetRemotePort

func (c *SSHConnection) GetRemotePort() int

GetRemotePort returns the remote port

func (*SSHConnection) GetUsername

func (c *SSHConnection) GetUsername() string

GetUsername returns the username

func (*SSHConnection) IsCloseFlag

func (c *SSHConnection) IsCloseFlag() bool

IsCloseFlag returns the close flag

func (*SSHConnection) IsConnected

func (c *SSHConnection) IsConnected() bool

IsConnected checks if the tunnel is open

func (*SSHConnection) OpenSSHTunnel

func (c *SSHConnection) OpenSSHTunnel() error

OpenSSHTunnel opens an SSH tunnel (reverse port forwarding)

func (*SSHConnection) SetKnownHost

func (c *SSHConnection) SetKnownHost() error

SetKnownHost sets the known hosts from RSA key

func (*SSHConnection) SetProxyInfo

func (c *SSHConnection) SetProxyInfo(username, password, host string, rport, lport int, rsaKey string, closeFlag bool)

SetProxyInfo sets connection information

type SSHConnectionStatus

type SSHConnectionStatus string

SSHConnectionStatus represents SSH connection status

const (
	SSHConnectionStatusOpen   SSHConnectionStatus = "OPEN"
	SSHConnectionStatusClosed SSHConnectionStatus = "CLOSED"
	SSHConnectionStatusFailed SSHConnectionStatus = "FAILED"
)

Jump to

Keyboard shortcuts

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