Commit Graph

6 Commits

Author SHA1 Message Date
Андрей Бобырев
390501ad34 fix: pull router config through tunnel iface 2026-06-01 01:50:37 +03:00
Андрей Бобырев
e430d1a70c fix: recover secondary API key handling 2026-06-01 00:54:26 +03:00
phobos
d5313d3572 secondary-setup: fetch agent api.py (with /api/router-config); README turnkey 2026-05-30 13:47:14 +03:00
phobos
fff45ca342 turnkey installer: full primary stack one-command + session improvements
- install.sh: rewritten as self-contained turnkey primary installer (deps,
  wg-obfuscator from Ground-Zerro, wg0, obfuscator services, Phobos repo +
  PCA overlay patches, web panel, nginx, router watchdog).
- app.py: current panel (RU/EN, tunnel-pull config endpoint, fan-out, load-aware
  rebalance, online-anywhere status, '?' help).
- overlay/: patched onboarding scripts (phobos-client.sh 403 fix,
  install-router.sh.template tunnel-pull+cron+client_id, router-configure-wireguard
  public WG, phobos-pull.sh tunnel-first).
- server/: phobos-health.sh (self-heal+apply-server), phobos-pull.sh,
  phobos-router-watchdog.py, api.py (agent + /api/router-config).
2026-05-30 13:39:49 +03:00
Андрей Бобырев
5badb15d75 feat: safety checks + backup + uninstall for secondary-setup.sh
Pre-flight checks before installation:
- Detect existing WireGuard, Phobos clients, tokens, server.env
- Check port conflicts (obfuscator ports, 51820, 8444)
- Check running conflicting services
- Pause with warning count if issues found

Safety during install:
- Auto-backup existing configs to /opt/Phobos/backup/TIMESTAMP/
- Preserve existing wg0.conf if found (reuse keys)
- Skip obfuscator binary download if already installed

Clean uninstall script:
- /opt/Phobos/server/phobos-secondary-uninstall.sh
- Stops all services, removes configs and systemd units
- Preserves backup directory
- Removes iptables rules

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-29 00:03:19 +03:00
Андрей Бобырев
4f1fca5222 feat: multi-server failover, health monitor, port hopping
- client/phobos-health.sh: router-side health monitor + auto-heal
  - Cron every 60s, checks WG handshake age
  - Auto-restart obfuscator (3min), WireGuard (5min)
  - Port hopping (10min), server failover (15min)
  - Auto-return to primary when recovered
- client/failover.conf.example: multi-server config template
- server/secondary-setup.sh: one-command secondary server deploy
  - WG + multi-port obfuscator + mini-API on :8444
  - Auto-registers with main server
- Panel: new "Серверы" page
  - Add/remove secondary servers
  - Health check, peer sync, fetch info
  - API key management
  - Secondary server install command

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-28 23:28:34 +03:00