diff --git a/README.md b/README.md index 4d7f997..bfb4d29 100644 --- a/README.md +++ b/README.md @@ -31,55 +31,17 @@ wget https://raw.githubusercontent.com/SamNet-dev/conduit-manager/main/conduit.s sudo bash conduit.sh ``` -> For beta/preview releases, use `beta-releases` instead of `main` in the URL above. - ## What's New in v1.2 -**New Features** -- Per-container CPU and memory resource limits via Settings menu -- Resource limit prompts when adding containers in Container Management -- Smart defaults based on system specs (CPU cores, RAM) -- Telegram bot container management commands (`/containers`, `/restart_N`, `/stop_N`, `/start_N`) -- Telegram bot notifications with guided setup wizard (periodic status reports via Telegram) -- Systemd-based notification service (survives reboots and TUI exits) -- Compact number display — large counts show as 16.5K, 1.2M -- Active clients count in dashboard and Telegram reports -- Total bandwidth served in reports -- Timestamps on all Telegram reports - -**Performance** -- Parallelized docker commands across all TUI screens (Status, Container Management, Advanced Stats, Live Peers) -- Batched docker inspect calls instead of per-container -- Parallel container stop/remove operations -- Reduced screen refresh time from ~10s to ~2-3s with multiple containers - -**Bug Fixes** -- Auto-restart for stuck containers with improved detection -- False WAITING status in health check for connected containers without stats -- Container start/stop/restart logic with resource limit change detection -- Duplicate country entries in GeoIP data with broader name normalization -- TUI stability (multiple fixes) -- Health check edge cases -- CPU normalization in reports (divide by core count) -- Peers count consistency across views -- Telegram markdown escaping (backslash handling) -- Telegram container name mismatch (`conduit2` → `conduit-2`) -- Wizard failure paths now preserve existing config -- Uninstall cleanup for Telegram service -- Menu no longer restarts notification loop on every open -- PID management for background processes -- Consistent `[STATS]` grep pattern across all screens -- Temp dir cleanup to prevent stale data reads -- Atomic settings file writes to prevent corruption - -**Security** -- Silent bot token input (not echoed) -- Numeric-only chat ID validation -- Restricted PID file permissions (600) -- BotFather privacy guidance in setup wizard -- OPSEC warning for operators in censored regions -- Curl calls with `--max-filesize` and `--max-time` limits -- Secure temp directories with `mktemp` +- **Per-Container Resource Limits** — Set CPU and memory limits per container via Settings menu with smart defaults +- **Telegram Bot Integration** — Periodic status reports, alerts, and container management commands (`/containers`, `/restart_N`, `/stop_N`, `/start_N`) +- **Systemd Notification Service** — Telegram bot runs as a systemd service, survives reboots and TUI exits +- **Performance Overhaul** — Parallelized docker commands across all TUI screens, reduced refresh from ~10s to ~2-3s +- **Compact Number Display** — Large counts show as 16.5K, 1.2M +- **Active Clients Count** — Connected and connecting peers in dashboard and Telegram reports +- **Atomic Config Writes** — Settings file writes are now crash-safe +- **Secure Temp Directories** — All temp dirs use `mktemp` for secure random names +- **20+ Bug Fixes** — TUI stability, health check edge cases, Telegram escaping, peer count consistency, and more ## Features @@ -94,8 +56,10 @@ sudo bash conduit.sh - **Telegram Notifications** — Optional periodic status reports and alerts via Telegram bot - **Per-Container Settings** — Configure max-clients, bandwidth, CPU, and memory per container - **Resource Limits** — Set CPU and memory limits with smart defaults based on system specs +- **Easy Management** — Powerful CLI commands or interactive menu - **Backup & Restore** — Backup and restore your node identity keys - **Health Checks** — Comprehensive diagnostics for troubleshooting +- **Info & Help** — Built-in multi-page guide explaining how everything works - **Complete Uninstall** — Clean removal of all components including Telegram service ## Supported Distributions @@ -112,31 +76,105 @@ sudo bash conduit.sh After installation, use the `conduit` command: +### Status & Monitoring ```bash -conduit menu # Open interactive management menu -conduit status # Show current status -conduit stats # Live statistics dashboard -conduit peers # Live peer traffic by country -conduit start # Start all containers -conduit stop # Stop all containers -conduit restart # Restart all containers -conduit update # Update Conduit image -conduit backup # Backup node identity keys -conduit restore # Restore from backup -conduit qr # Show QR code for rewards -conduit health # Run health diagnostics -conduit uninstall # Remove all components +conduit status # Show current status and resource usage +conduit stats # View live statistics (real-time dashboard) +conduit logs # View raw Docker logs +conduit health # Run health check diagnostics +conduit peers # Live peer traffic by country (GeoIP) ``` -## Configuration +### Rewards +```bash +conduit qr # Show QR code to claim rewards via Ryve app +``` + +### Container Management +```bash +conduit start # Start all Conduit containers +conduit stop # Stop all Conduit containers +conduit restart # Restart all Conduit containers +conduit update # Update to the latest Conduit image +``` + +### Configuration +```bash +conduit settings # Change max-clients, bandwidth, CPU, memory per container +conduit menu # Open interactive management menu +``` + +### Backup & Restore +```bash +conduit backup # Backup your node identity keys +conduit restore # Restore node identity from backup +``` + +### Maintenance +```bash +conduit uninstall # Remove all components +conduit version # Show version information +conduit help # Show help message +``` + +## Interactive Menu + +The interactive menu (`conduit menu`) provides access to all features: + +| Option | Description | +|--------|-------------| +| **1** | View status dashboard — real-time stats with active clients and top upload by country | +| **2** | Live connection stats — streaming stats from Docker logs | +| **3** | View logs — raw Docker log output | +| **4** | Live peers by country — per-country traffic table with speed and client counts | +| **5** | Start Conduit | +| **6** | Stop Conduit | +| **7** | Restart Conduit | +| **8** | Update Conduit image | +| **9** | Settings & Tools — resource limits, QR code, backup, restore, health check, Telegram, uninstall | +| **c** | Manage containers — add or remove containers (up to 5) | +| **a** | Advanced stats — top 5 charts for peers, download, upload, unique IPs | +| **i** | Info & Help — multi-page guide with tracker, stats, containers, privacy, about | +| **0** | Exit | + +## Configuration Options | Option | Default | Range | Description | |--------|---------|-------|-------------| -| `max-clients` | 200 | 1–1000 | Max concurrent clients per container | -| `bandwidth` | 5 | 1–40, -1 | Bandwidth limit per peer (Mbps). -1 for unlimited | +| `max-clients` | 200 | 1–1000 | Maximum concurrent proxy clients per container | +| `bandwidth` | 5 | 1–40, -1 | Bandwidth limit per peer (Mbps). Use -1 for unlimited. | | `cpu` | Unlimited | 0.1–N cores | CPU limit per container (e.g. 1.0 = one core) | | `memory` | Unlimited | 64m–system RAM | Memory limit per container (e.g. 256m, 1g) | +**Recommended values based on server hardware:** + +| CPU Cores | RAM | Recommended Containers | Max Clients (per container) | +|-----------|-----|------------------------|-----------------------------| +| 1 Core | < 1 GB | 1 | 100 | +| 2 Cores | 2 GB | 1–2 | 200 | +| 4 Cores | 4 GB+ | 2–3 | 400 | +| 8+ Cores | 8 GB+ | 3–5 | 800 | + +## Installation Options + +```bash +# Standard install +sudo bash conduit.sh + +# Force reinstall +sudo bash conduit.sh --reinstall + +# Uninstall everything +sudo bash conduit.sh --uninstall + +# Show help +sudo bash conduit.sh --help +``` + +## Upgrading + +Just run the install command above or use `conduit update` from the menu. Existing containers are recognized automatically. Telegram settings and node identity keys are preserved across upgrades. + ## Requirements - Linux server (any supported distribution) @@ -144,26 +182,233 @@ conduit uninstall # Remove all components - Internet connection - Minimum 512MB RAM (1GB+ recommended for multi-container) -## Upgrading +## How It Works -Just run the install command above or use `conduit update` from the menu. Existing containers are recognized automatically. Telegram settings are preserved across upgrades. +1. **Detection** — Identifies your Linux distribution and init system +2. **Docker Setup** — Installs Docker if not present +3. **Hardware Check** — Detects CPU/RAM and recommends container count +4. **Container Deployment** — Pulls and runs the official Psiphon Conduit image +5. **Auto-Start Configuration** — Sets up systemd/OpenRC/SysVinit service +6. **Tracker Service** — Starts background traffic tracker with GeoIP resolution +7. **CLI Installation** — Creates the `conduit` management command ## Claim Rewards (OAT Tokens) -1. Install the **Ryve app** on your phone -2. Create a **crypto wallet** within the app -3. Run `conduit qr` or use the menu to show your QR code -4. Scan with Ryve to link your node and start earning +Conduit node operators can earn OAT tokens for contributing to the Psiphon network. To claim rewards: + +1. **Install the Ryve app** on your phone +2. **Create a crypto wallet** within the app +3. **Link your Conduit containers** by scanning the QR code: + - From the menu: Select Settings & Tools **Option 6 → Show QR Code & Conduit ID** + - From Manage Containers: press **[q]** to display QR code + - CLI: `conduit qr` +4. **Scan the QR code** with the Ryve app to link your node +5. **Monitor & earn** — the app shows your last 48 hours of connection activity and OAT token rewards + +> Each container has its own unique Conduit ID and QR code. If running multiple containers, you'll need to link each one separately. ## Security -- **Secure Backups**: Node identity keys stored with restricted permissions (600) +- **Secure Backups**: Node identity keys are stored with restricted permissions (600) - **No Telemetry**: The manager collects no data and sends nothing externally - **Local Tracking Only**: Traffic stats are stored locally and never transmitted - **Telegram Optional**: Bot notifications are opt-in only, zero resources used if disabled --- +