Documentation
¶
Overview ¶
Package twiddle adapts the twiddle transport to sing-box.
The transport itself lives in github.com/getlantern/twiddle and carries no sing-box dependency; this package is the thin layer that registers it, parses options and wires the dialer, following the samizdat and algeneva pattern rather than reflex's fully in-tree one.
Index ¶
- func NewInbound(ctx context.Context, router adapter.Router, lg log.ContextLogger, tag string, ...) (adapter.Inbound, error)
- func NewOutbound(ctx context.Context, router adapter.Router, lg log.ContextLogger, tag string, ...) (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 NewOutbound ¶
func RegisterInbound ¶
func RegisterOutbound ¶
Types ¶
type Inbound ¶
func (*Inbound) NewConnectionEx ¶
func (i *Inbound) NewConnectionEx(ctx context.Context, conn net.Conn, metadata adapter.InboundContext, onClose N.CloseHandlerFunc)
NewConnectionEx authenticates the opening, or hands the connection to the cover site.
twiddle answers a harvested ClientHello with a synthesised ServerHello, so it cannot complete a genuine handshake with a peer it does not recognise. Every unauthenticated connection therefore MUST reach a real server -- an active prober that gets anything else has confirmed the transport.