Documentation
¶
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.SamizdatInboundOptions, ) (adapter.Inbound, error)
NewInbound creates a new Samizdat inbound adapter.
func NewOutbound ¶
func NewOutbound( ctx context.Context, router adapter.Router, logger log.ContextLogger, tag string, options option.SamizdatOutboundOptions, ) (adapter.Outbound, error)
NewOutbound creates a new Samizdat outbound adapter.
func RegisterInbound ¶
RegisterInbound registers the Samizdat inbound adapter with the given registry.
func RegisterOutbound ¶
RegisterOutbound registers the Samizdat outbound adapter with the given registry.
Types ¶
type Inbound ¶
Inbound represents a Samizdat inbound adapter.
func (*Inbound) Start ¶
func (i *Inbound) Start(stage adapter.StartStage) error
Start starts the Samizdat inbound server.
func (*Inbound) UpdateShortIDs ¶ added in v0.0.168
UpdateShortIDs replaces the short IDs the inbound accepts while it runs. Connections that authenticated with an ID the new set leaves out are closed. ids takes the form of the short_ids option and, like it, must not be empty. On error the accepted set is unchanged.
type Outbound ¶
Outbound represents a Samizdat 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 destination through the Samizdat proxy.
func (*Outbound) ListenPacket ¶
func (o *Outbound) ListenPacket(ctx context.Context, destination M.Socksaddr) (net.PacketConn, error)
ListenPacket creates a UoT packet connection through the Samizdat proxy.