Documentation
¶
Overview ¶
Package masquerade implements the splitting egress: a connection that fails to authenticate is forwarded verbatim to a real cover site, which answers it.
For protocols that cannot complete a genuine handshake with an unauthenticated peer -- reflex, and twiddle, whose TLS opening is synthesised -- this is not an optional hardening. It is the only thing standing between an active prober and a distinguishing reply.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FirstRealError ¶
FirstRealError returns the first non-nil, non-EOF, non-closed-network error.
func Forward ¶
Blocks until both copy directions return. Returns the first non-EOF copy error, or the dial/replay error, or nil on clean close.
Blocks until both copy directions return. Returns the first non-EOF copy error, or the dial/replay error, or nil on clean close.
To unblock the copy loops on context cancellation and when either direction finishes, this function may close both the upstream connection and conn. Callers should treat conn as possibly-closed after return. Forward transparently forwards conn to upstream (host:port), prepending any prefix bytes already consumed from conn.
Types ¶
This section is empty.