Help us shape the future of Go! Take the 2026 Go Developer Survey

twiddle

package
v0.0.173 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 23, 2026 License: Apache-2.0 Imports: 28 Imported by: 0

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterInbound

func RegisterInbound(registry *inbound.Registry)

func RegisterOutbound

func RegisterOutbound(registry *outbound.Registry)

Types

type Inbound

type Inbound struct {
	inbound.Adapter
	// contains filtered or unexported fields
}

func (*Inbound) Close

func (i *Inbound) Close() error

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.

func (*Inbound) Start

func (i *Inbound) Start(stage adapter.StartStage) error

type Outbound

type Outbound struct {
	outbound.Adapter
	// contains filtered or unexported fields
}

func (*Outbound) Close

func (o *Outbound) Close() error

func (*Outbound) DialContext

func (o *Outbound) DialContext(ctx context.Context, network string, destination M.Socksaddr) (net.Conn, error)

func (*Outbound) ListenPacket

func (o *Outbound) ListenPacket(ctx context.Context, destination M.Socksaddr) (net.PacketConn, error)

func (*Outbound) Network

func (o *Outbound) Network() []string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL