Expand description
The onion privacy layer: its directory, route selection and loop data plane.
This module deliberately sits in rings-node, not rings-core: Chord
remains the storage and discovery substrate, while exit policy is an
application protocol decision.
The data plane runs client-sealed loops of fixed-width Sphinx cells (circuit, sphinx). A
loop evaluates a pipeline over the static signature Σ of operation symbols (signature):
every hop’s step interprets the identity symbol relay, and each node’s Σ-algebra interprets
the world-facing symbols it registers, as sessions (session) over their worlds (tcp,
https). Route selection places a pipeline on a guard-closed loop (loop_shape) whose every
position is a node registering that position’s symbol at its current process epoch.
Re-exports§
pub use circuit::OnionInvokeBackend;pub use circuit::OnionInvokeCall;pub use circuit::OnionInvokeFn;pub use invoke_descriptor::OnionInvokeDescriptor;pub use invoke_descriptor::OnionInvokeDescriptorBody;pub use invoke_descriptor::OnionInvokeDescriptorDecodeReport;pub use invoke_descriptor::OnionInvokePolicy;pub use invoke_descriptor::ONION_INVOKES_TOPIC;pub use pipeline::OnionInvokeArguments;pub use pipeline::OnionInvokePipeline;pub use pipeline::OnionInvokeStage;pub use pipeline::OnionPipeline;pub use pipeline::OnionPipelineError;pub use pipeline::OnionPipelineTerm;pub use pipeline::OnionValueType;pub use route::OnionPipelineRoute;pub use route::OnionPipelineRouteRequest;pub use route::OnionRoute;pub use route::OnionRouteHop;pub use route::OnionRouteRequest;pub use signature::OnionBackendName;pub use signature::OnionInputType;pub use signature::OnionInvokeShape;pub use signature::OnionLatencyClass;pub use signature::OnionServiceName;pub use signature::OnionShape;pub use signature::OnionWidthClass;pub use signature::ONION_BACKEND_NAME_MAX_BYTES;pub use target::OnionProxyTarget;pub use target::OnionProxyTargetError;pub use udp::NativeOnionUdpSession;pub use udp::OnionUdpBindConfig;pub use udp::OnionUdpBindMode;pub use udp::OnionUdpClientFrame;pub use udp::OnionUdpPinholeTable;pub use udp::OnionUdpServerFrame;
Modules§
- circuit
- The onion loop data plane (#834 Phase 2a, #843).
- https
https: one HTTPS request/response fetch over an onion session (#834 D1′, D2′).- invoke_
descriptor - Signed descriptors and DHT registration for intermediate
invokesymbols (#834 D1′, D2). - native
- The native handle of a node’s onion runtime:
tcpstreams,httpsrequests, and multi-stageinvokeKleisli pipelines over client-sealed loops. - pipeline
- Onion Kleisli pipelines: typed morphisms of the free category
Free(G_Σ)over the static signatureΣ(#834 D3, D4a, D4b, L1, L2, L3). - proxy
- Client-side onion proxy planning.
- route
- Onion route selection: guard-closed loops over registered symbols (#834 D2, D4, D5, L7).
- signature
- The onion signature
Σ: the static table of operation shape symbols a loop applies, and the open backend name alphabetΩ(#834 D1′, D2, D3). - target
- Target authority parsing shared by onion policy and proxy adapters.
- tcp
tcp: a byte stream over an onion session, native only (#834 D1′, D2′).- udp
udp: an unconnected OS UDP datagram session with stateful peer-IP pinholes (#1292).
Structs§
- Native
Onion Gateway Connector - Native connector that maps one captured target to one Rings Onion TCP stream.
- Onion
Entry Guard State - Serialized local entry-guard snapshot.
- Onion
Exit Descriptor - Signed descriptor published by onion exits.
- Onion
Exit Descriptor Body - Descriptor fields covered by the onion-exit signature.
- Onion
Exit Descriptor Decode Report - Result of decoding one onion-exit registry entry.
- Onion
Exit Offer - What an exit offers: a non-empty set of world-facing services under an open policy.
- Onion
Exit Policy - Signed policy fields for an onion exit.
- Onion
Exit Target - One entry of an onion exit policy: a pattern over target authorities.
- Onion
Invoke Offer - What a node offers for intermediate
invokeevaluation: a non-empty map from(shape, backend)pairs inΣ_I × Ωto their signedquota(n, f, ω)policies (#834 D2). - Onion
Loop - A loop whose relay positions carry a label
Pand whose symbol positions carry a labelT, the guard’s label stored once. - Onion
Loop Shape - The shape of a loop over
n ∈ [1, n_max]symbol applications. - Onion
Pipeline Handle - Cross-platform handle for registering intermediate
invokebackends and evaluating Kleisli pipelines on both native and browser nodes (#834 Phase 2b). - Onion
Process Epoch - Process epoch
e_nof one node process (#834 D2), drawn afresh at every process start. - Onion
Process Epoch Cell - The current process epoch
e_nof this node, shared by the onion admission state, which renews it, and the registrations, which publish it at every heartbeat (#834 D2, L9).
Enums§
- Onion
Exit Failure - Why an
httpsexit returned no response: the encoded failure of a fetch outcome. It carries no local diagnostic, so a failure reveals nothing of the exit beyond its class. - Onion
Loop Class - The class
bof one loop,16 KiB … 12 MiB(#834 D6, L3): every cell of the loop, replies included, is exactlybbytes. - Onion
Loop Role - The role of one position of a loop: a relay position (the guard included), or the symbol hop
hₖwith its indexk ∈ [1, n]. - Onion
Role - The registration role of one node process over
Σ = {relay} ⊎ Σ_I ⊎ Σ_W(#834 D2). - Onion
Route Error - Local route and session failure before any user-facing rendering.
Constants§
- MAX_
ONION_ LOOP_ HOPS - Largest number of positions of one loop,
H(n_max, s) = (s + 1)·n_max + s = 14, derived fromONION_SEGMENT_RELAYSandMAX_ONION_LOOP_SYMBOLS. - MAX_
ONION_ LOOP_ SYMBOLS - Largest number
n_maxof symbol applications in one pipeline (#834 D4a). - ONION_
EXITS_ TOPIC - DHT topic used for application-layer onion exit descriptors.
- ONION_
SEGMENT_ RELAYS - Number
sof relays in every segment of a loop, the guard counted in both end segments (D5).
Functions§
- default_
onion_ exit_ policy - Default exit policy. It is intentionally closed until the operator configures targets.
- default_
onion_ exit_ services - Default native exit services: the world-facing symbols of the onion signature, in table order. It is only published when onion-exit advertisement is enabled.
- https_
onion_ exit_ services - Standard HTTPS onion-exit service set: the single
httpssymbol of the onion signature.
Type Aliases§
- Onion
Entry Guard Storage - Local key-value storage for persisted onion entry guards.