Skip to content

Scallion setting (fails closed) + tron-headless image for c0mpute browser nodes - #198

Merged
ralyodio merged 2 commits into
mainfrom
feat/scallion-and-headless
Nov 30, 2026
Merged

ralyodio merged 2 commits into
mainfrom
feat/scallion-and-headless

Conversation

@ralyodio

Copy link
Copy Markdown
Contributor

Two pieces of distributed browsing on the c0mpute network.

A. Scallion setting (off by default, fails closed)

Scallion is c0mpute's onion-style relay network. Today c0mpute scallion doctor --mode native --json says ready:false and there is no local SOCKS client, so this setting shows that plainly and never routes.

  • Helper 3.5.0 (tron-tor-helper, bumped in the launcher too):
    • GET /scallion/status returns {installed, path, version, doctor, ready, socks, routing, error, install}. It finds the CLI via TRON_C0MPUTE_BIN, PATH, ~/.local/bin, $C0MPUTE_HOME/bin and ~/.c0mpute/bin, and always sets C0MPUTE_NO_AUTO_UPDATE=1.
    • POST /scallion/install runs only on a click: curl -fsSL https://c0mpute.com/install.sh | sh -s -- --minimal --no-start --no-exec. --minimal alone still starts the worker service, so --no-start is required. The script is downloaded to a file first and run with no stdin in a new session, so it never prompts. The endpoint returns the output tail.
    • POST /scallion/start returns 200 only when the doctor says ready:true, names a loopback socks (127.0.0.1:PORT), and that port accepts a connection. Otherwise it returns 409 with not-installed, not-ready, no-socks or socks-unreachable, plus the doctor's blockers. POST /scallion/stop clears routing.
  • Extension: a full "Scallion (c0mpute network)" section in Settings (state, blockers, Install, switch, installer output) and a 🌱 Scallion button in the sidebar next to Tor and Pit. Routing uses the same path as Tor: SOCKS5 plus the WebRTC guard, a check through the proxy, and a revert to system on any failure. It is exclusive with Tor and Pit under the same rules those two follow with each other.
  • The UI says "Not installed" or "Installed (c0mpute vX). Scallion client not ready: ... TronBrowser traffic is NOT going through Scallion." It says "On: routed through Scallion" only while actually routing. The copy calls it experimental and unreviewed and never claims anonymity.
  • docs/scallion.md covers the doctor/socks contract for the c0mpute side; the README links to it.
  • Tests: apps/desktop/test/test_scallion_helper.py (fake CLI and installer, no network) and vitest scallion.test.js plus background tests. The network-helper workflow now discovers test_*.py.

B. ghcr.io/profullstack/tron-headless

  • docker/tron-headless/:
    • Base and engine: bookworm-slim pinned by digest, and ungoogled-chromium 152.0.7977.82-1 (the same as the root Dockerfile) with its sha256 verified.
    • Fonts: Liberation, DejaVu, Noto emoji and CJK.
    • Process setup: socat and tini, running as uid 1000 with --no-sandbox (the container is the sandbox).
    • Entrypoint: Chromium headless with CDP on 127.0.0.1:9223, socat on 0.0.0.0:9222, then the CMD (default sleep infinity). Whichever exits first ends the container. TRON_WINDOW and TRON_PROXY are supported.
  • .github/workflows/tron-headless.yml:
    • On PRs: build, run with --cap-drop ALL --security-opt no-new-privileges --shm-size 1g --memory 2g -p 127.0.0.1:9222:9222, then run smoke.mjs (Node 22 global WebSocket). The smoke test covers /json/version, Target.getTargets, flatten attach, Page.navigate, a screencast frame and a PNG screenshot, and also checks that the container exits when its CMD exits.
    • On v* tags and workflow_dispatch: push :vX.Y.Z and :latest for linux/amd64 to GHCR. No workflow artifacts.

