Versions in this module Expand all Collapse all v0 v0.2.1 Oct 29, 2026 Changes in this version type Capabilities + Conditional map[string]string + func ProbeCapabilities(c net.Conn) (Capabilities, error) type ConnCapabilities + SentErr error v0.2.0 Oct 29, 2026 v0.1.0 Oct 29, 2026 Changes in this version + const DefaultClientHelloTimeout + const DefaultMaxClientHelloRecords + const DefaultMaxClientHelloSize + const DefaultOOBByte + const DefaultQUICSNI + const MaxRandomCount + const MaxRandomRanges + var ErrAutoTTLUnobserved = errors.New("desync: auto TTL could not derive a TTL from the observed path") + var ErrAutoTTLUnsupported = errors.New("desync: auto TTL cannot observe the server's TTL here") + var ErrClientHelloTimeout error = &clientHelloTimeoutError + var ErrClientHelloTooLarge = errors.New("desync: ClientHello exceeds configured size limit") + var ErrDisorderUnsupported = errors.New("desync: disorder is not implemented on this platform") + var ErrFakeBusy = errors.New("desync: too many pending TCP fake operations") + var ErrFakeFirstPiece = errors.New(...) + var ErrFakeRequiresTCP = errors.New("desync: TCP fake requires a connection exposing SyscallConn") + var ErrFakeUnsupported = errors.New("desync: TCP fake is not implemented on this platform") + var ErrIncompleteClientHello = errors.New("desync: incomplete TLS ClientHello") + var ErrNotClientHello = errors.New("desync: not a TLS ClientHello") + var ErrOOBUnsupported = errors.New("desync: out-of-band data is not implemented on this platform") + var ErrSocketMethodRequiresTCP = errors.New("desync: disorder and OOB require a TCP connection exposing SyscallConn") + var ErrSplitWaitRequiresTCP = errors.New("desync: split wait requires a TCP connection exposing SyscallConn") + var ErrSplitWaitTimeout = errors.New("desync: split wait timed out") + var ErrSplitWaitUnsupported = errors.New("desync: split wait is not supported on this platform") + var ErrTooManyClientHelloRecords = errors.New("desync: ClientHello exceeds configured record limit") + var ErrUDPFakeRequiresSocket = errors.New("desync: UDP fake requires an unconnected UDP socket exposing SyscallConn") + var ErrUDPFakeUnsupported = errors.New("desync: UDP fake is not implemented on this platform") + func ControlAutoTTL(network, address string, c syscall.RawConn) error + func EstimateHops(ttl int) (int, bool) + func FragmentRecord(rec []byte, cuts []int) []byte + func QUICInitialPayload(sni string) ([]byte, error) + func SupportsFake() bool + func SupportsUDPFake() bool + func WrapConn(c net.Conn, opts Options) net.Conn + type AckCapability struct + Acked bool + Mechanism string + Reliable bool + Sent bool + func (a AckCapability) Supports(mode SplitWait) bool + type AckState struct + InFlight int64 + Sent int64 + Unacked int64 + Unsent int64 + type AutoTTL struct + Delta int + Max int + Min int + func (a AutoTTL) TTL(hops int) (int, bool) + func (a AutoTTL) Validate() error + type AutoTTLCapability struct + IPv4 bool + IPv6 bool + Mechanism string + type Capabilities struct + Ack AckCapability + AutoTTL AutoTTLCapability + Disorder DisorderCapability + FakeTCP bool + FakeUDP bool + OOB bool + OS string + TTLControl bool + Unsupported map[string]string + func PlatformCapabilities() Capabilities + type ClientHelloOptions struct + MaxRecords int + MaxSize int + Timeout time.Duration + type Conn struct + func (c *Conn) Close() error + func (c *Conn) FakeTTL() (ttl int, auto bool) + func (c *Conn) NetConn() net.Conn + func (c *Conn) Read(p []byte) (int, error) + func (c *Conn) SetDeadline(t time.Time) error + func (c *Conn) SetWriteDeadline(t time.Time) error + func (c *Conn) Write(p []byte) (int, error) + type ConnCapabilities struct + Ack AckCapability + AckErr error + State AckState + TTL int + TTLErr error + func ProbeConn(c net.Conn) (ConnCapabilities, error) + type DisorderCapability struct + Mechanism string + Observed bool + Reliable bool + Supported bool + type FakeOptions struct + AutoTTL *AutoTTL + FromOriginal bool + Offset int + Payload []byte + Prefix int + Randomize bool + SNI []string + TTL int + Timeout time.Duration + type Hello struct + RecordLen int + SNI string + SNIOffset int + func ParseHello(b []byte) (Hello, error) + type HopObservation struct + Hops int + TTL int + func ObserveHops(c net.Conn) (HopObservation, error) + type OOBOptions struct + Byte byte + type Options struct + ClientHello *ClientHelloOptions + Disorder bool + Fake *FakeOptions + OOB *OOBOptions + Random *RandomOptions + Split []Pos + SplitDelay time.Duration + SplitWait SplitWait + SplitWaitTimeout time.Duration + TLSRec []Pos + func FakeTTLCandidates(base Options, from, to int) ([]Options, error) + func (o Options) Enabled() bool + func (o Options) Key() string + func (o Options) Validate() error + type PacketConn struct + func WrapPacketConn(pc net.PacketConn, opts UDPOptions) (*PacketConn, error) + func (c *PacketConn) Close() error + func (c *PacketConn) Counters() UDPSnapshot + func (c *PacketConn) WriteTo(p []byte, addr net.Addr) (int, error) + type Pos struct + FromSNI bool + Offset int + func ParsePos(s string) (Pos, error) + func (p Pos) String() string + type RandomCut struct + Count int + From Pos + MinPiece int + To Pos + type RandomOptions struct + Seed uint64 + Split []RandomCut + TLSRec []RandomCut + type SplitWait uint8 + const SplitWaitAcked + const SplitWaitNone + const SplitWaitSent + func ParseSplitWait(s string) (SplitWait, error) + func (w SplitWait) String() string + type UDPCounters struct + func (c *UDPCounters) Snapshot() UDPSnapshot + type UDPOptions struct + Counters *UDPCounters + Packets int + Payload []byte + QUICOnly bool + Repeats int + SNI string + TTL int + Template UDPTemplate + func UDPTTLCandidates(base UDPOptions, from, to int) ([]UDPOptions, error) + func (o UDPOptions) Key() string + func (o UDPOptions) Validate() error + type UDPSnapshot struct + FakeErrors uint64 + FakePackets uint64 + Packets uint64 + Peers uint64 + type UDPTemplate int + const UDPTemplateQUICInitial + const UDPTemplateZero + func (t UDPTemplate) String() string