Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrTunnelNotReady = errors.New("tunnel is not yet established")
ErrTunnelNotReady is returned when an application tries to send data through a session that does not have an established tunnel connection yet.
ErrUnauthorizedKey is returned when a key is not authorized.
ErrUnauthorizedPort is returned when a key is not allowed to bind to a requested port.
Functions ¶
This section is empty.
Types ¶
type Binder ¶
type Binder struct {
// contains filtered or unexported fields
}
Binder implements service.Binder for UDP tunneling service.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service implements service.Service for UDP tunneling service.
func NewService ¶
NewService creates a udp.Service with given server configuration.
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
Session implements service.Session for UDP tunneling.
func NewSession ¶
NewSession creates a Session for tunneling UDP packets from/to given peer.
func (*Session) SendToAgent ¶
SendToAgent sends msg to the other end of the tunnel if tunnel is ready. Calling this function resets internal idle counter.
func (*Session) SendToClient ¶
SendToClient sends msg to UDP client. Calling this function resets internal idle counter.