Full Update to v1.1: README and conduit script

This commit is contained in:
Sam
2026-01-28 21:55:17 -06:00
parent 77bf8bc5ae
commit cb62da4c6e
2 changed files with 2638 additions and 1008 deletions

233
README.md
View File

@@ -1,5 +1,21 @@
# Conduit Manager
```
██████╗ ██████╗ ███╗ ██╗██████╗ ██╗ ██╗██╗████████╗
██╔════╝██╔═══██╗████╗ ██║██╔══██╗██║ ██║██║╚══██╔══╝
██║ ██║ ██║██╔██╗ ██║██║ ██║██║ ██║██║ ██║
██║ ██║ ██║██║╚██╗██║██║ ██║██║ ██║██║ ██║
╚██████╗╚██████╔╝██║ ╚████║██████╔╝╚██████╔╝██║ ██║
╚═════╝ ╚═════╝ ╚═╝ ╚═══╝╚═════╝ ╚═════╝ ╚═╝ ╚═╝
M A N A G E R
```
![Version](https://img.shields.io/badge/version-1.1-blue)
![License](https://img.shields.io/badge/license-MIT-green)
![Platform](https://img.shields.io/badge/platform-Linux-orange)
![Docker](https://img.shields.io/badge/Docker-Required-2496ED?logo=docker&logoColor=white)
![Bash](https://img.shields.io/badge/Bash-Script-4EAA25?logo=gnubash&logoColor=white)
A powerful management tool for deploying and managing Psiphon Conduit nodes on Linux servers. Help users access the open internet during network restrictions.
## Quick Install
@@ -15,21 +31,35 @@ wget https://raw.githubusercontent.com/SamNet-dev/conduit-manager/main/conduit.s
sudo bash conduit.sh
```
## What's New in v1.1
- **Multi-Container Support** — Run up to 5 Conduit containers on a single server for higher throughput
- **Background Traffic Tracker** — Continuous tcpdump-based tracker service with per-country GeoIP stats
- **Advanced Stats Page** — Live dashboard with top countries by peers, download, upload, and unique IPs (bar charts, auto-refresh)
- **Live Dashboard Overhaul** — Side-by-side active clients and top upload by country with real-time bars
- **Per-Container Settings** — Configure max-clients and bandwidth individually for each container
- **Container Manager** — Add or remove containers on the fly with auto-refreshing status view
- **Smart Install** — Detects CPU cores and RAM, recommends container count for your hardware
- **Info & Help Hub** — Multi-page guide covering the tracker, stats, containers, privacy, and about
- **Service Auto-Recovery** — Automatically restarts failed conduit.service on script launch
- **Seamless Upgrade** — Existing v1.0.x users can run the new script without reinstalling; old containers are recognized automatically
## Features
- **One-Click Deployment** - Automatically installs Docker and configures everything
- **Multi-Distro Support** - Works on Ubuntu, Debian, CentOS, Fedora, Arch, Alpine, openSUSE
- **Auto-Start on Boot** - Supports systemd, OpenRC, and SysVinit
- **Live Monitoring** - Real-time connection stats with CPU/RAM monitoring
- **Live Peer Traffic** - Real-time traffic monitoring by country with GeoIP lookup
- **Easy Management** - Powerful CLI commands or interactive menu
- **Backup & Restore** - Backup and restore your node identity key
- **Health Checks** - Comprehensive diagnostics for troubleshooting
- **Complete Uninstall** - Clean removal of all components
![Conduit Manager Menu](conduitmenu.png)
![Live Peer Traffic](conduitpeers.png)
- **One-Click Deployment** Automatically installs Docker and configures everything
- **Multi-Container Scaling** — Run 15 containers to maximize your server's capacity
- **Multi-Distro Support** — Works on Ubuntu, Debian, CentOS, Fedora, Arch, Alpine, openSUSE
- **Auto-Start on Boot** — Supports systemd, OpenRC, and SysVinit
- **Live Dashboard** Real-time connection stats with CPU/RAM monitoring and per-country client breakdown
- **Advanced Stats** — Top countries by connected peers, download, upload, and unique IPs with bar charts
- **Live Peer Traffic** — Real-time traffic table by country with speed, total bytes, and IP/client counts
- **Background Tracker** Continuous traffic monitoring via systemd service with GeoIP resolution
- **Per-Container Settings** Configure max-clients and bandwidth per container
- **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
## Supported Distributions
@@ -48,7 +78,7 @@ After installation, use the `conduit` command:
### Status & Monitoring
```bash
conduit status # Show current status and resource usage
conduit stats # View live statistics (real-time)
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)
@@ -56,21 +86,21 @@ conduit peers # Live peer traffic by country (GeoIP)
### Container Management
```bash
conduit start # Start the Conduit container
conduit stop # Stop the Conduit container
conduit restart # Restart the Conduit container
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 and bandwidth
conduit settings # Change max-clients and bandwidth per container
conduit menu # Open interactive management menu
```
### Backup & Restore
```bash
conduit backup # Backup your node identity key
conduit backup # Backup your node identity keys
conduit restore # Restore node identity from backup
```
@@ -81,21 +111,40 @@ 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** | Live Dashboard — real-time stats with active clients and top upload by country |
| **2** | Start / Stop / Restart containers |
| **3** | Update Conduit image |
| **4** | Live Peer Traffic — per-country traffic table with speed and client counts |
| **5** | Container Settings — configure max-clients and bandwidth per container |
| **6** | Manage Containers — add or remove containers (up to 5) |
| **7** | Backup & Restore node identity |
| **8** | Health Check diagnostics |
| **9** | Uninstall |
| **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 | Maximum concurrent proxy clients |
| `bandwidth` | 5 | 1-40, -1 | Bandwidth limit per peer (Mbps). Use -1 for unlimited. |
| `max-clients` | 200 | 11000 | Maximum concurrent proxy clients per container |
| `bandwidth` | 5 | 140, -1 | Bandwidth limit per peer (Mbps). Use -1 for unlimited. |
**Recommended values based on server CPU:**
**Recommended values based on server hardware:**
| CPU Cores | Max Clients |
|-----------|-------------|
| 8+ Cores | 800 |
| 4 Cores | 400 |
| 2 Cores | 200 |
| 1 Core | 100 |
| CPU Cores | RAM | Recommended Containers | Max Clients (per container) |
|-----------|-----|------------------------|-----------------------------|
| 1 Core | < 1 GB | 1 | 100 |
| 2 Cores | 2 GB | 12 | 200 |
| 4 Cores | 4 GB+ | 23 | 400 |
| 8+ Cores | 8 GB+ | 35 | 800 |
## Installation Options
@@ -113,25 +162,32 @@ sudo bash conduit.sh --uninstall
sudo bash conduit.sh --help
```
## Upgrading from v1.0.x
Just run the new script. When prompted, select **"Open management menu"** — your existing container is recognized automatically. No reinstall needed. The background tracker service starts when you next start/restart from the menu.
## Requirements
- Linux server (any supported distribution)
- Root/sudo access
- Internet connection
- Minimum 512MB RAM (1GB+ recommended)
- Minimum 512MB RAM (1GB+ recommended for multi-container)
## How It Works
1. **Detection** - Identifies your Linux distribution and init system
2. **Docker Setup** - Installs Docker if not present
3. **Container Deployment** - Pulls and runs the official Psiphon Conduit image
5. **Auto-Start Configuration** - Sets up systemd/OpenRC/SysVinit service
6. **CLI Installation** - Creates the `conduit` management command
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
## Security
- **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
---
@@ -139,7 +195,7 @@ sudo bash conduit.sh --help
# راهنمای فارسی - مدیریت کاندوییت
ابزار قدرتمند برای راه‌اندازی و مدیریت نود سایفون کاندوییت روی سرورهای لینوکس.
ابزار قدرتمند برای راه‌اندازی و مدیریت نود سایفون کاندوییت روی سرورهای لینوکس. به کاربران کمک کنید تا در زمان محدودیت‌های اینترنتی به اینترنت آزاد دسترسی داشته باشند.
## نصب سریع
@@ -156,24 +212,42 @@ wget https://raw.githubusercontent.com/SamNet-dev/conduit-manager/main/conduit.s
sudo bash conduit.sh
```
## تازه‌های نسخه 1.1
- **پشتیبانی از چند کانتینر** — اجرای تا ۵ کانتینر روی یک سرور برای ظرفیت بیشتر
- **ردیاب ترافیک پس‌زمینه** — سرویس ردیابی مداوم با آمار جغرافیایی به تفکیک کشور
- **صفحه آمار پیشرفته** — داشبورد زنده با نمودار میله‌ای برای برترین کشورها
- **داشبورد بازطراحی شده** — نمایش کلاینت‌های فعال و آپلود برتر به تفکیک کشور
- **تنظیمات هر کانتینر** — پیکربندی جداگانه حداکثر کاربران و پهنای باند
- **مدیریت کانتینرها** — اضافه یا حذف کانتینر به صورت آنی
- **نصب هوشمند** — تشخیص CPU و RAM و پیشنهاد تعداد کانتینر مناسب
- **بخش راهنما** — راهنمای چندصفحه‌ای شامل ردیاب، آمار، کانتینرها، حریم خصوصی و درباره ما
- **بازیابی خودکار سرویس** — ریستارت خودکار سرویس در صورت خرابی
- **ارتقا بدون نصب مجدد** — کاربران نسخه قبلی بدون نیاز به نصب مجدد می‌توانند آپدیت کنند
## ویژگی‌ها
- **نصب با یک کلیک** - داکر و تمام موارد مورد نیاز به صورت خودکار نصب می‌شود
- **پشتیبانی از توزیع‌های مختلف** - اوبونتو، دبیان، سنت‌اواس، فدورا، آرچ، آلپاین
- **راه‌اندازی خودکار** - پس از ریستارت سرور، سرویس به صورت خودکار اجرا می‌شود
- **مانیتورینگ زنده** - نمایش تعداد کاربران متصل و مصرف منابع
- **مانیتورینگ ترافیک** - نمایش لحظه‌ای ترافیک بر اساس کشور با GeoIP
- **مدیریت آسان** - دستورات قدرتمند CLI یا منوی تعاملی
- **پشتیبان‌گیری و بازیابی** - پشتیبان‌گیری و بازیابی کلید هویت نود
- **بررسی سلامت** - تشخیص جامع برای عیب‌یابی
- **حذف کامل** - پاکسازی تمام فایل‌ها و تنظیمات
- **نصب با یک کلیک** داکر و تمام موارد مورد نیاز به صورت خودکار نصب می‌شود
- **مقیاس‌پذیری چند کانتینره** — اجرای ۱ تا ۵ کانتینر برای حداکثر استفاده از سرور
- **پشتیبانی از توزیع‌های مختلف** — اوبونتو، دبیان، سنت‌اواس، فدورا، آرچ، آلپاین
- **راه‌اندازی خودکار** — پس از ریستارت سرور، سرویس به صورت خودکار اجرا می‌شود
- **داشبورد زنده** نمایش لحظه‌ای وضعیت، تعداد کاربران، مصرف CPU و RAM
- **آمار پیشرفته** — نمودار میله‌ای برترین کشورها بر اساس اتصال، دانلود، آپلود و IP
- **مانیتورینگ ترافیک** — جدول لحظه‌ای ترافیک بر اساس کشور با سرعت و تعداد کلاینت
- **ردیاب پس‌زمینه** — سرویس ردیابی مداوم ترافیک با تشخیص جغرافیایی
- **تنظیمات هر کانتینر** پیکربندی حداکثر کاربران و پهنای باند برای هر کانتینر
- **مدیریت آسان** — دستورات قدرتمند CLI یا منوی تعاملی
- **پشتیبان‌گیری و بازیابی** — پشتیبان‌گیری و بازیابی کلیدهای هویت نود
- **بررسی سلامت** — تشخیص جامع برای عیب‌یابی
- **راهنما و اطلاعات** — راهنمای چندصفحه‌ای داخلی
- **حذف کامل** — پاکسازی تمام فایل‌ها و تنظیمات
## دستورات CLI
### وضعیت و مانیتورینگ
```bash
conduit status # نمایش وضعیت و مصرف منابع
conduit stats # آمار زنده (لحظه‌ای)
conduit stats # داشبورد زنده (لحظه‌ای)
conduit logs # لاگ‌های داکر
conduit health # بررسی سلامت سیستم
conduit peers # ترافیک بر اساس کشور (GeoIP)
@@ -181,22 +255,22 @@ conduit peers # ترافیک بر اساس کشور (GeoIP)
### مدیریت کانتینر
```bash
conduit start # شروع کانتینر
conduit stop # توقف کانتینر
conduit restart # ریستارت کانتینر
conduit start # شروع تمام کانتینرها
conduit stop # توقف تمام کانتینرها
conduit restart # ریستارت تمام کانتینرها
conduit update # به‌روزرسانی به آخرین نسخه
```
### پیکربندی
```bash
conduit settings # تغییر تنظیمات
conduit settings # تغییر تنظیمات هر کانتینر
conduit menu # منوی تعاملی
```
### پشتیبان‌گیری و بازیابی
```bash
conduit backup # پشتیبان‌گیری از کلید نود
conduit restore # بازیابی کلید نود از پشتیبان
conduit backup # پشتیبان‌گیری از کلیدهای نود
conduit restore # بازیابی کلیدهای نود از پشتیبان
```
### نگهداری
@@ -206,28 +280,65 @@ conduit version # نمایش نسخه
conduit help # راهنما
```
## منوی تعاملی
| گزینه | توضیحات |
|-------|---------|
| **1** | داشبورد زنده — آمار لحظه‌ای با کلاینت‌های فعال و آپلود برتر |
| **2** | شروع / توقف / ریستارت کانتینرها |
| **3** | به‌روزرسانی ایمیج |
| **4** | ترافیک زنده — جدول ترافیک به تفکیک کشور |
| **5** | تنظیمات کانتینر — پیکربندی هر کانتینر |
| **6** | مدیریت کانتینرها — اضافه یا حذف (تا ۵) |
| **7** | پشتیبان‌گیری و بازیابی |
| **8** | بررسی سلامت |
| **9** | حذف نصب |
| **a** | آمار پیشرفته — نمودار برترین کشورها |
| **i** | راهنما — توضیحات ردیاب، آمار، کانتینرها، حریم خصوصی |
| **0** | خروج |
## تنظیمات
| گزینه | پیش‌فرض | محدوده | توضیحات |
|-------|---------|--------|---------|
| `max-clients` | 200 | 1-1000 | حداکثر کاربران همزمان |
| `bandwidth` | 5 | 1-40, -1 | محدودیت پهنای باند (Mbps). برای نامحدود -1 وارد کنید. |
| `max-clients` | 200 | ۱۱۰۰۰ | حداکثر کاربران همزمان برای هر کانتینر |
| `bandwidth` | 5 | ۱–۴۰ یا ۱- | محدودیت پهنای باند (Mbps). برای نامحدود ۱- وارد کنید. |
**مقادیر پیشنهادی بر اساس پردازنده (CPU):**
**مقادیر پیشنهادی بر اساس سخت‌افزار سرور:**
| تعداد هسته | حداکثر کاربران |
|------------|----------------|
| +8 هسته | 800 |
| 4 هسته | 400 |
| 2 هسته | 200 |
| 1 هسته | 100 |
| پردازنده | رم | کانتینر پیشنهادی | حداکثر کاربران (هر کانتینر) |
|----------|-----|-------------------|----------------------------|
| ۱ هسته | کمتر از ۱ گیگ | ۱ | ۱۰۰ |
| ۲ هسته | ۲ گیگ | ۱–۲ | ۲۰۰ |
| ۴ هسته | ۴ گیگ+ | ۲–۳ | ۴۰۰ |
| ۸+ هسته | ۸ گیگ+ | ۳–۵ | ۸۰۰ |
## ارتقا از نسخه 1.0.x
فقط اسکریپت جدید را اجرا کنید. وقتی سوال پرسیده شد، گزینه **«Open management menu»** را انتخاب کنید. کانتینر موجود شما به صورت خودکار شناسایی می‌شود. نیازی به نصب مجدد نیست.
## پیش‌نیازها
- سرور لینوکس
- دسترسی root یا sudo
- اتصال اینترنت
- حداقل 512 مگابایت رم
- حداقل ۵۱۲ مگابایت رم (۱ گیگ+ برای چند کانتینر پیشنهاد می‌شود)
## نحوه عملکرد
1. **تشخیص** — شناسایی توزیع لینوکس و سیستم init
2. **نصب داکر** — در صورت نبود، داکر نصب می‌شود
3. **بررسی سخت‌افزار** — تشخیص CPU و RAM و پیشنهاد تعداد کانتینر
4. **راه‌اندازی کانتینر** — دانلود و اجرای ایمیج رسمی سایفون
5. **پیکربندی سرویس** — تنظیم سرویس خودکار (systemd/OpenRC/SysVinit)
6. **سرویس ردیاب** — شروع ردیاب ترافیک پس‌زمینه
7. **نصب CLI** — ایجاد دستور مدیریت `conduit`
## امنیت
- **پشتیبان‌گیری امن**: کلیدهای هویت نود با دسترسی محدود (600) ذخیره می‌شوند
- **بدون تلمتری**: هیچ داده‌ای جمع‌آوری یا ارسال نمی‌شود
- **ردیابی محلی**: آمار ترافیک فقط به صورت محلی ذخیره شده و هرگز ارسال نمی‌شود
</div>

3379
conduit.sh

File diff suppressed because it is too large Load Diff