Documentation ¶
Index ¶
- type TunnelForwarder
- func (c *TunnelForwarder) InitUserAuth(user, password string) (*ssh.ClientConfig, error)
- func (c *TunnelForwarder) LocalHost() string
- func (c *TunnelForwarder) LocalPort() int
- func (c *TunnelForwarder) ParseFromDSN(DSN string) error
- func (c *TunnelForwarder) ParsePrivateKey(keyPath string) (ssh.Signer, error)
- func (c *TunnelForwarder) PrivateKeyPath() string
- func (c *TunnelForwarder) Start() error
- func (c *TunnelForwarder) Stop()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TunnelForwarder ¶
type TunnelForwarder struct { Host string `property:"Host"` Port int `property:"Port"` User string `property:"User"` Password string `property:"Password,category:password"` RemoteHost string `property:"Remote Host"` RemotePort int `property:"Remote Port"` PrivateKey string `property:"Private Key"` // contains filtered or unexported fields }
TunnelForwarder ssh tunnel
func NewSSHTunnel ¶
func NewSSHTunnel(dsn string, remoteHost string, remotePort int) (*TunnelForwarder, error)
NewSSHTunnel TunnelForwarder
func (*TunnelForwarder) InitUserAuth ¶
func (c *TunnelForwarder) InitUserAuth(user, password string) (*ssh.ClientConfig, error)
InitUserAuth init with user and password
func (*TunnelForwarder) LocalHost ¶
func (c *TunnelForwarder) LocalHost() string
LocalHost get local tunnel host
func (*TunnelForwarder) LocalPort ¶
func (c *TunnelForwarder) LocalPort() int
LocalPort get local tunnel listen port
func (*TunnelForwarder) ParseFromDSN ¶
func (c *TunnelForwarder) ParseFromDSN(DSN string) error
ParseFromDSN parse
func (*TunnelForwarder) ParsePrivateKey ¶
func (c *TunnelForwarder) ParsePrivateKey(keyPath string) (ssh.Signer, error)
ParsePrivateKey parse private key
func (*TunnelForwarder) PrivateKeyPath ¶
func (c *TunnelForwarder) PrivateKeyPath() string
PrivateKeyPath getter
Click to show internal directories.
Click to hide internal directories.