Documentation
¶
Index ¶
Constants ¶
const ConnectOpType string = "connect"
ConnectOpType is the type ID for the connection operation.
Variables ¶
This section is empty.
Functions ¶
func ConnectErrors ¶ added in v0.4.4
ConnectErrors returns errors of connect operations. It only has a small and shared buffer and may only be used for indications, not for full monitoring.
func EnableConnecting ¶
EnableConnecting enables connecting from this Hub.
func HandleSluiceRequest ¶
func HandleSluiceRequest(connInfo *network.Connection, conn net.Conn)
HandleSluiceRequest handles a sluice request to build a tunnel.
Types ¶
type ConnectOp ¶
type ConnectOp struct {
terminal.OperationBase
// contains filtered or unexported fields
}
ConnectOp is used to connect data tunnels to servers on the Internet.
func NewConnectOp ¶
NewConnectOp starts a new connect operation.
func (*ConnectOp) HandleStop ¶ added in v0.6.0
HandleStop gives the operation the ability to cleanly shut down. The returned error is the error to send to the other side. Should never be called directly. Call Stop() instead.
type ConnectRequest ¶
type ConnectRequest struct {
Domain string `json:"d,omitempty"`
IP net.IP `json:"ip,omitempty"`
UsePriorityDataMsgs bool `json:"pr,omitempty"`
Protocol packet.IPProtocol `json:"p,omitempty"`
Port uint16 `json:"po,omitempty"`
QueueSize uint32 `json:"qs,omitempty"`
}
ConnectRequest holds all the information necessary for a connect operation.
func (*ConnectRequest) Address ¶
func (r *ConnectRequest) Address() string
Address returns the address of the connext request.
func (*ConnectRequest) String ¶
func (r *ConnectRequest) String() string
type Tunnel ¶
type Tunnel struct {
// contains filtered or unexported fields
}
Tunnel represents the local information and endpoint of a data tunnel.
type TunnelContext ¶ added in v0.3.5
type TunnelContext struct {
Path []*TunnelContextHop
PathCost float32
RoutingAlg string
// contains filtered or unexported fields
}
TunnelContext holds additional information about the tunnel to be added to a connection.
func (*TunnelContext) GetExitNodeID ¶ added in v0.4.13
func (tc *TunnelContext) GetExitNodeID() string
GetExitNodeID returns the ID of the exit node. It returns an empty string in case no path exists.
func (*TunnelContext) StopTunnel ¶ added in v0.5.2
func (tc *TunnelContext) StopTunnel() error
StopTunnel stops the tunnel.
type TunnelContextHop ¶ added in v0.3.5
type TunnelContextHop struct {
ID string
Name string
IPv4 *TunnelContextHopIPInfo `json:",omitempty"`
IPv6 *TunnelContextHopIPInfo `json:",omitempty"`
}
TunnelContextHop holds hop data for TunnelContext.