Documentation
¶
Index ¶
- type Config
- type Tunnel
- func (t *Tunnel) Addr() net.Addr
- func (t *Tunnel) Close() error
- func (t *Tunnel) FromAddr() string
- func (t *Tunnel) IsClosed() bool
- func (t *Tunnel) SetAcceptAddrs(addrsRe *nkn.StringArray) error
- func (t *Tunnel) Start() error
- func (t *Tunnel) ToAddr() string
- func (t *Tunnel) TunaPubAddrs() *ts.PubAddrs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶ added in v0.2.1
type Config struct {
NumSubClients int
OriginalClient bool
AcceptAddrs *nkn.StringArray
ClientConfig *nkn.ClientConfig
WalletConfig *nkn.WalletConfig
TunaSessionConfig *ts.Config
Verbose bool
}
func DefaultConfig ¶ added in v0.2.1
func DefaultConfig() *Config
func MergedConfig ¶ added in v0.2.1
type Tunnel ¶
type Tunnel struct {
// contains filtered or unexported fields
}
Tunnel is the tunnel client struct.
func NewTunnel ¶
func NewTunnel(account *nkn.Account, identifier, from, to string, tuna bool, config *Config) (*Tunnel, error)
NewTunnel creates a Tunnel client with given options.
func (*Tunnel) SetAcceptAddrs ¶ added in v0.2.1
func (t *Tunnel) SetAcceptAddrs(addrsRe *nkn.StringArray) error
SetAcceptAddrs updates the accept address regex for incoming sessions. Tunnel will accept sessions from address that matches any of the given regular expressions. If addrsRe is nil, any address will be accepted. Each function call will overwrite previous accept addresses.
func (*Tunnel) TunaPubAddrs ¶ added in v0.3.0
TunaPubAddrs returns the public node info of tuna listeners. Returns nil if there is no tuna listener.
Click to show internal directories.
Click to hide internal directories.
