Documentation
¶
Index ¶
- type Manager
- type SSHConnection
- func (c *SSHConnection) Close() error
- func (c *SSHConnection) GetClient() *ssh.Client
- func (c *SSHConnection) GetHost() string
- func (c *SSHConnection) GetLocalPort() int
- func (c *SSHConnection) GetRemotePort() int
- func (c *SSHConnection) GetUsername() string
- func (c *SSHConnection) IsCloseFlag() bool
- func (c *SSHConnection) IsConnected() bool
- func (c *SSHConnection) OpenSSHTunnel() error
- func (c *SSHConnection) SetKnownHost() error
- func (c *SSHConnection) SetProxyInfo(username, password, host string, rport, lport int, rsaKey string, ...)
- type SSHConnectionStatus
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
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) GetClient ¶
func (c *SSHConnection) GetClient() *ssh.Client
GetClient returns the SSH client (for testing)
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" )