Verified locally: the smoke test passes under the node's docker flags, uid is 1000:1000, killing Chromium ends the container, a CMD that exits 7 ends it with 7, docker stop exits 143, and TRON_PROXY reaches --proxy-server.

🤖 Generated with Claude Code

…te browser nodes

Scallion (c0mpute network), off by default:
- network helper 3.5.0: GET /scallion/status, POST /scallion/install (c0mpute
  CLI only: --minimal --no-start --no-exec), /scallion/start (only when the
  doctor says ready:true AND names a loopback socks endpoint that answers),
  /scallion/stop
- extension: Settings section + sidebar button; routes like Tor (SOCKS5 +
  WebRTC guard), verifies, reverts on failure; exclusive with Tor and Pit
- docs/scallion.md, Python + vitest tests

tron-headless:
- docker/tron-headless: bookworm-slim by digest, ungoogled-chromium
  152.0.7977.82-1 sha256-verified, uid 1000, --no-sandbox, CDP via socat on
  :9222, exits when Chromium or the CMD exits
- .github/workflows/tron-headless.yml: smoke test on PRs, push
  ghcr.io/profullstack/tron-headless:vX.Y.Z + latest on v* tags

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

ThreatCrush Security Scan

4 finding(s) in the 21 file(s) this pull request changes.

HIGH: 2 | MEDIUM: 2

Severity Rule Location
HIGH py-ssrf-outbound-request apps/desktop/launcher/tron-tor-helper:309
HIGH py-ssrf-outbound-request apps/desktop/launcher/tron-tor-helper:443
MEDIUM js-unescaped-html-sink apps/desktop/extensions/ai-sidebar/sidepanel.js:81
MEDIUM js-unescaped-html-sink apps/desktop/extensions/ai-sidebar/sidepanel.js:169
50 pre-existing finding(s) elsewhere in the repository — **MEDIUM**: 29 | **LOW**: 21

Not introduced by this pull request.

Severity Rule Location
MEDIUM gha-ssh-key-secret .github/workflows/deploy-dev2.yml:39
MEDIUM js-open-redirect apps/desktop/extensions/ai-sidebar/install-helper.js:156
MEDIUM js-unescaped-html-sink apps/desktop/extensions/ai-sidebar/media.js:34
MEDIUM js-unescaped-html-sink apps/desktop/extensions/ai-sidebar/media.js:57
MEDIUM js-unescaped-html-sink apps/desktop/extensions/ai-sidebar/newtab.js:247
MEDIUM js-unescaped-html-sink apps/desktop/extensions/ai-sidebar/newtab.js:276
MEDIUM js-unescaped-html-sink apps/desktop/extensions/ai-sidebar/newtab.js:346
MEDIUM js-unescaped-html-sink apps/desktop/extensions/ai-sidebar/options.js:311
MEDIUM redos-nested-quantifier apps/desktop/extensions/ai-sidebar/w3bs.js:17
MEDIUM insecure-randomness-for-secret apps/extensions/public/seal.js:107
MEDIUM js-unescaped-html-sink apps/extensions/public/store.js:77
MEDIUM js-unescaped-html-sink apps/extensions/public/store.js:286
MEDIUM js-unescaped-html-sink apps/extensions/public/store.js:652
MEDIUM js-unescaped-html-sink apps/web/public/app.js:29
MEDIUM js-unescaped-html-sink apps/web/public/dns.js:54
MEDIUM sh-remote-script-execution apps/web/public/install.sh:188
MEDIUM sh-remote-script-execution apps/web/public/install.sh:428
MEDIUM sh-remote-script-execution apps/web/public/install.sh:446
MEDIUM js-unescaped-html-sink apps/web/public/settings.js:133
MEDIUM js-unescaped-html-sink apps/web/public/settings.js:206

…and 30 more; the full set is in the SARIF artifact.

Snippets are redacted; ThreatCrush never prints matched credential material.

…oke script

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ralyodio
ralyodio merged commit 268a009 into main Nov 30, 2026
15 checks passed
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