Skip to main content

Control AI coding agents from your phone — Claude Code, Codex, and Antigravity. Self-hosted, E2E encrypted, open source.

Project description

CorvusTunnel

Control AI Agents from Your Phone

Self-hosted remote control for Claude Code, Codex, and Antigravity. Free, open source, E2E encrypted.

License: MIT Python 3.10+ PyPI


Quick Start

# Install
pip install corvustunnel

# Start
corvustunnel start

# With a specific workspace
corvustunnel start --workspace /path/to/your/project

Scan the QR code with your phone → you're connected.

Features

  • Multi-agent support — Claude Code, Codex CLI, Antigravity
  • End-to-end encryption — NaCl/libsodium, key exchange via QR code
  • QR code connect — scan to connect, no manual URL typing
  • Real-time streaming — WebSocket-based terminal I/O via xterm.js
  • Push notifications — Web Push API alerts for agent events
  • PWA support — install on your phone like a native app
  • Smart suggestions — context-aware action chips (approve, reject, continue)
  • Command favorites — pin frequently used prompts for one-tap access
  • Audit logging — JSONL forensic logs of all sessions
  • Security hardened — IP ban, rate limiting, body size limits, CORS, security headers
  • Self-hosted — runs on your machine, your data stays with you
  • Unlimited — no session limits, no cooldowns, no restrictions

How It Works

Your Phone                    Your Computer
┌─────────┐                  ┌──────────────────┐
│         │   WebSocket      │  CorvusTunnel    │
│  Scan   │ ◄──────────────► │  ├── FastAPI     │
│  QR     │   (E2E encrypted)│  ├── PTY/pexpect │
│  Code   │                  │  └── Agent       │
│         │                  │      (claude/    │
│  Send   │                  │       codex/     │
│  prompts│                  │       agy)       │
└─────────┘                  └──────────────────┘
     ▲                              ▲
     │    Cloudflare Relay          │
     └──────────────────────────────┘
         (TLS + E2E encryption)

Installation

pip install corvustunnel
corvustunnel start

Security

  • E2E Encryption: All terminal I/O encrypted with NaCl SecretBox (XSalsa20-Poly1305)
  • Key Exchange: X25519 Diffie-Hellman during QR code scanning
  • Auth: One-time boot token → session token with IP binding
  • WebSocket: Ticket-based auth (one-time, 30s TTL, IP-bound)
  • Rate Limiting: Per-endpoint via slowapi
  • IP Auto-Ban: After repeated auth failures

See SECURITY.md for full details and vulnerability reporting.

API

Endpoint Auth Description
GET /api/health No Health check
POST /api/e2e/exchange No E2E key exchange
POST /api/claim Boot token Exchange boot token for session token
GET /api/browse Session Directory browser
GET /api/check-agents Session List available AI agents
POST /api/ws-ticket Session Get WebSocket connection ticket
WS /api/terminal/ws Ticket Interactive terminal session

Internal API (localhost:8001):

Endpoint Description
GET /audit View audit logs
GET /deeplog View deep (plaintext) logs
GET /terminal/status Terminal session status

Environment Variables

Variable Default Description
AGENT_TOKEN Auto-generated Bearer token for API auth
ALLOWED_DIRS Home + CWD Comma-separated allowed directories
AUDIT_LOG_DIR ./logs Audit log directory
PUBLIC_PORT 8000 Public API port
INTERNAL_PORT 8001 Internal admin port

Development

git clone https://github.com/maliozturk/CorvusTunnel.git
cd CorvusTunnel
pip install -e ".[dev]"
AGENT_TOKEN=dev-token corvustunnel start --verbose

Contributing

See CONTRIBUTING.md for guidelines.

License

MIT — see LICENSE

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

corvustunnel-1.0.0.tar.gz (814.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

corvustunnel-1.0.0-py3-none-any.whl (811.9 kB view details)

Uploaded Python 3

File details

Details for the file corvustunnel-1.0.0.tar.gz.

File metadata

  • Download URL: corvustunnel-1.0.0.tar.gz
  • Upload date:
  • Size: 814.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for corvustunnel-1.0.0.tar.gz
Algorithm Hash digest
SHA256 cf3bedba8d2057fdb97b2aadd532fcc6a248c1b15dcf17f4b17e60847ab7865c
MD5 c23bea32c77c3026f6d73eded5039124
BLAKE2b-256 786a9a5401a1a8a460af28e6007d2f7104592a0393d193f6f3aa1fff736b4734

See more details on using hashes here.

File details

Details for the file corvustunnel-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: corvustunnel-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 811.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for corvustunnel-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5e0ba0ff43c1cb0c9a94efd0fc72d6db2d04c8bd07a5c6dd35a3f544b43bedcc
MD5 65ab6c77e3b458003b0084da51efa86f
BLAKE2b-256 665ba572ba6bd7731f30cf88f0721dc293d9019dda574f391916c2ef94ad3a74

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page