cion

module
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: Apache-2.0

README

CION

Non-scalable SCION

CION is a lightweight, single-binary implementation of the SCION Internet architecture, designed specifically for multi-operator environments with a "one node per Autonomous System (AS)" topology.

Goal

The primary goal of CION is to provide a simplified, "almost zero config" network solution that enables:

  • Operator Sovereignty: Operators retain absolute control over traffic transit rules and path sharing.
  • Path Awareness: Clients can dynamically select routing paths based on latency, geography, or other metrics without network-side configuration changes.
  • Operational Simplicity: A collapsed architecture that combines standard SCION components (Border Router, Control Service, Dispatcher) into a single, easy-to-deploy binary.

Note: CION does not target internal AS scalability. It is optimized for scenarios where a single node handles the routing for an entire AS.

Directories

Path Synopsis
cmd
cion command
Command cion runs a CION node: a SCION router with a collapsed data plane for a one-node AS.
Command cion runs a CION node: a SCION router with a collapsed data plane for a one-node AS.
internal
dbtest
Package dbtest holds the database contract suites' file-backed adapter: the one Prepare and Reopen shape every bbolt store the suites drive shares, whatever module's store it opens.
Package dbtest holds the database contract suites' file-backed adapter: the one Prepare and Reopen shape every bbolt store the suites drive shares, whatever module's store it opens.
passkeytest
Package passkeytest is a software passkey for tests: it answers a relying party's creation and request options the way a browser driving a platform authenticator does, with one ES256 key, so a test runs real WebAuthn ceremonies without a browser.
Package passkeytest is a software passkey for tests: it answers a relying party's creation and request options the way a browser driving a platform authenticator does, with one ES256 key, so a test runs real WebAuthn ceremonies without a browser.
services
Package services assembles the CION node's services — the data plane generations, the control plane, the topology provider the run arguments load, and the resident applications — from the node's run arguments and the state directory, where the first start generates the identity.
Package services assembles the CION node's services — the data plane generations, the control plane, the topology provider the run arguments load, and the resident applications — from the node's run arguments and the state directory, where the first start generates the identity.
socksclient
Package socksclient is the minimal RFC 1928 client double the SOCKS service's suites exercise — the only SOCKS client written in-tree: standard clients are the compatibility surface, and nothing here grows past the dialect the service pins — method none, CONNECT, UDP ASSOCIATE, whole datagrams.
Package socksclient is the minimal RFC 1928 client double the SOCKS service's suites exercise — the only SOCKS client written in-tree: standard clients are the compatibility surface, and nothing here grows past the dialect the service pins — method none, CONNECT, UDP ASSOCIATE, whole datagrams.
supervise
Package supervise runs a node's loops as one group and releases the resources they use once every loop has returned.
Package supervise runs a node's loops as one group and releases the resources they use once every loop has returned.
testnetwork
Package testnetwork holds the integration labs: nodes booted through the node's own assembly, services.BootApp, on the loopback hosts the labs draw, beside the fixtures they share — the address draws and the polls; the test WebPKI standing in for the core's certificate authority comes from pkg/core/webpki/webpkitest.
Package testnetwork holds the integration labs: nodes booted through the node's own assembly, services.BootApp, on the loopback hosts the labs draw, beside the fixtures they share — the address draws and the polls; the test WebPKI standing in for the core's certificate authority comes from pkg/core/webpki/webpkitest.
testnetwork/fabric
Package fabric is the integration labs' userspace network: one gVisor netstack per node — the SOCKS application's own recipe — connected by a forwarder the harness owns, so a lab's nodes hold no kernel port at all and the network's behaviors are taps the lab draws: delay, loss, blackhole, cut, and the translation boundary.
Package fabric is the integration labs' userspace network: one gVisor netstack per node — the SOCKS application's own recipe — connected by a forwarder the harness owns, so a lab's nodes hold no kernel port at all and the network's behaviors are taps the lab draws: delay, loss, blackhole, cut, and the translation boundary.
walktest
Package walktest reads the module's tree for the roofs' walk tests: the directories, sources, and packages beneath a roof, and the module's package graph as go list reports it.
Package walktest reads the module's tree for the roofs' walk tests: the directories, sources, and packages beneath a roof, and the module's package graph as go list reports it.
pkg
apps
Package apps is the applications roof's root: the closed table of the node's resident applications, the seam they assemble through, and the environment their constructors adapt.
Package apps is the applications roof's root: the closed table of the node's resident applications, the seam they assemble through, and the environment their constructors adapt.
apps/coordination
Package coordination is the coordination application: the network's headscale, minimal by decision, served by the core alone beside the WireGuard application.
Package coordination is the coordination application: the network's headscale, minimal by decision, served by the core alone beside the WireGuard application.
apps/ping
Package ping is CION's SCMP-echo application: the network's health probe and the first resident of the pkg/apps namespace — a consumer of the path library (pkg/libs/scion) beside the control plane.
Package ping is CION's SCMP-echo application: the network's health probe and the first resident of the pkg/apps namespace — a consumer of the path library (pkg/libs/scion) beside the control plane.
apps/portal
Package portal is the operator's console: the resident application the founding core serves beneath /admin/ on its HTTPS server, paired with the portal admission method it decides for.
Package portal is the operator's console: the resident application the founding core serves beneath /admin/ on its HTTPS server, paired with the portal admission method it decides for.
apps/socks
Package socks is the SOCKS application: internet egress as a service the node's own tailnet address names.
Package socks is the SOCKS application: internet egress as a service the node's own tailnet address names.
apps/voting
Package voting is the TRC voting application: the resident application a founding core hosts for the cores of its ISD to submit TRC updates on.
Package voting is the TRC voting application: the resident application a founding core hosts for the cores of its ISD to submit TRC updates on.
apps/wireguard
Package wireguard is CION's WireGuard application: wireguard-go embedded in the CION binary, carrying the tailnet's hosts and the node-to-node mesh.
Package wireguard is CION's WireGuard application: wireguard-go embedded in the CION binary, carrying the tailnet's hosts and the node-to-node mesh.
apps/wireguard/impl/bbolt
Package bbolt is the application directory's bbolt store, following the trust DB's pattern: a small file, values marshaled beside their keys — node entries keyed by ISD-AS, host entries by public key.
Package bbolt is the application directory's bbolt store, following the trust DB's pattern: a small file, values marshaled beside their keys — node entries keyed by ISD-AS, host entries by public key.
apps/wireguard/impl/dbtest
Package dbtest holds the application directory store's contract tests, shared by every implementation the way the trust DB's are.
Package dbtest holds the application directory store's contract tests, shared by every implementation the way the trust DB's are.
core/controlplane
Package controlplane implements the node core's control service: beaconing and the drafts' services — segment creation, registration, and lookup, trust material and chain renewal — with the server that composes the services and the peer client that calls its peers', every protocol the core speaks the drafts' own.
Package controlplane implements the node core's control service: beaconing and the drafts' services — segment creation, registration, and lookup, trust material and chain renewal — with the server that composes the services and the peer client that calls its peers', every protocol the core speaks the drafts' own.
core/dataplane/dataplanetest
Package dataplanetest runs a data plane for the tests of what rides it: a node of the smallest topology that carries SCION packets, one internal and one external link, on loopback sockets of the caller's host.
Package dataplanetest runs a data plane for the tests of what rides it: a node of the smallest topology that carries SCION packets, one internal and one external link, on loopback sockets of the caller's host.
core/liveness
Package liveness runs the node's link liveness (data plane draft, Section 6.1): a BFD session per serving link, and the health monitor that keeps the sessions across data plane generations and reduces their arrivals to a verdict per interface.
Package liveness runs the node's link liveness (data plane draft, Section 6.1): a BFD session per serving link, and the health monitor that keeps the sessions across data plane generations and reduces their arrivals to a verdict per interface.
core/trust/trusttest
Package trusttest founds an ISD for other packages' tests: a founding core's keys in a temporary directory, its genesis TRC pinned in the caller's trust database, its issuer, and the enrollment of ISD-ASes under it.
Package trusttest founds an ISD for other packages' tests: a founding core's keys in a temporary directory, its genesis TRC pinned in the caller's trust database, its issuer, and the enrollment of ISD-ASes under it.
core/webpki
Package webpki is the bootstrap channel: the ACME certificate management of the core's endpoint and the WebPKI-verified client of the core's control endpoint, serving the enrollment lifecycle from outside the drafts' subset.
Package webpki is the bootstrap channel: the ACME certificate management of the core's endpoint and the WebPKI-verified client of the core's control endpoint, serving the enrollment lifecycle from outside the drafts' subset.
core/webpki/webpkitest
Package webpkitest mints the test certificate authority that stands in for the WebPKI: a CA and a server certificate for Domain, written to files the core's endpoint loads.
Package webpkitest mints the test certificate authority that stands in for the WebPKI: a CA and a server certificate for Domain, written to files the core's endpoint loads.
libs/expiring
Package expiring holds values that each expire at an instant of their own.
Package expiring holds values that each expire at an instant of their own.
libs/loops
Package loops runs a library's long-lived loops under the caller's wait group with the posture the node's supervisor gives a Degrade loop: a panic is absorbed and logged with its stack, and a return before the context ends is logged, each with the loop's name.
Package loops runs a library's long-lived loops under the caller's wait group with the posture the node's supervisor gives a Degrade loop: a panic is absorbed and logged with its stack, and a return before the context ends is logged, each with the loop's name.
libs/peeria
Package peeria is the peer-identity middleware of the SCION-native channel: the piece both sides of the node's boundary speak — the core's endpoint, the topology application's services, and the WireGuard directory all authenticate their peers with it.
Package peeria is the peer-identity middleware of the SCION-native channel: the piece both sides of the node's boundary speak — the core's endpoint, the topology application's services, and the WireGuard directory all authenticate their peers with it.
libs/ratelimit
Package ratelimit rate-caps admissions per key, the shape the node's doors share: one admission per interval for each key, in bounded memory.
Package ratelimit rate-caps admissions per key, the shape the node's doors share: one admission per interval for each key, in bounded memory.
libs/scion
Package scion is the node's SCION library, the application seam: the socket (Conn) that carries datagrams over SCION paths and reverses arrival paths for replies, the address (Addr) naming a peer by ISD-AS and underlay address or service, and the path resolver (PathProvider) that composes discovered segments into end-to-end paths.
Package scion is the node's SCION library, the application seam: the socket (Conn) that carries datagrams over SCION paths and reverses arrival paths for replies, the address (Addr) naming a peer by ISD-AS and underlay address or service, and the path resolver (PathProvider) that composes discovered segments into end-to-end paths.
libs/scionrpc
Package scionrpc is the SCION-native channel: the drafts' RPC over HTTP/3 (QUIC) riding SCION paths (control plane draft, Section 1.7), peers authenticated by their AS certificate chains against the TRC, and the drafts' service resolution answered beside it (control plane draft, Section 5).
Package scionrpc is the SCION-native channel: the drafts' RPC over HTTP/3 (QUIC) riding SCION paths (control plane draft, Section 1.7), peers authenticated by their AS certificate chains against the TRC, and the drafts' service resolution answered beside it (control plane draft, Section 5).
libs/segment
Package segment wraps the vendored control-plane protobuf path segment messages in CION-owned domain types: parsing path-construction beacons, creating and signing AS entries, computing hop-field MACs, and building data-plane paths from registered segments.
Package segment wraps the vendored control-plane protobuf path segment messages in CION-owned domain types: parsing path-construction beacons, creating and signing AS entries, computing hop-field MACs, and building data-plane paths from registered segments.
libs/statefile
Package statefile writes and opens the files a node keeps in its state directory: the small files written whole, and the bbolt databases opened with their buckets in place.
Package statefile writes and opens the files a node keeps in its state directory: the small files written whole, and the bbolt databases opened with their buckets in place.
libs/underlay
Package underlay holds the facts of the UDP/IP network beneath SCION that the data plane shares with the node's sockets: the end-host port, the largest datagram, the underlay types, the resolution of underlay addresses, and the socket source the node's sites bind through — the kernel's the default.
Package underlay holds the facts of the UDP/IP network beneath SCION that the data plane shares with the node's sockets: the end-host port, the largest datagram, the underlay types, the resolution of underlay addresses, and the socket source the node's sites bind through — the kernel's the default.
modules/enrollauth
Package enrollauth is the node's admission policy module: the seam gating a joiner node's first issuance, a joiner host's login, and the founder's sensitive vote on a core's TRC submission — with its implementations filed one package each beneath this root: the CIDR authorizer admitting by addressing at every boundary, the Telegram one admitting one by one from an operator's phone, and the portal one pending every new identity for the operator's passkey console to decide through the Operator surface — and a shared contract suite in impl/authtest every implementation runs.
Package enrollauth is the node's admission policy module: the seam gating a joiner node's first issuance, a joiner host's login, and the founder's sensitive vote on a core's TRC submission — with its implementations filed one package each beneath this root: the CIDR authorizer admitting by addressing at every boundary, the Telegram one admitting one by one from an operator's phone, and the portal one pending every new identity for the operator's passkey console to decide through the Operator surface — and a shared contract suite in impl/authtest every implementation runs.
modules/enrollauth/impl/authtest
Package authtest implements the shared contract tests for enrollment authorizer implementations, the databases' impl/dbtest pattern: an implementation has at least one test that runs this suite.
Package authtest implements the shared contract tests for enrollment authorizer implementations, the databases' impl/dbtest pattern: an implementation has at least one test that runs this suite.
modules/enrollauth/impl/portal
Package portal is the admission method the operator's passkey console decides: every boundary's new identity pends until the operator approves or rejects it, and a registration presenting an auth key the method minted is admitted on the key.
Package portal is the admission method the operator's passkey console decides: every boundary's new identity pends until the operator approves or rejects it, and a registration presenting an auth key the method minted is admitted on the key.
modules/links
Package links stores the neighbor table: one live entry per neighbor, holding the addresses, interface IDs, and state of the link.
Package links stores the neighbor table: one live entry per neighbor, holding the addresses, interface IDs, and state of the link.
modules/links/impl/bbolt
Package bbolt implements the neighbor table database on top of bbolt, following the path DB's implementation (pkg/modules/pathdb/impl/bbolt).
Package bbolt implements the neighbor table database on top of bbolt, following the path DB's implementation (pkg/modules/pathdb/impl/bbolt).
modules/links/impl/dbtest
Package dbtest implements the shared contract tests for neighbor table database implementations, following the path DB's testing harness (pkg/modules/pathdb/impl/dbtest).
Package dbtest implements the shared contract tests for neighbor table database implementations, following the path DB's testing harness (pkg/modules/pathdb/impl/dbtest).
modules/links/impl/memory
Package memory implements the neighbor table database in memory, for tests and embeddings that prefer no state directory.
Package memory implements the neighbor table database in memory, for tests and embeddings that prefer no state directory.
modules/pathdb
Package pathdb stores registered path segments (control plane draft, Section 4): up, down, and core segments terminated by this node or registered with it.
Package pathdb stores registered path segments (control plane draft, Section 4): up, down, and core segments terminated by this node or registered with it.
modules/pathdb/impl/bbolt
Package bbolt implements the path segment database on top of bbolt, following the trust DB's implementation (pkg/modules/trustdb/impl/bbolt).
Package bbolt implements the path segment database on top of bbolt, following the trust DB's implementation (pkg/modules/trustdb/impl/bbolt).
modules/pathdb/impl/dbtest
Package dbtest implements the shared contract tests for path database implementations, following the trust DB's testing harness (pkg/modules/trustdb/impl/dbtest).
Package dbtest implements the shared contract tests for path database implementations, following the trust DB's testing harness (pkg/modules/trustdb/impl/dbtest).
modules/topology
Package topology is the node's configuration source: what it provides is not a service the node offers but the node's own inputs — identity, links — granted from outside, for a node cannot author its own name in the namespace or its own edges in the graph.
Package topology is the node's configuration source: what it provides is not a service the node offers but the node's own inputs — identity, links — granted from outside, for a node cannot author its own name in the namespace or its own edges in the graph.
modules/topology/impl/file
Package file is the topology source's static implementation: a link-set file the operator vouches for, reconciled into the store.
Package file is the topology source's static implementation: a link-set file the operator vouches for, reconciled into the store.
modules/topology/impl/measured
Package measured is the topology source's measured implementation: the rendezvous acceptor, the joiner's dials, the node directory, the in-band link service, and the selection loop.
Package measured is the topology source's measured implementation: the rendezvous acceptor, the joiner's dials, the node directory, the in-band link service, and the selection loop.
modules/topology/impl/providertest
Package providertest implements the shared contract tests for topology source implementations, the databases' impl/dbtest pattern: an implementation has at least one test that runs this suite.
Package providertest implements the shared contract tests for topology source implementations, the databases' impl/dbtest pattern: an implementation has at least one test that runs this suite.
modules/trustdb
Package trustdb is the trust material database: where trust material — the TRC and certificate chains — persists, an implementation that could differ.
Package trustdb is the trust material database: where trust material — the TRC and certificate chains — persists, an implementation that could differ.
proto

Jump to

Keyboard shortcuts

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