Skip to content
RingsNetworkPublic

About

Rings is a browser-native, structured peer-to-peer network: browser tabs and native daemons find each other by DID and talk over WebRTC, routed by a Chord DHT.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

222 stars

Watchers

11 watching

Forks

Latest commit

 

History

903 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Rings Network

Rings Network

rings-node cargo docs GitHub Sponsor

A peer-to-peer network for the sovereign age.

Rings is a structured peer-to-peer network that runs natively and in the browser. Browser tabs and native daemons join a unified Chord DHT overlay, address each other by DIDs, and communicate over direct WebRTC datachannels with no application server in the data path.

Why Rings

  • A browser tab is a full peer. It joins the DHT, routes and stores for others, and connects browser to browser, with no light client or gateway in between.
  • Privacy is built in. Onion loops with zero-idle-cover burst shaping and pinned entry guards run natively and in the browser; the hosted console browses the web through them from a tab.
  • Wallet keys are identities. secp256k1 (MetaMask), ed25519 (Phantom), WebCrypto P-256, and bip137 keys share one overlay.
  • Protocols are pure state machines. A protocol owns a namespace; its IO runs in a shell that stays isolated within that namespace.
  • Hardened by design. Messages are signed, delivered at most once, and governed by slot-isolated admission and per-origin rate quotas; connection, storage, and queue state is strictly bounded. CI model-checks Chord rejoin, runs Miri and ASan/LSan, and runs seed-replayable randomized decode-boundary tests.

Try it

  • Browser: open rings.rs/#node. Nothing to install.
  • Native: curl -fsSL https://rings.rs/install.sh | sh, then rings init && rings run. See Installation.
  • Web app: npm install @ringsnetwork/rings-node, then follow the guide.

Status

