Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ListenAndServe ¶
ListenAndServe starts the SOCKS server.
func SetSSHConfigDefaults ¶
func SetSSHConfigDefaults(sshConfig *SSHConfig)
SetSSHConfigDefaults adds default values that can only be set at runtime.
Types ¶
type AppConfig ¶
type AppConfig struct { SSH SSHConfig LocalAddr string `envconfig:"SOCKS_ADDR" default:"127.0.0.1:1080"` }
AppConfig loads and saves config.
type CountingSSHClient ¶
func NewCountingSSHClient ¶
func NewCountingSSHClient(sshClient *ssh.Client) *CountingSSHClient
type EmptyResolver ¶
type EmptyResolver struct{}
type SSHConfig ¶
type SSHConfig struct { ServerAddr string `envconfig:"ADDR"` Username string `envconfig:"USER"` Password string `envconfig:"PASSWORD"` PublicKeys []string `envconfig:"PUBLIC_KEYS"` AgentAddr string `envconfig:"AGENT"` }
SSHConfig stores configuration for SSH client
func (SSHConfig) AuthMethods ¶
func (s SSHConfig) AuthMethods() ([]ssh.AuthMethod, error)
AuthMethods creates ssh.AuthMethod objects from current configuration.
func (SSHConfig) ClientConfig ¶
func (s SSHConfig) ClientConfig() (*ssh.ClientConfig, error)
ClientConfig creates ssh.ClientConfig object from current configuration.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.