Expand description
The trivial open-op params, the wire-stable constants, and the
OperationSpec builder (wire.md §The Open Op; ADR-001, ADR-006).
This module is the crate’s wire surface (the one-way door): the op
id, the ALPN string, the two scope strings, and the trivial params
shape are frozen at first publish (ADR-001). The open-op params are
trivially empty: the SOCKS5 target is unknown at open time (it
arrives in-stream post-negotiation); the establisher is a session
gate, not a dial. The empty-object schema with
additionalProperties: false keeps {} valid forever: any future
per-session option is an additive schema extension (ADR-001’s
extension rule), so consumers that send {} stay valid.
All three RFC 1928 commands (CONNECT, BIND, UDP ASSOCIATE) ride the
one open op, selected in-stream at command dispatch (ADR-001); BIND
is scope-gated separately at that dispatch (SOCKS5_BIND_SCOPE,
ADR-006): the command is an RFC-1928 wire fact, not a wire-format
choice of ours.
The typed open-error vocabulary (crate::error::SocksOpenError,
the channel:open_failed reason mapping) lives in crate::error
(alkcall ADR-049 §4); the establishment-reason extraction helper is
re-exported here’s-error-shaped via establishment_reason.
Structs§
- Socks5
Params - The open-op input params (ADR-001): the trivial object. Wire-stable, since the shape is frozen (empty object, nothing else); a future per-session option is an additive schema extension, never a format change.
Constants§
- OP_
SOCK S5_ OPEN - The open-op operation id (the one SOCKS5 session op; ADR-001, flavor-form per alkcall ADR-047: openable ALPNs are operations). All three RFC 1928 commands ride this one op. Wire-stable.
- SOCK
S5_ ALPN - The data-plane ALPN the SOCKS5 channel carries (ADR-001; the
alk/prefix per the alkcall ADR-004 ALPN convention). One ALPN per protocol. Wire-stable. - SOCK
S5_ BIND_ SCOPE - The scope gating TCP BIND at command dispatch (ADR-006): the
inbound capability: ingress listeners. A separate grant from
SOCKS5_OPEN_SCOPE, never implied by it: an identity with proxy egress must not implicitly get ingress listeners. Checked in-stream at command read, from the per-call opener identity (CF-005/CF-006); a scope-less identity gets the RFC-faithfulConnectionNotAllowed(0x02) refusal while CONNECT still serves it. Stable once published. - SOCK
S5_ OPEN_ SCOPE - The scope gating SOCKS5 opens (ADR-006): proxy egress (CONNECT
and UDP ASSOCIATE). The scope-string convention
<alpn-family>:<capability>. Stable once published.
Functions§
- establishment_
reason - The typed open-failure reason of a
channel:open_failederror (alkcall ADR-049 §4): the consumer-side establishment-failure vocabulary.Nonefor any other failure shape (the registry’sFORBIDDEN,channel:too_many_channels, local-only failures). - socks5_
open_ spec - The open-op spec (
channels/socks5/sub, ADR-001/ADR-006):Sub-typed, external, channel-open marker on thealk/socks5ALPN, scope-gated bysocks5:open, trivial params.