Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrOperationTimeout = errors.New("operation timed out")
ErrOperationTimeout indicates that an operation (such as waiting for an ack) timed out fatally.
var ErrProtocolFail = errors.New("protocol failure")
ErrProtocolFail indicates a fatal protocol failure.
var ErrWatchdogTimeout = errors.New("watchdog timed out")
ErrWatchdogTimeout indicates that the watchdog timed out fatally.
Functions ¶
This section is empty.
Types ¶
type Listener ¶
type Listener struct {
// contains filtered or unexported fields
}
Listener is a niaucchi listener.
func Listen ¶
Listen returns a niaucchi listener. If the given obfuscation cookie is nil, the unobfuscated protocol will be used.
func (*Listener) AcceptSubstrate ¶
AcceptSubstrate accepts a new client.
type Substrate ¶
type Substrate struct {
// contains filtered or unexported fields
}
Substrate represents a pool of connections over which carried connections are multiplexed.
func DialSubstrate ¶
func DialSubstrate(ocookie []byte, ourSK natrium.ECDHPrivate, theirPK natrium.ECDHPublic, addr string, mult int) (ss *Substrate, err error)
DialSubstrate dials to the given destination and returns a substrate. A nil obfuscation cookie means the unobfuscated protocol would be used.
func NewSubstrate ¶
NewSubstrate creates a Substrate from the given connections.
func (*Substrate) AcceptConn ¶
AcceptConn accepts a new tunneled connection over the substrate.