Active public overlay at the seed node.rings.rs, with deterministic wire-versioned framing ("RINGS\0" ‖ wire_version, WIRE_VERSION = 6) across every frame and handshake. 1.0 stabilizes WIRE_VERSION = 6 and the public runtime contracts across 1.0.x, while 2.0 extends the overlay with epoch-randomized ring placement (#780) and decentralized trust ranking (DRanking). See UPGRADING.md, ROADMAP.md, and SECURITY.md.

Where Rings fits

✅ supported · ❌ not provided. Qualifications are listed below the table.

Network Browser P2P Structured P2P Privacy layer E2E encryption
Rings ✅ ✅ Chord ✅ Separate layer ✅¹
libp2p ✅ ✅ Kademlia² ❌ ✅³
aMule / Kad ❌ ✅ Kademlia ❌ ❌⁴
Nostr ❌ ❌ ❌ ✅⁵
Nym mixnet ❌ ❌ ✅ Full mixnet path ✅⁶
Tor ❌ ❌ Relay network ✅ Onion circuits ✅⁷
I2P ❌ ✅ netDb² ✅ Tunnel network ✅⁶
WebTorrent (browser) ✅ ❌ ❌ ✅³

Browser P2P means the browser itself connects as a peer; a browser UI or gateway client does not qualify. Structured P2P includes DHT-based discovery; it does not imply that application traffic is routed through the DHT. Privacy means network metadata protection, separate from payload encryption.

  1. Rings authenticates every overlay message by DID signature and provides E2E ElGamal stream encryption after a peer handshake.
  2. libp2p offers an optional Kademlia DHT. I2P uses a Kademlia-based netDb for discovery; messages travel through tunnels.
  3. Encrypted peer connections: libp2p includes circuit-relayed connections; browser WebTorrent uses WebRTC/DTLS.
  4. aMule protocol obfuscation is transport-level only. This row covers Kad; eD2k uses indexing servers.
  5. Nostr supports encrypted direct messages, such as NIP-44 payloads, alongside public signed events.
  6. Between Nym clients or I2P destinations; traffic to external services uses application-layer TLS/HTTPS.
  7. Tor provides end-to-end encryption for onion services and pairs with HTTPS for external websites.

Primary sources

Architecture

┌──────────────────────────────────────────────────────────────────────┐
│  Applications   dWeb · rings-tui · mailbox · relay/tunnel · your app │
├──────────────────────────────────────────────────────────────────────┤
│  Protocols      built-ins: relay (tcp/udp tunnels), echo, mail,      │  node::extension::protocols
│  (namespaced)   turn.ticket (onion invoke), custom user namespaces   │
├──────────────────────────────────────────────────────────────────────┤
│  Extension      pure `Protocol::step` → `Effect` → `Interpret` shell   │  node::extension::ext
│  runtime        over `Scope` + Tokio/WASM contracts (`rings-runtime`)│
├──────────────────────────────────────────────────────────────────────┤
│  Privacy        guard-closed Sphinx/AEZ v5 loops, SURBs, cover pace, │  crates/node/src/onion
│  (loops)        `tcp`/`https`/`udp` exits, Kleisli `invoke` pipelines│  crates/aez
├──────────────────────────────────────────────────────────────────────┤
│  Overlay        Chord DHT: range-proved fingers, non-transitive      │  crates/core
│  (routing +     gap bridging, voluntary `Leave`, authenticated CRDTs,│
│  encryption)    E2E ElGamal streams, group-committed replay windows  │
├──────────────────────────────────────────────────────────────────────┤
│  Transport      decoupled `TransportInterface`, 0–8 step handshakes, │  crates/transport
│                 WebRTC (native/browser), UDP/TCP TURN, LZ4 wire v6   │  crates/codec
├──────────────────────────────────────────────────────────────────────┤
│  Identity       DID + secp256k1 / EIP-191 / BIP-137 / secp256r1 /    │  crates/core::ecc
│                 Ed25519 / BLS12-381, delegated sessions, TURN auth   │
└──────────────────────────────────────────────────────────────────────┘

The overlay layer provides authenticated DID routing, authenticated CRDT data topics, non-transitive multi-predecessor / gap-bridge routing, voluntary Leave handoffs, and E2E stream encryption, while the privacy layer provides guard-closed Sphinx/AEZ v5 onion circuits for tcp, https, and udp exits as well as composable Kleisli invoke pipelines (layer contracts). Connections run over a decoupled TransportInterface (crates/transport, default WebRTC with 0–8 step binary handshakes and LZ4 wire compression at WIRE_VERSION = 6) with signature-authenticated TURN traversal over both UDP and TCP (crates/turn / rings-turn), plus DHT-discovered TURN service advertisements and multi-hop onion::udp TURN circuits (crates/turn-service / rings-turn-service). Supporting workspace crates: tui (interactive 6-tab terminal dashboard rings-tui), rpc (JSON-RPC 2.0), measure (local peer credit & probe receipts), dns-relay (<did>.<zone> DNS + IPv6 ingress), gateway (selective IPv4/TCP TUN over onion), webview (onion WebView primitives), network-policy (egress filtering), runtime, codec, derive, aez, logo, and test-support.

Build on Rings

A protocol is a pure state machine registered under a namespace; its interpreter shell performs the IO.

provider.register_protocol(Echo, EchoShell)?;
provider.set_backend()?;

// Built-in relay: tunnel a local socket to a peer's service, no server.
let relay = RelayHandle::install(&provider.extensions())?;
relay.register_tcp_service("web".into(), "127.0.0.1:8080".parse()?).await?; // server side
relay.open_tcp_tunnel(local_addr, peer_did, "web".into()).await?;            // client side

In the browser, a protocol can be a JS handler: provider.on(namespace, initialState, handler). Proof systems fit the same boundary: Rings routes and authenticates the envelopes, and the protocol's shell runs the prover.

Example Shows
frontend Browser node console, landing & article site (rings.rs), Onion WebView, and Chrome MV3 extension
native A native node with a custom protocol
relay TCP and UDP tunnels to a peer's service
mailbox SMTP/IMAP mailbox and mail gateway over Rings
dweb A decentralized web app (Yew)
ffi Driving a node over the C FFI

Installation

curl -fsSL https://rings.rs/install.sh | sh

The installer detects macOS (aarch64, x86_64) or Linux (x86_64 static musl, aarch64 gnu), downloads the matching release archive, verifies its SHA-256 checksum, and installs rings to /usr/local/bin (when writable) or ~/.local/bin. Re-run the same command to upgrade in place, or pass --version vX.Y.Z (curl -fsSL https://rings.rs/install.sh | sh -s -- --version v1.0.0-pre.13) to pin a release.

  • Cargo: build with the toolchain pinned in rust-toolchain.toml:

    cargo +1.97.0 install --locked rings-node
  • Source: git clone https://github.com/RingsNetwork/rings && cd rings && cargo install --path crates/node

  • Wasm: see Build for Wasm.

Running persistently

Static systemd (Linux user unit) and launchd (macOS LaunchAgent) service definitions live under contrib/.

Documentation

rings.rs/docs The book: operating nodes, TUI, onion pipelines, TURN, gateways, browser/FFI runtimes, internals
rings.rs/blog Engineering blog: Onion TURN, Onion OP, Chord convergence, and correctness
Interactive Terminal UI (rings-tui) 6-tab terminal dashboard for monitoring, storage, registries, and commands
Onion Routing & Kleisli Pipelines Sphinx/AEZ loops, tcp/https/udp exits, and composable invoke operations
UPGRADING.md 1.0 frozen contracts and upgrade checklist
SECURITY.md Security architecture, layer contracts, and vulnerability reporting
ROADMAP.md Milestones and tracks
llms.txt Project map for AI agents
examples/frontend Source of rings.rs (including article/) and the browser extension
@RingsNetworkio Announcements

Whitepaper

  • Rings whitepaper (PDF, LaTeX, build notes): the unified protocol specification, integrating range-proved and non-transitive Chord stabilization, CRDT removal stability, durable local stores and chain-replicated relay custody, fair slot-isolated admission and load bounds, and Sphinx onion Kleisli pipelines.
  • DRanking (PDF, LaTeX): decentralized trust and ranking protocol for Rings 2.0, backed by signed service-receipt evidence.

To cite Rings:

@misc{rings-network,
  author = {Ryan J. Kung},
  title = {Rings: A peer-to-peer network for sovereign age},
  year = {2023},
  month = feb,
  url = {https://rings.rs/papers/rings/},
  note = {Online reader and PDF: https://rings.rs/papers/ ; LaTeX source: https://github.com/RingsNetwork/rings/tree/master/papers}
}

Contributing

See CONTRIBUTING.md.

License

Rings is released under the GNU Affero General Public License, version 3.0 only (AGPL-3.0-only). Works derived from it must be released under the same license, and the AGPL's network clause extends that obligation to services that offer Rings over a network: a product or hosted service built on Rings must publish its source.

A commercial license for use outside the AGPL's terms is available from Rings Network on request. The Rings Network name, logo, and the hosted rings.rs service are not covered by the software license.

About

Rings is a browser-native, structured peer-to-peer network: browser tabs and native daemons find each other by DID and talk over WebRTC, routed by a Chord DHT.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

222 stars

Watchers

11 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages