Install and update URLs: GitHub -> Gitea (GitHub repo does not exist, 404)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
17
README.md
17
README.md
@@ -89,26 +89,25 @@ Android-приложения: [VPN-клиент](docs/img/android-vpn.png) · [
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
> **Откуда ставится (с 11.11.2026):** основной источник — GitHub [`adleibzon-rgb/PCA_Phobos`](https://github.com/adleibzon-rgb/PCA_Phobos), запасной — зеркало `git.bobyrev.com/PCA/PCA_Phobos` (обновлятор сам переходит на него, если GitHub недоступен). Старый аккаунт `andrey271192` заблокирован — ссылки на него не работают.
|
> **Откуда ставится:** с Gitea, `git.bobyrev.com/PCA/PCA_Phobos`. GitHub-аккаунты `andrey271192` и `adleibzon-rgb` для установки не используются: первый заблокирован, на втором репозитория нет (ссылки дают 404).
|
||||||
> Серверы на старых версиях (1.2.x–1.4.x) обновляются одной командой:
|
> Серверы на старых версиях (1.2.x–1.4.x) обновляются одной командой:
|
||||||
> ```bash
|
> ```bash
|
||||||
> bash <(curl -fsSL https://raw.githubusercontent.com/adleibzon-rgb/PCA_Phobos/main/update.sh)
|
> bash <(curl -fsSL https://git.bobyrev.com/PCA/PCA_Phobos/raw/branch/main/update.sh)
|
||||||
> ```
|
> ```
|
||||||
> Если GitHub с сервера не открывается — то же с зеркала: `bash <(curl -fsSL https://git.bobyrev.com/PCA/PCA_Phobos/raw/branch/main/update.sh)`
|
|
||||||
|
|
||||||
## Быстрый старт (с чистого VPS, одной командой)
|
## Быстрый старт (с чистого VPS, одной командой)
|
||||||
|
|
||||||
Ставит **всё** со всеми зависимостями: wg-obfuscator, WireGuard, обфускатор-сервисы, веб-панель, nginx, скрипты онбординга роутеров, сторож авто-восстановления. Предустановленный Phobos **не требуется**.
|
Ставит **всё** со всеми зависимостями: wg-obfuscator, WireGuard, обфускатор-сервисы, веб-панель, nginx, скрипты онбординга роутеров, сторож авто-восстановления. Предустановленный Phobos **не требуется**.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
bash <(curl -fsSL https://raw.githubusercontent.com/adleibzon-rgb/PCA_Phobos/main/install.sh)
|
bash <(curl -fsSL https://git.bobyrev.com/PCA/PCA_Phobos/raw/branch/main/install.sh)
|
||||||
```
|
```
|
||||||
|
|
||||||
### С параметрами
|
### С параметрами
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
PANEL_PASS=МойПароль TG_TOKEN=123:abc TG_CHAT=123456789 \
|
PANEL_PASS=МойПароль TG_TOKEN=123:abc TG_CHAT=123456789 \
|
||||||
bash <(curl -fsSL https://raw.githubusercontent.com/adleibzon-rgb/PCA_Phobos/main/install.sh)
|
bash <(curl -fsSL https://git.bobyrev.com/PCA/PCA_Phobos/raw/branch/main/install.sh)
|
||||||
```
|
```
|
||||||
|
|
||||||
| Переменная | По умолчанию | Описание |
|
| Переменная | По умолчанию | Описание |
|
||||||
@@ -131,7 +130,7 @@ DNS клиентов и свой AdGuard Home: [docs/DNS.md](docs/DNS.md). WARP
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
MAIN_PROTO=http MAIN_SERVER=<ip_основного> MAIN_PORT=<порт_панели> MAIN_API_KEY=<API key из основного> \
|
MAIN_PROTO=http MAIN_SERVER=<ip_основного> MAIN_PORT=<порт_панели> MAIN_API_KEY=<API key из основного> \
|
||||||
bash <(curl -fsSL https://raw.githubusercontent.com/adleibzon-rgb/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>`.
|
Сервер сам зарегистрируется в панели, клиенты досылаются на него сразу. Если сервер за NAT — добавь `SERVER_IP=<внешний_ip>`.
|
||||||
@@ -141,7 +140,7 @@ bash <(curl -fsSL https://raw.githubusercontent.com/adleibzon-rgb/PCA_Phobos/mai
|
|||||||
На входном VPS (чистый Debian/Ubuntu, Phobos не нужен):
|
На входном VPS (чистый Debian/Ubuntu, Phobos не нужен):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
bash <(curl -fsSL https://raw.githubusercontent.com/adleibzon-rgb/PCA_Phobos/main/server/phobos-cascade.sh) enable <IP_выходного_сервера> 2083,5443,993
|
bash <(curl -fsSL https://git.bobyrev.com/PCA/PCA_Phobos/raw/branch/main/server/phobos-cascade.sh) enable <IP_выходного_сервера> 2083,5443,993
|
||||||
```
|
```
|
||||||
|
|
||||||
Затем в панели выходного сервера → **Настройки → Адрес для клиентов и каскад** → впиши IP/домен входа. Роутеры переключатся сами (~15 с), телефонам — заново открыть ссылку/QR. Отключить: `phobos-cascade disable`.
|
Затем в панели выходного сервера → **Настройки → Адрес для клиентов и каскад** → впиши IP/домен входа. Роутеры переключатся сами (~15 с), телефонам — заново открыть ссылку/QR. Отключить: `phobos-cascade disable`.
|
||||||
@@ -218,7 +217,7 @@ phobos-update --list # список бэкапов
|
|||||||
**Сервер целиком** (панель, обфускатор, WireGuard `wg0`, nginx-сайт, сторож, правила iptables, каталоги Phobos):
|
**Сервер целиком** (панель, обфускатор, WireGuard `wg0`, nginx-сайт, сторож, правила iptables, каталоги Phobos):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
bash <(curl -fsSL https://raw.githubusercontent.com/adleibzon-rgb/PCA_Phobos/main/uninstall.sh)
|
bash <(curl -fsSL https://git.bobyrev.com/PCA/PCA_Phobos/raw/branch/main/uninstall.sh)
|
||||||
```
|
```
|
||||||
|
|
||||||
Спросит подтверждение — ответь `yes` (или `y` / `да`; до 1.4.6 работал только полный `yes`). Без вопросов: `PURGE=1 bash <(curl -fsSL …/uninstall.sh)`. Перед удалением сохрани бэкап из панели («Настройки» → «Бэкап»), если сервер понадобится снова. Клиенты на других серверах при удалении одного сервера продолжат работать (если есть резервный).
|
Спросит подтверждение — ответь `yes` (или `y` / `да`; до 1.4.6 работал только полный `yes`). Без вопросов: `PURGE=1 bash <(curl -fsSL …/uninstall.sh)`. Перед удалением сохрани бэкап из панели («Настройки» → «Бэкап»), если сервер понадобится снова. Клиенты на других серверах при удалении одного сервера продолжат работать (если есть резервный).
|
||||||
@@ -241,7 +240,7 @@ bash <(curl -fsSL https://raw.githubusercontent.com/adleibzon-rgb/PCA_Phobos/mai
|
|||||||
|
|
||||||
| Симптом | Причина | Решение |
|
| Симптом | Причина | Решение |
|
||||||
|---------|---------|---------|
|
|---------|---------|---------|
|
||||||
| **Команда установки → 403 / 404 / не качается** | старая ссылка (`andrey271192` заблокирован) или GitHub недоступен с сервера | Ссылки только `github.com/adleibzon-rgb/…`; если GitHub не открывается — ставь с зеркала `git.bobyrev.com/PCA/PCA_Phobos/raw/branch/main/install.sh` |
|
| **Команда установки → 403 / 404 / не качается** | ссылка на GitHub (`andrey271192` заблокирован, на `adleibzon-rgb` репозитория нет) | Ставь только с Gitea: `git.bobyrev.com/PCA/PCA_Phobos/raw/branch/main/install.sh` |
|
||||||
| **Удаление: «Отменено»** | старая версия uninstall.sh понимала только `yes` | Набери `yes` полностью или `PURGE=1` |
|
| **Удаление: «Отменено»** | старая версия uninstall.sh понимала только `yes` | Набери `yes` полностью или `PURGE=1` |
|
||||||
| **Панель не открывается** | панель перезапускалась (обновление) / сервер недоступен | Подожди 5 сек, обнови страницу. Проверь: `systemctl status phobos-panel` |
|
| **Панель не открывается** | панель перезапускалась (обновление) / сервер недоступен | Подожди 5 сек, обнови страницу. Проверь: `systemctl status phobos-panel` |
|
||||||
| **Клиент Offline, хотя работает** | роутер на резервном сервере | Норма — статус считается по handshake на **любом** сервере; обнови страницу |
|
| **Клиент Offline, хотя работает** | роутер на резервном сервере | Норма — статус считается по handshake на **любом** сервере; обнови страницу |
|
||||||
|
|||||||
6
app.py
6
app.py
@@ -39,7 +39,7 @@ SECRET_FILE = f"{PANEL_DIR}/.secret_key"
|
|||||||
WG_CONFIG = "/etc/wireguard/wg0.conf"
|
WG_CONFIG = "/etc/wireguard/wg0.conf"
|
||||||
# Distribution: Gitea first (GitHub account is unavailable since 23.10.2026), GitHub fallback
|
# Distribution: Gitea first (GitHub account is unavailable since 23.10.2026), GitHub fallback
|
||||||
PCA_GIT = "https://git.bobyrev.com/PCA/PCA_Phobos"
|
PCA_GIT = "https://git.bobyrev.com/PCA/PCA_Phobos"
|
||||||
PCA_GH_RAW = "https://raw.githubusercontent.com/adleibzon-rgb/PCA_Phobos"
|
PCA_GH_RAW = "https://git.bobyrev.com/PCA/PCA_Phobos/raw/branch"
|
||||||
APK_TAG = "v1.4.10"
|
APK_TAG = "v1.4.10"
|
||||||
WARP_DIR = f"{PHOBOS_DIR}/server/warp"
|
WARP_DIR = f"{PHOBOS_DIR}/server/warp"
|
||||||
WARP_CUSTOM_PROFILE_FILE = f"{WARP_DIR}/custom-profile.conf"
|
WARP_CUSTOM_PROFILE_FILE = f"{WARP_DIR}/custom-profile.conf"
|
||||||
@@ -2724,7 +2724,7 @@ def _fetch_channel_file(channel, name):
|
|||||||
except Exception:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
if channel == "stable": # public: GitHub first, Gitea fallback (09.33)
|
if channel == "stable": # public: GitHub first, Gitea fallback (09.33)
|
||||||
g = subprocess.run(["curl", "-fsSL", "-m", "10", f"https://raw.githubusercontent.com/adleibzon-rgb/PCA_Phobos/main/{name}?cb={int(time.time())}"],
|
g = subprocess.run(["curl", "-fsSL", "-m", "10", f"https://git.bobyrev.com/PCA/PCA_Phobos/raw/branch/main/{name}?cb={int(time.time())}"],
|
||||||
capture_output=True, text=True, timeout=15)
|
capture_output=True, text=True, timeout=15)
|
||||||
if g.returncode == 0 and g.stdout:
|
if g.returncode == 0 and g.stdout:
|
||||||
return g.stdout
|
return g.stdout
|
||||||
@@ -4165,7 +4165,7 @@ def settings_page():
|
|||||||
<b style="color:#22c55e">stable</b> — {tr("стабильная","stable")} ·
|
<b style="color:#22c55e">stable</b> — {tr("стабильная","stable")} ·
|
||||||
<b style="color:#eab308">beta</b> — {tr("тест","testing")} ·
|
<b style="color:#eab308">beta</b> — {tr("тест","testing")} ·
|
||||||
<b style="color:#f97316">dev</b> — {tr("разработка","development")}.
|
<b style="color:#f97316">dev</b> — {tr("разработка","development")}.
|
||||||
{tr("stable — открытый, берётся с GitHub (adleibzon-rgb), запасной — git.bobyrev.com. beta и dev — для подписчиков Boosty: нужен токен подписчика (поле ниже).","stable is open, served from GitHub (adleibzon-rgb) with git.bobyrev.com as fallback. beta and dev are for Boosty subscribers and need a subscriber token (field below).")}</p>
|
{tr("stable — открытый, берётся с git.bobyrev.com. beta и dev — для подписчиков Boosty: нужен токен подписчика (поле ниже).","stable is open, served from GitHub (adleibzon-rgb) with git.bobyrev.com as fallback. beta and dev are for Boosty subscribers and need a subscriber token (field below).")}</p>
|
||||||
<form method="post" class="form-row" style="margin-bottom:8px">
|
<form method="post" class="form-row" style="margin-bottom:8px">
|
||||||
<input type="hidden" name="action" value="save_token">
|
<input type="hidden" name="action" value="save_token">
|
||||||
<input type="password" name="gh_token" placeholder="{tr('токен подписчика (для beta/dev)','subscriber token (for beta/dev)')}" style="width:240px" autocomplete="off">
|
<input type="password" name="gh_token" placeholder="{tr('токен подписчика (для beta/dev)','subscriber token (for beta/dev)')}" style="width:240px" autocomplete="off">
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ PY
|
|||||||
# Источник: Gitea git.bobyrev.com (основной), GitHub — запасной.
|
# Источник: Gitea git.bobyrev.com (основной), GitHub — запасной.
|
||||||
# Каналы stable/beta/dev — ветки main/beta/dev одного публичного репозитория.
|
# Каналы stable/beta/dev — ветки main/beta/dev одного публичного репозитория.
|
||||||
PCA_GIT="${PCA_GIT:-https://git.bobyrev.com/PCA/PCA_Phobos}"
|
PCA_GIT="${PCA_GIT:-https://git.bobyrev.com/PCA/PCA_Phobos}"
|
||||||
GH_RAW="${GH_RAW:-https://raw.githubusercontent.com/adleibzon-rgb/PCA_Phobos}"
|
GH_RAW="${GH_RAW:-https://git.bobyrev.com/PCA/PCA_Phobos/raw/branch}"
|
||||||
CHANNEL="${CHANNEL:-stable}"
|
CHANNEL="${CHANNEL:-stable}"
|
||||||
case "$CHANNEL" in
|
case "$CHANNEL" in
|
||||||
stable|main|"") PCA_BRANCH="${PCA_BRANCH:-main}";;
|
stable|main|"") PCA_BRANCH="${PCA_BRANCH:-main}";;
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ ensure_udptcp() {
|
|||||||
grep -q "^TCP_[0-9]*=" "$CONF" 2>/dev/null || return 0
|
grep -q "^TCP_[0-9]*=" "$CONF" 2>/dev/null || return 0
|
||||||
case "$(uname -m)" in aarch64) a=aarch64 ;; mips*) a=mipsel ;; *) return 0 ;; esac
|
case "$(uname -m)" in aarch64) a=aarch64 ;; mips*) a=mipsel ;; *) return 0 ;; esac
|
||||||
command -v curl >/dev/null || return 0
|
command -v curl >/dev/null || return 0
|
||||||
{ curl -fsSL -m 30 -o /opt/bin/udptcp.tmp "https://raw.githubusercontent.com/adleibzon-rgb/PCA_Phobos/main/udptcp/bin/udptcp-$a" 2>/dev/null \
|
{ curl -fsSL -m 30 -o /opt/bin/udptcp.tmp "https://git.bobyrev.com/PCA/PCA_Phobos/raw/branch/main/udptcp/bin/udptcp-$a" 2>/dev/null \
|
||||||
|| curl -fsSL -m 30 -o /opt/bin/udptcp.tmp "https://git.bobyrev.com/PCA/PCA_Phobos/raw/branch/main/udptcp/bin/udptcp-$a" 2>/dev/null; } \
|
|| curl -fsSL -m 30 -o /opt/bin/udptcp.tmp "https://git.bobyrev.com/PCA/PCA_Phobos/raw/branch/main/udptcp/bin/udptcp-$a" 2>/dev/null; } \
|
||||||
&& [ -s /opt/bin/udptcp.tmp ] && chmod 755 /opt/bin/udptcp.tmp && mv /opt/bin/udptcp.tmp /opt/bin/udptcp \
|
&& [ -s /opt/bin/udptcp.tmp ] && chmod 755 /opt/bin/udptcp.tmp && mv /opt/bin/udptcp.tmp /opt/bin/udptcp \
|
||||||
&& log "PULL: udptcp installed ($a)" || rm -f /opt/bin/udptcp.tmp
|
&& log "PULL: udptcp installed ($a)" || rm -f /opt/bin/udptcp.tmp
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ ensure_udptcp() {
|
|||||||
grep -q "^TCP_[0-9]*=" "$CONF" 2>/dev/null || return 0
|
grep -q "^TCP_[0-9]*=" "$CONF" 2>/dev/null || return 0
|
||||||
case "$(uname -m)" in aarch64) a=aarch64 ;; mips*) a=mipsel ;; *) return 0 ;; esac
|
case "$(uname -m)" in aarch64) a=aarch64 ;; mips*) a=mipsel ;; *) return 0 ;; esac
|
||||||
command -v curl >/dev/null || return 0
|
command -v curl >/dev/null || return 0
|
||||||
{ curl -fsSL -m 30 -o /opt/bin/udptcp.tmp "https://raw.githubusercontent.com/adleibzon-rgb/PCA_Phobos/main/udptcp/bin/udptcp-$a" 2>/dev/null \
|
{ curl -fsSL -m 30 -o /opt/bin/udptcp.tmp "https://git.bobyrev.com/PCA/PCA_Phobos/raw/branch/main/udptcp/bin/udptcp-$a" 2>/dev/null \
|
||||||
|| curl -fsSL -m 30 -o /opt/bin/udptcp.tmp "https://git.bobyrev.com/PCA/PCA_Phobos/raw/branch/main/udptcp/bin/udptcp-$a" 2>/dev/null; } \
|
|| curl -fsSL -m 30 -o /opt/bin/udptcp.tmp "https://git.bobyrev.com/PCA/PCA_Phobos/raw/branch/main/udptcp/bin/udptcp-$a" 2>/dev/null; } \
|
||||||
&& [ -s /opt/bin/udptcp.tmp ] && chmod 755 /opt/bin/udptcp.tmp && mv /opt/bin/udptcp.tmp /opt/bin/udptcp \
|
&& [ -s /opt/bin/udptcp.tmp ] && chmod 755 /opt/bin/udptcp.tmp && mv /opt/bin/udptcp.tmp /opt/bin/udptcp \
|
||||||
&& log "PULL: udptcp installed ($a)" || rm -f /opt/bin/udptcp.tmp
|
&& log "PULL: udptcp installed ($a)" || rm -f /opt/bin/udptcp.tmp
|
||||||
|
|||||||
@@ -316,7 +316,7 @@ RAW="${PCA_RAW_BASE:-https://git.bobyrev.com/PCA/PCA_Phobos/raw/branch/${PCA_BRA
|
|||||||
PANEL_BOOTSTRAP="${MAIN_PROTO}://${MAIN_SERVER}:${MAIN_PORT}/server/api.py"
|
PANEL_BOOTSTRAP="${MAIN_PROTO}://${MAIN_SERVER}:${MAIN_PORT}/server/api.py"
|
||||||
curl -kfsSL "$PANEL_BOOTSTRAP" -o "$PHOBOS_DIR/server/api.py" \
|
curl -kfsSL "$PANEL_BOOTSTRAP" -o "$PHOBOS_DIR/server/api.py" \
|
||||||
|| curl -fsSL "$RAW/server/api.py" -o "$PHOBOS_DIR/server/api.py" \
|
|| curl -fsSL "$RAW/server/api.py" -o "$PHOBOS_DIR/server/api.py" \
|
||||||
|| curl -fsSL "https://raw.githubusercontent.com/adleibzon-rgb/PCA_Phobos/${PCA_BRANCH}/server/api.py" -o "$PHOBOS_DIR/server/api.py"
|
|| curl -fsSL "https://git.bobyrev.com/PCA/PCA_Phobos/raw/branch/${PCA_BRANCH}/server/api.py" -o "$PHOBOS_DIR/server/api.py"
|
||||||
[ -s "$PHOBOS_DIR/server/api.py" ] || { echo "ERROR: api.py fetch failed"; exit 1; }
|
[ -s "$PHOBOS_DIR/server/api.py" ] || { echo "ERROR: api.py fetch failed"; exit 1; }
|
||||||
|
|
||||||
cat > /etc/systemd/system/phobos-api.service << EOF
|
cat > /etc/systemd/system/phobos-api.service << EOF
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
# ============================================================
|
# ============================================================
|
||||||
# PCA Phobos — полное удаление сервера (primary / panel node)
|
# PCA Phobos — полное удаление сервера (primary / panel node)
|
||||||
#
|
#
|
||||||
# bash <(curl -fsSL https://raw.githubusercontent.com/adleibzon-rgb/PCA_Phobos/main/uninstall.sh)
|
# bash <(curl -fsSL https://git.bobyrev.com/PCA/PCA_Phobos/raw/branch/main/uninstall.sh)
|
||||||
#
|
#
|
||||||
# Останавливает и удаляет: панель, обфускатор-сервисы, WireGuard wg0,
|
# Останавливает и удаляет: панель, обфускатор-сервисы, WireGuard wg0,
|
||||||
# nginx-сайт, watchdog-cron, бинарники, iptables-правила, каталоги Phobos.
|
# nginx-сайт, watchdog-cron, бинарники, iptables-правила, каталоги Phobos.
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ set -e
|
|||||||
PHOBOS_DIR=/opt/Phobos
|
PHOBOS_DIR=/opt/Phobos
|
||||||
PANEL_DIR=/opt/phobos-panel
|
PANEL_DIR=/opt/phobos-panel
|
||||||
PCA_GIT="${PCA_GIT:-https://git.bobyrev.com/PCA/PCA_Phobos}"
|
PCA_GIT="${PCA_GIT:-https://git.bobyrev.com/PCA/PCA_Phobos}"
|
||||||
GH_RAW="${GH_RAW:-https://raw.githubusercontent.com/adleibzon-rgb/PCA_Phobos}"
|
GH_RAW="${GH_RAW:-https://git.bobyrev.com/PCA/PCA_Phobos/raw/branch}"
|
||||||
BACKUPS="$PHOBOS_DIR/updates"
|
BACKUPS="$PHOBOS_DIR/updates"
|
||||||
VERFILE="$PANEL_DIR/.version"
|
VERFILE="$PANEL_DIR/.version"
|
||||||
CUR=$(cat "$VERFILE" 2>/dev/null || echo "unknown")
|
CUR=$(cat "$VERFILE" 2>/dev/null || echo "unknown")
|
||||||
|
|||||||
Reference in New Issue
Block a user