Documentation
¶
Overview ¶
Package water implements the WATER protocol inbound/outbound. You can find more info about the protocol here: https://github.com/refraction-networking/water
Index ¶
- func NewInbound(ctx context.Context, router adapter.Router, logger log.ContextLogger, ...) (adapter.Inbound, error)
- func NewOutbound(ctx context.Context, router adapter.Router, logger log.ContextLogger, ...) (adapter.Outbound, error)
- func RegisterInbound(registry *inbound.Registry)
- func RegisterOutbound(registry *outbound.Registry)
- type Inbound
- type Outbound
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewInbound ¶
func NewInbound(ctx context.Context, router adapter.Router, logger log.ContextLogger, tag string, options option.WATERInboundOptions) (adapter.Inbound, error)
NewInbound creates a new WATER inbound adapter.
func NewOutbound ¶
func NewOutbound(ctx context.Context, router adapter.Router, logger log.ContextLogger, tag string, options option.WATEROutboundOptions) (adapter.Outbound, error)
NewOutbound creates a new WATER outbound adapter.
func RegisterInbound ¶
RegisterInbound registers the WATER inbound with the given registry.
func RegisterOutbound ¶
RegisterOutbound registers the WATER outbound adapter with the given registry.
Types ¶
type Outbound ¶
Outbound represents a WATER outbound adapter.
func (*Outbound) DialContext ¶
func (o *Outbound) DialContext(ctx context.Context, network string, destination M.Socksaddr) (net.Conn, error)
DialContext dials a connection to the specified network and destination.
func (*Outbound) ListenPacket ¶
func (o *Outbound) ListenPacket(ctx context.Context, destination M.Socksaddr) (net.PacketConn, error)
ListenPacket creates a UoT packet connection through the WATER transport.
Click to show internal directories.
Click to hide internal directories.