diff --git a/README.md b/README.md index a1833c0..a07a16a 100644 --- a/README.md +++ b/README.md @@ -73,19 +73,24 @@ --- +> **Источник с 23.10.2026:** `git.bobyrev.com/PCA/PCA_Phobos` (GitHub-аккаунт временно недоступен). Серверы на 1.2.x обновляются одной командой: +> ```bash +> bash <(curl -fsSL https://git.bobyrev.com/PCA/PCA_Phobos/raw/branch/main/update.sh) +> ``` + ## Быстрый старт (с чистого VPS, одной командой) Ставит **всё** со всеми зависимостями: wg-obfuscator, WireGuard, обфускатор-сервисы, веб-панель, nginx, скрипты онбординга роутеров, сторож авто-восстановления. Предустановленный Phobos **не требуется**. ```bash -bash <(curl -fsSL https://raw.githubusercontent.com/andrey271192/PCA_Phobos/main/install.sh) +bash <(curl -fsSL https://git.bobyrev.com/PCA/PCA_Phobos/raw/branch/main/install.sh) ``` ### С параметрами ```bash PANEL_PASS=МойПароль TG_TOKEN=123:abc TG_CHAT=123456789 \ -bash <(curl -fsSL https://raw.githubusercontent.com/andrey271192/PCA_Phobos/main/install.sh) +bash <(curl -fsSL https://git.bobyrev.com/PCA/PCA_Phobos/raw/branch/main/install.sh) ``` | Переменная | По умолчанию | Описание | @@ -106,7 +111,7 @@ bash <(curl -fsSL https://raw.githubusercontent.com/andrey271192/PCA_Phobos/main ```bash MAIN_PROTO=http MAIN_SERVER= MAIN_PORT=<порт_панели> MAIN_API_KEY= \ -bash <(curl -fsSL https://raw.githubusercontent.com/andrey271192/PCA_Phobos/main/server/secondary-setup.sh) +bash <(curl -fsSL https://git.bobyrev.com/PCA/PCA_Phobos/raw/branch/main/server/secondary-setup.sh) ``` Сервер сам зарегистрируется в панели, клиенты досылаются на него сразу. Если сервер за NAT — добавь `SERVER_IP=<внешний_ip>`. @@ -116,7 +121,7 @@ bash <(curl -fsSL https://raw.githubusercontent.com/andrey271192/PCA_Phobos/main На входном VPS (чистый Debian/Ubuntu, Phobos не нужен): ```bash -bash <(curl -fsSL https://raw.githubusercontent.com/andrey271192/PCA_Phobos/main/server/phobos-cascade.sh) enable 2083,5443,993 +bash <(curl -fsSL https://git.bobyrev.com/PCA/PCA_Phobos/raw/branch/main/server/phobos-cascade.sh) enable 2083,5443,993 ``` Затем в панели выходного сервера → **Настройки → Адрес для клиентов и каскад** → впиши IP/домен входа. Роутеры переключатся сами (~15 с), телефонам — заново открыть ссылку/QR. Отключить: `phobos-cascade disable`. @@ -131,8 +136,8 @@ bash <(curl -fsSL https://raw.githubusercontent.com/andrey271192/PCA_Phobos/main ## Приложения для Android -- **PCA Phobos VPN** — клиент: включает VPN одной кнопкой, импорт `phobos://` из панели, встроенный обфускатор, **раздельный трафик** (весь / только выбранные приложения / все кроме выбранных), журнал, проверка скорости. [Скачать APK](https://github.com/andrey271192/PCA_Phobos/releases/latest/download/PCA-Phobos-VPN.apk) · исходники `android-client/`. -- **PCA Phobos** (админ) — список ваших панелей, открываются в приложении. [Скачать APK](https://github.com/andrey271192/PCA_Phobos/releases/latest/download/PCA-Phobos.apk) · исходники `android/`. +- **PCA Phobos VPN** — клиент: включает VPN одной кнопкой, импорт `phobos://` из панели, встроенный обфускатор, **раздельный трафик** (весь / только выбранные приложения / все кроме выбранных), журнал, проверка скорости. [Скачать APK](https://git.bobyrev.com/PCA/PCA_Phobos/releases/download/v1.4.0/PCA-Phobos-VPN.apk) · исходники `android-client/`. +- **PCA Phobos** (админ) — список ваших панелей, открываются в приложении. [Скачать APK](https://git.bobyrev.com/PCA/PCA_Phobos/releases/download/v1.4.0/PCA-Phobos.apk) · исходники `android/`. ## Клиенты для телефона diff --git a/app.py b/app.py index 3b6151c..caea5c1 100644 --- a/app.py +++ b/app.py @@ -34,6 +34,10 @@ PANEL_DIR = "/opt/phobos-panel" SETTINGS_FILE = f"{PANEL_DIR}/settings.json" SECRET_FILE = f"{PANEL_DIR}/.secret_key" WG_CONFIG = "/etc/wireguard/wg0.conf" +# Distribution: Gitea first (GitHub account is unavailable since 23.10.2026), GitHub fallback +PCA_GIT = "https://git.bobyrev.com/PCA/PCA_Phobos" +PCA_GH_RAW = "https://raw.githubusercontent.com/andrey271192/PCA_Phobos" +APK_TAG = "v1.4.0" WARP_DIR = f"{PHOBOS_DIR}/server/warp" WARP_CUSTOM_PROFILE_FILE = f"{WARP_DIR}/custom-profile.conf" WARP_LICENSE_FILE = f"{WARP_DIR}/license.key" @@ -1058,26 +1062,17 @@ def _find_update_runner(): def _restore_update_script(ref): - repo, branch = _update_repo_for_ref(ref) - token = "" - try: - token = Path(GH_TOKEN_FILE).read_text().strip() - except Exception: - pass - cmd = ["curl", "-fsSL", "-m", "25"] - if repo.endswith("-dev") and token: - cmd += ["-H", f"Authorization: token {token}"] - cmd += ["-H", "Accept: application/vnd.github.raw"] - url = f"https://api.github.com/repos/{repo}/contents/update.sh?ref={branch}" - else: - if token: - cmd += ["-H", f"Authorization: token {token}"] - url = f"https://raw.githubusercontent.com/{repo}/{branch}/update.sh?cb={int(time.time())}" - cmd.append(url) - r = subprocess.run(cmd, capture_output=True, text=True, timeout=35) - if r.returncode != 0 or not (r.stdout or "").startswith("#!"): - hint = "subscriber token missing or invalid" if repo.endswith("-dev") and not token else (r.stderr or "download failed") - return False, f"update helper restore failed from {repo}/{branch}: {hint}" + _repo, branch = _update_repo_for_ref(ref) + kind = "tag" if branch.startswith("v") else "branch" + r = None + for url in (f"{PCA_GIT}/raw/{kind}/{branch}/update.sh", f"{PCA_GH_RAW}/{branch}/update.sh"): + r = subprocess.run(["curl", "-fsSL", "-m", "25", f"{url}?cb={int(time.time())}"], + capture_output=True, text=True, timeout=35) + if r.returncode == 0 and (r.stdout or "").startswith("#!"): + break + if r is None or r.returncode != 0 or not (r.stdout or "").startswith("#!"): + return False, f"update helper restore failed for {branch}: {(r.stderr if r else '') or 'download failed'}" + repo = PCA_GIT os.makedirs(os.path.dirname(UPDATE_SCRIPT), exist_ok=True) tmp = UPDATE_SCRIPT + ".tmp" Path(tmp).write_text(r.stdout) @@ -1812,7 +1807,7 @@ textarea::placeholder{color:var(--muted)} CONTENT