Documentation
¶
Rendered for js/wasm
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var BackendState = map[ipn.State]string{ ipn.NoState: "NoState", ipn.Stopped: "Stopped", ipn.Starting: "Starting", ipn.Running: "Running", ipn.InUseOtherUser: "InUseOtherUser", ipn.NeedsMachineAuth: "NeedsMachineAuth", ipn.NeedsLogin: "NeedsLogin", }
Functions ¶
This section is empty.
Types ¶
type IPNCallbacks ¶ added in v0.7.0
type IPNCallbacks struct {
OnReady func()
OnError func(string)
}
func ParseIPNCallbacks ¶ added in v0.7.0
func ParseIPNCallbacks(obj js.Value) *IPNCallbacks
type SSHSession ¶
type SSHSession struct {
IPAddress string
Username string
Config *TunnelConfig
Ipn *TsWasmIpn
Pty *ssh.Session
// contains filtered or unexported fields
}
func (*SSHSession) Close ¶
func (s *SSHSession) Close() error
func (*SSHSession) ConnectAndRun ¶
func (s *SSHSession) ConnectAndRun()
func (*SSHSession) Resize ¶
func (s *SSHSession) Resize(cols, rows int) error
Resize takes cols and rows (JS convention: cols first, rows second) and translates to SSH's WindowChange(rows, cols) order.
func (*SSHSession) WriteInput ¶ added in v0.7.0
func (s *SSHSession) WriteInput(data string)
type TsWasmIpn ¶
type TsWasmIpn struct {
// contains filtered or unexported fields
}
func NewTsWasmIpn ¶
func NewTsWasmIpn(options *IPNConfig, callbacks *IPNCallbacks) (*TsWasmIpn, error)
func (*TsWasmIpn) NewSSHSession ¶
func (i *TsWasmIpn) NewSSHSession(config *TunnelConfig) *SSHSession
type TunnelConfig ¶ added in v0.7.0
type TunnelConfig struct {
IPAddress string
Username string
Timeout int
OnData func(data string)
OnConnect func()
OnDisconnect func()
}
func ParseTunnelConfig ¶ added in v0.7.0
func ParseTunnelConfig(obj js.Value) (*TunnelConfig, error)
Click to show internal directories.
Click to hide internal directories.