Skip to content

feat: Scallion Network — privacy-aware three-hop route planning and sticky sessions - #383

Merged
ralyodio merged 10 commits into
masterfrom
feat/scallion-network
Nov 15, 2026
Merged

ralyodio merged 10 commits into
masterfrom
feat/scallion-network

Conversation

@ralyodio

Copy link
Copy Markdown
Collaborator

Summary

Introduce Scallion Network (green-onion branding) as an experimental, privacy-aware P2P routing foundation for c0mpute. This is a draft architecture/route-planning PR, not a functioning anonymous VPN or onion transport.

  • Add c0mpute_net::scallion with a three-hop entry/guard -> middle -> opt-in exit route planner.
  • Prefer independent operator / family / ASN claims, fresh locally measured link latency/loss and bottleneck throughput, and reject insufficient or stale data (no automatic direct fallback).
  • Rank near-fastest circuits instead of always selecting one globally fastest path.
  • Add CircuitLeases: rotate circuits for new sessions while keeping SSH/HQTerm, streaming API and long-lived compute sessions pinned to their existing route.
  • Add docs/protocol/scallion-network.md covering the threat model, naming, route optimization, sticky-session semantics and HQTerm/Mosh integration limitations.
  • Link the document in the protocol index.

Motivation

Basic permissionless peer-to-peer discovery and local key-based identity should be separate from the privacy routing protocol. A fast route is not necessarily a safe or private route; Scallion plans should account for independent operators and avoid tearing down live GPU streams just to rotate exit IPs.

What this PR does not claim

  • No encrypted onion circuit exists yet: no layered-encryption transport, SOCKS5/TUN client, TCP forwarding, exit service, or web gateway is added here.
  • The existing libp2p NAT-traversal relay is not a Tor-style privacy circuit; it exposes adjacent endpoints.
  • Claimed ASN/ownership independence is not validated by the planner. Security review and independent node attestations are required.
  • No KYC, export-control or sanctions obligations are removed for services where they apply.
  • Existing core bootstrap still fetches the c0mpute.com seed endpoint by default; privacy-preserving bootstrap is a separate integration milestone.

Test coverage

Unit tests in node/crates/c0mpute-net/src/scallion.rs cover route scoring, exit consent, three-hop diversity, measurement staleness, load-aware selection, no direct fallback, and session stickiness after rotation.

Not locally executed: the authoring environment has no Rust toolchain. GitHub Actions rust build/test is the required validation gate. Leave as draft until green and security review of the first real transport implementation.

Next milestones

  1. Independently operated bootstrap peers without mandatory HTTP check-ins and user-controlled guard pinning.
  2. Threat-model and independent security review; anti-correlation and link-measurement integrity.
  3. Authenticated three-hop circuit establishment with layered forward-secret encryption and replay protection.
  4. Opt-in bounded exit policies, local SOCKS5 front-end, and fail-closed leak handling.
  5. Multi-node E2E tests; session resume with HQTerm/HQSH and GPU inference streaming; compare performance against direct traffic and mature anonymity networks.

Brand: Scallion Network — Green routes. Private roots. 🌱

@github-actions

Copy link
Copy Markdown

ThreatCrush Security Scan

14 finding(s)

HIGH/CRITICAL: 2 | MEDIUM: 8 | LOW: 4

Severity Rule Location
HIGH js-ssrf-outbound-request apps/web/public/sw.js:24
HIGH sh-remote-script-execution scripts/install.sh:611
MEDIUM js-unescaped-html-sink apps/web/src/app/blog/[slug]/page.tsx:53
MEDIUM js-unescaped-html-sink apps/web/src/app/layout.tsx:109
MEDIUM sql-template-interpolation apps/web/src/lib/chat/convo-store.ts:116
MEDIUM sql-template-interpolation apps/web/src/lib/chat/convo-store.ts:117
MEDIUM sql-template-interpolation apps/web/src/lib/chat/push.ts:476
MEDIUM js-dynamic-code-execution apps/web/src/lib/router/verify.ts:91
MEDIUM sh-remote-script-execution scripts/dev-setup.sh:25
MEDIUM sh-eval-expansion scripts/dev-setup.sh:35
LOW py-ssrf-outbound-request examples/business-strategist-agent/chat.py:37
LOW py-ssrf-outbound-request examples/business-strategist-agent/train.py:54
LOW secret-generic-credential node/crates/c0mpute-core/src/webhook.rs:1171
LOW py-path-traversal node/crates/c0mpute-core/tests/fixtures/fake-infernet-text:29

Snippets are redacted; ThreatCrush never prints matched credential material.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant