Skip to content

tor: premium tor-url / tor-irc / tor routes over Tor#8

Merged
ralyodio merged 1 commit into
mainfrom
feat/tor-commands
Jun 14, 2026
Merged

tor: premium tor-url / tor-irc / tor routes over Tor#8
ralyodio merged 1 commit into
mainfrom
feat/tor-commands

Conversation

@ralyodio

Copy link
Copy Markdown
Contributor

Adds three premium-gated SSH routes that egress through Tor.

Commands

  • ssh tor-url@host <url> — one-shot HTTP(S) GET over Tor. Host-side, fully working & tested live ({"IsTor":true,...} via a Tor exit). Constrained: 30s timeout, 2MB cap, http/https only, curl over SOCKS (--socks5-hostname, no shell).
  • ssh -t tor-irc@host <server[:port]> — interactive IRC over Tor (irssi via torsocks) inside the member's pod.
  • ssh -t tor@host <command...> — run any command over Tor (torsocks) inside the member's pod.

Design

  • tor-url runs on the host (safe, capped). tor/tor-irc run in the member's isolated pod via new pods.Exec, so arbitrary/interactive commands are sandboxed — never host shell.
  • All gated by ensurePremium; route names reserved in auth.
  • internal/tor wraps curl/torsocks/irssi. setup.sh installs + enables tor (SOCKS 127.0.0.1:9050) and torsocks.

Verified

  • go build + go vet clean; tor-url tested live on the droplet (egress via Tor exit node confirmed; premium gate rejects non-premium).

Remaining before merge

  • tor/tor-irc need the pod image to carry torsocks+irssi and reach the Tor SOCKS (pod→host Tor networking, or per-pod tor). Routes/handlers/gating are done; only the pod plumbing + a live test remain.

🤖 Generated with Claude Code

Add three premium-gated SSH routes:
  ssh tor-url@host <url>        one-shot HTTP(S) GET over Tor (host-side,
                               curl via SOCKS, 30s/2MB caps, http/https only)
  ssh -t tor-irc@host <server>  interactive IRC over Tor in the member's pod
  ssh -t tor@host <command...>  run any command over Tor (torsocks) in the pod

tor-url runs host-side and constrained; tor/tor-irc run inside the member's
isolated pod (new pods.Exec) so arbitrary/interactive commands are sandboxed,
never on the host. internal/tor wraps curl/torsocks/irssi. All gated by
ensurePremium; names reserved. setup.sh installs + enables tor (SOCKS
127.0.0.1:9050) and torsocks.

Note: tor-url is host-side and self-contained. tor/tor-irc still need the pod
image to carry torsocks+irssi and reach the Tor SOCKS — follow-up.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@github-actions

Copy link
Copy Markdown

vu1nz Security Review

0 finding(s) in PR #?

No security issues found.

@ralyodio ralyodio merged commit 4be8744 into main Jun 14, 2026
5 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