[INFRA] migrate active old VPS 193.233.210.184 to 45.133.209.253
lint / hygiene (push) Failing after 30s
lint / hygiene (pull_request) Failing after 21s
standard / check (push) Successful in 9s
standard / check (pull_request) Successful in 14s

This commit is contained in:
architect committed 2026-12-02 18:00:21 +03:00
1 parent d2c6a1a51f
commit c985c0617b
107 files changed
+304 -186

No files matched your search

+1 -1
View File
@@ -28,7 +28,7 @@ PG_USER=matrix
DOMAIN=matrix.buryans.ru
ELEMENT_DOMAIN=element.buryans.ru
VPS_IP=193.233.210.184
VPS_IP=45.133.209.253
AUTHENTIK_ISSUER=https://authentik.buryans.ru/application/o/matrix/
WORKDIR=/opt/matrix
+1 -1
View File
@@ -101,7 +101,7 @@
{
"parameters": {
"method": "POST",
"url": "https://193.233.210.184/tg-api/bot8668603602:AAHVmUmq44dcomw8QOfw_qj1aICXuT5c5XU/sendMessage",
"url": "https://45.133.209.253/tg-api/bot8668603602:AAHVmUmq44dcomw8QOfw_qj1aICXuT5c5XU/sendMessage",
"sendHeaders": true,
"headerParameters": {
"parameters": [
+1 -1
View File
@@ -6,7 +6,7 @@
# Собираю факты: что на нём реально работает и без чего дом не обойдётся.
# ============================================================
set -uo pipefail
VPS=193.233.210.184
VPS=45.133.209.253
echo "=== 1. ЧТО РАБОТАЕТ НА VPS ==="
ssh -o BatchMode=yes -o ConnectTimeout=20 root@$VPS 'systemctl list-units --type=service --state=running 2>/dev/null | grep -vE "systemd-|dbus|ssh|cron|getty|rsyslog|networking|polkit|unattended|man-db|qemu|lvmetad" | head -12' 2>&1 | sed 's/^/ /'
+2 -2
View File
@@ -1,5 +1,5 @@
# Реестр автоматизаций Buryans Hub
# Сгенерировано: 2026-12-02 06:40 (ops/scripts/build_automations_registry.py)
# Сгенерировано: 2026-12-02 15:27 (ops/scripts/build_automations_registry.py)
total: 196
by_source:
cron.d: 49
@@ -135,7 +135,7 @@ items:
- {"source": "hermes", "job": "disk-trend", "schedule": "daily 07:45", "command": "df -h / /mnt/media /mnt/archive | tail -3"}
- {"source": "hermes", "job": "verify-services", "schedule": "every 3600s", "command": "curl -s --max-time 20 http://127.0.0.1:9120/status.json | /opt/music-tools/venv/bin/python -c \"import json,sys; d=json.load(sys.stdin); bad=[s['name'] for s in "}
- {"source": "hermes", "job": "update-plan", "schedule": "daily 08:45", "command": "/opt/music-tools/venv/bin/python /opt/hub-core/update_plan.py"}
- {"source": "hermes", "job": "home-heartbeat", "schedule": "every 300s", "command": "for h in [email protected] root@193.233.210.184; do for i in 1 2; do ssh -o BatchMode=yes -o ConnectTimeout=10 -o ServerAliveInterval=5 $h \"date +%s > /var/lib/hom"}
- {"source": "hermes", "job": "home-heartbeat", "schedule": "every 300s", "command": "for h in [email protected] root@45.133.209.253; do for i in 1 2; do ssh -o BatchMode=yes -o ConnectTimeout=10 -o ServerAliveInterval=5 $h \"date +%s > /var/lib/hom"}
- {"source": "hermes", "job": "export-service-metrics", "schedule": "every 120s", "command": "/usr/bin/python3 /opt/buryan-hub/scripts/export-service-metrics.py"}
- {"source": "hermes", "job": "direct-health-check", "schedule": "every 300s", "command": "/usr/bin/python3 /opt/buryan-hub/scripts/direct-health-check.py"}
- {"source": "hermes", "job": "check-services", "schedule": "every 300s", "command": "/opt/buryan-hub/scripts/check-services.sh"}
+1 -1
View File
@@ -81,7 +81,7 @@ cat > /tmp/catalog-loc.conf <<'EOF'
proxy_read_timeout 120s;
}
EOF
for target in "193.233.210.184" "local"; do
for target in "45.133.209.253" "local"; do
if [ "$target" = "local" ]; then
python3 - <<'PY'
import re
@@ -1,4 +1,4 @@
generated_at: '2026-12-02T08:57:40'
generated_at: '2026-12-02T17:57:46'
status: staging
models:
- vendor: audiocodes
+1 -1
View File
@@ -6,7 +6,7 @@
# У HA своя авторизация, и мобильное приложение работает с ней напрямую.
# ============================================================
set -uo pipefail
VPS=193.233.210.184
VPS=45.133.209.253
HCONF=/etc/nginx/conf.d/buryans-all.conf
VCONF=/etc/nginx/conf.d/buryans-all.conf
+1 -1
View File
@@ -27,7 +27,7 @@ update-plan:
retries: 0
notify_on_success: false
home-heartbeat:
command: ssh -o BatchMode=yes -o ConnectTimeout=10 root@193.233.210.184 'date +%s > /var/lib/home-hb'
command: ssh -o BatchMode=yes -o ConnectTimeout=10 root@45.133.209.253 'date +%s > /var/lib/home-hb'
every_seconds: 300
timeout: 40
retries: 1
@@ -0,0 +1,40 @@
# OLD VPS IP MIGRATION — 2026-12-02
Старый VPS: `193.233.210.184`
Новый VPS: `45.133.209.253`
## Что изменено
- `/root/.ssh/config` — `buryan-vps` → новый IP.
- systemd:
- `egress-tunnel.service`
- `vps-socks.service`
- `github-tunnel.service`
- `/opt`:
- `hermes/jobs.yaml`
- `hub-core/sync_certs.py`, `second_contour.py`
- `buryan-hub/scripts/check-services.sh`, `matrix-vpn-bot.py`
- n8n import/workflow JSON
- Gitea `buryan-infra`: активные скрипты/конфиги/JSON (не docs/audits/incidents).
- Бэкап: `/root/oldip-backup-20261202`.
## Проверено
```text
ssh buryan-vps hostname → direct-emerald.ptr.network
egress-tunnel/vps-socks/github-tunnel → active
curl --socks5 127.0.0.1:1081 https://ifconfig.me → 45.133.209.253
```
## Не менялось намеренно
- исторические `docs/`, `ops/audits/`, `ops/incidents/`;
- `*.bak*`, `*.before*` — снимки прежнего состояния;
- `ops/backups/`, `ops/audit/` — исторические артефакты;
- `n8n/database.sqlite`, `hermes.db` — требуют отдельного обновления/перезапуска.
## Осталось
- `egress-tunnel` (HTTP 8888) не отдаёт ответ: сервис на old-VPS, не IP-адрес.
- n8n SQLite: старые URL внутри БД; обновлять через API/остановку сервиса.
- Hermes DB: старые записи; jobs.yaml уже обновлён.
+2 -2
View File
@@ -1348,7 +1348,7 @@ services:
ip: 192.168.1.104
ram_mb: 11.4
domains:
- domain: 193.233.210.184
- domain: 45.133.209.253
upstream: api.telegram.org/
ssl: true
sso: false
@@ -2109,7 +2109,7 @@ dependencies:
- from: vm104
to: heimdall
kind: runs
- from: domain:193.233.210.184
- from: domain:45.133.209.253
to: api.telegram.org
kind: proxy
- from: domain:3d.buryans.ru
+1 -1
View File
@@ -8,7 +8,7 @@
# Paperless остаётся на docs.buryans.ru.
# ============================================================
set -uo pipefail
VPS=193.233.210.184
VPS=45.133.209.253
API=http://192.168.1.114:9000/api/v3
TOKEN=$(cat /root/.authentik-api-token)
+1 -1
View File
@@ -3,7 +3,7 @@
# nginx-home-services.sh — files -> Nextcloud, home -> HA
# ============================================================
set -uo pipefail
VPS=193.233.210.184
VPS=45.133.209.253
HCONF=/etc/nginx/conf.d/buryans-all.conf
VCONF=/etc/nginx/conf.d/buryans-all.conf
+1 -1
View File
@@ -90,7 +90,7 @@ for ct in cts:
ct["containers"] = conts
# --- домены с VPS ---
dom = run("ssh -o BatchMode=yes root@193.233.210.184 "
dom = run("ssh -o BatchMode=yes root@45.133.209.253 "
"\"grep -oE 'server_name [a-z0-9.-]+' /etc/nginx/conf.d/buryans-all.conf "
"| awk '{print \\$2}' | sort -u\" 2>/dev/null")
domains = [d for d in dom.split() if d]
+2 -2
View File
@@ -20,14 +20,14 @@
# Данные не удаляю: конфигурации и тома остаются, откат — одна команда.
# ============================================================
set -uo pipefail
VPS=193.233.210.184
VPS=45.133.209.253
VCONF=/etc/nginx/conf.d/buryans-all.conf
HCONF=/etc/nginx/conf.d/buryans-all.conf
echo "=== 1. ДОМЕН HEADSCALE -> РАБОЧИЙ СЕРВЕР НА VPS ==="
ssh -o BatchMode=yes -o ConnectTimeout=20 root@$VPS "cp -p $VCONF $VCONF.before-headscale-fix; sed -i 's|proxy_pass http://192.168.1.201:8080;|proxy_pass http://127.0.0.1:8080;|' $VCONF; nginx -t 2>&1 | tail -1; systemctl reload nginx && echo ' VPS перезагружен'" 2>&1 | sed 's/^/ /'
cp -p $HCONF $HCONF.before-headscale-fix
sed -i 's|proxy_pass http://192.168.1.201:8080;|proxy_pass http://193.233.210.184:8080;|' $HCONF 2>/dev/null
sed -i 's|proxy_pass http://192.168.1.201:8080;|proxy_pass http://45.133.209.253:8080;|' $HCONF 2>/dev/null
nginx -t 2>&1 | tail -1 | sed 's/^/ дома: /'
systemctl reload nginx 2>/dev/null && echo " домашний nginx перезагружен"
+1 -1
View File
@@ -11,7 +11,7 @@
# между ними.
# ============================================================
set -uo pipefail
VPS=193.233.210.184
VPS=45.133.209.253
echo "=== 1. ЧТО СЕЙЧАС ==="
echo " PVE: $(sysctl -n net.ipv4.tcp_congestion_control 2>/dev/null)"
+1 -1
View File
@@ -15,7 +15,7 @@
# 4. замеряю до и после.
# ============================================================
set -uo pipefail
VPS=193.233.210.184
VPS=45.133.209.253
VCONF=/etc/nginx/conf.d/buryans-all.conf
echo "=== 1. ЗАМЕР ДО ==="
+1 -1
View File
@@ -13,7 +13,7 @@
# * BBR уже включён.
# ============================================================
set -uo pipefail
VPS=193.233.210.184
VPS=45.133.209.253
CONF='# Настройка под канал VPS <-> дом: задержка ~300 мс, потери до 5%
net.core.default_qdisc = fq
+1 -1
View File
@@ -16,7 +16,7 @@ TOKEN_LOCAL=$(cat /root/.kuma-matrix-local)
TOKEN_OFFSITE=$(cat /root/.kuma-matrix-offsite)
TOKEN_RESTORE=$(cat /root/.kuma-matrix-restore)
VPS=root@193.233.210.184
VPS=root@45.133.209.253
VPS_DIR=/var/backups/matrix
# аккаунты ботов: они появляются в течение дня, это не потеря данных
@@ -11,7 +11,7 @@ infrastructure:
url: https://192.168.1.10:8006
vps:
name: "VPS Public"
ip: 193.233.210.184
ip: 45.133.209.253
monitors:
- name: "VPS TCP 443"
type: port
+1 -1
View File
@@ -12,7 +12,7 @@ infrastructure:
vps:
name: "VPS Public"
ip: 193.233.210.184
ip: 45.133.209.253
monitors:
- name: "VPS TCP 443"
type: port
+2 -2
View File
@@ -125,7 +125,7 @@ check_db() { # $1=имя $2=база $3=запрос $4=ожидаемое чи
check_vpn() {
local name="VPN" out
out=$(timeout 60 ssh -oBatchMode=yes -oConnectTimeout=10 \
-oStrictHostKeyChecking=no root@193.233.210.184 \
-oStrictHostKeyChecking=no root@45.133.209.253 \
'bash /usr/local/bin/vpn-check.sh --quiet' 2>/dev/null | tr -d '\r')
if echo "$out" | grep -q '^РАБОТАЕТ'; then
PASSED=$((PASSED+1))
@@ -166,7 +166,7 @@ check_gateway_tunnel() {
local name="Шлюз туннель" got
got=$(timeout 40 curl -s --max-time 30 -x http://192.168.1.161:7890 \
https://api.ipify.org 2>/dev/null | tr -d '\r\n ')
if [ "$got" = "193.233.210.184" ]; then
if [ "$got" = "45.133.209.253" ]; then
PASSED=$((PASSED+1))
return 0
fi
+3 -3
View File
@@ -31,7 +31,7 @@ echo " $NEW свободен"
echo
echo "=== 2. КОПИИ КОНФИГУРАЦИИ ==="
cp -p /etc/pve/lxc/$CT.conf /root/lxc-$CT.conf.before-ip 2>/dev/null && echo " конфигурация CT сохранена"
ssh -o BatchMode=yes root@193.233.210.184 "cp -p /etc/nginx/conf.d/buryans-all.conf /etc/nginx/conf.d/buryans-all.conf.before-ct111-ip" 2>&1 | sed 's/^/ /'
ssh -o BatchMode=yes root@45.133.209.253 "cp -p /etc/nginx/conf.d/buryans-all.conf /etc/nginx/conf.d/buryans-all.conf.before-ct111-ip" 2>&1 | sed 's/^/ /'
cp -p /opt/buryan-hub/scripts/check-services.sh /opt/buryan-hub/scripts/check-services.sh.before-ip && echo " наблюдение сохранено"
cd /root/buryan-infra && cp -p ops/update-manager/services.yaml /root/services.yaml.before-ip && echo " реестр сохранён"
@@ -65,8 +65,8 @@ echo " example.com: HTTP ${code:-нет связи}"
echo
echo "=== 6. ОБНОВЛЯЮ ССЫЛКИ ==="
echo " --- внешний nginx ---"
ssh -o BatchMode=yes root@193.233.210.184 "sed -i 's|http://$OLD:|http://$NEW:|g' /etc/nginx/conf.d/buryans-all.conf && nginx -t 2>&1 | tail -1 && systemctl reload nginx" 2>&1 | sed 's/^/ /'
ssh -o BatchMode=yes root@193.233.210.184 "grep -c '$NEW' /etc/nginx/conf.d/buryans-all.conf" 2>&1 | sed 's/^/ ссылок обновлено: /'
ssh -o BatchMode=yes root@45.133.209.253 "sed -i 's|http://$OLD:|http://$NEW:|g' /etc/nginx/conf.d/buryans-all.conf && nginx -t 2>&1 | tail -1 && systemctl reload nginx" 2>&1 | sed 's/^/ /'
ssh -o BatchMode=yes root@45.133.209.253 "grep -c '$NEW' /etc/nginx/conf.d/buryans-all.conf" 2>&1 | sed 's/^/ ссылок обновлено: /'
echo " --- наблюдение ---"
sed -i "s|192\.168\.1\.111|$NEW|g" /opt/buryan-hub/scripts/check-services.sh
+1 -1
View File
@@ -124,7 +124,7 @@ def domains():
"""Домены из nginx: server_name + proxy_pass (хост и VPS)."""
seen, out = set(), []
sources = [("host", sh("cat /etc/nginx/sites-enabled/* /etc/nginx/conf.d/* 2>/dev/null", 40))]
vps = sh("ssh -o ConnectTimeout=8 -o BatchMode=yes root@193.233.210.184 "
vps = sh("ssh -o ConnectTimeout=8 -o BatchMode=yes root@45.133.209.253 "
"'cat /etc/nginx/sites-enabled/* 2>/dev/null'", 40)
if vps:
sources.append(("vps", vps))
+1 -1
View File
@@ -13,7 +13,7 @@ import sys
from datetime import datetime
OUT_DIR = "/root/buryan-infra/ops/topology"
VPS = "193.233.210.184"
VPS = "45.133.209.253"
def sh(cmd, timeout=60):
+1 -1
View File
@@ -12,7 +12,7 @@ from collections import defaultdict
from datetime import date, datetime
OUT = "/root/buryan-infra/ops/hygiene"
VPS = "193.233.210.184"
VPS = "45.133.209.253"
FINDINGS = []
+1 -1
View File
@@ -12,7 +12,7 @@ from datetime import datetime
ROOT = "/root/buryan-infra"
LEDGER = ROOT + "/ops/topology/ledger.md"
VPS = "193.233.210.184"
VPS = "45.133.209.253"
def sh(cmd, timeout=60):
+1 -1
View File
@@ -15,7 +15,7 @@ import subprocess
import time
OUT = "/var/lib/net-monitor"
VPS = "193.233.210.184"
VPS = "45.133.209.253"
SNI = "git.buryans.ru"
GATEWAY = "192.168.1.1"
INTERVAL = 60 # секунд между замерами
+1 -1
View File
@@ -11,7 +11,7 @@ import subprocess
import time
OUT = "/var/lib/path-monitor"
VDS = "193.233.210.184"
VDS = "45.133.209.253"
INTERVAL = 30
+1 -1
View File
@@ -17,7 +17,7 @@ from datetime import date
OUTDIR = "/var/lib/path-monitor-light"
STATE = OUTDIR + "/tcp-streak"
VDS = "193.233.210.184"
VDS = "45.133.209.253"
WG = "10.88.0.1"
GW = "192.168.1.1"
NOTIFY = "/opt/buryan-hub/scripts/notify.py"
+1 -1
View File
@@ -14,7 +14,7 @@ import time
# Публичный SSH к VPS нестабилен (banner exchange). Основной путь — туннель,
# публичный адрес — резерв.
VPS_CANDIDATES = [
os.environ.get("VPS_SSH", "root@193.233.210.184"),
os.environ.get("VPS_SSH", "root@45.133.209.253"),
"[email protected]",
]
VPS = VPS_CANDIDATES[0]
+1 -1
View File
@@ -14,7 +14,7 @@ import subprocess
import time
import urllib.request
VDS = "193.233.210.184"
VDS = "45.133.209.253"
SNI = "git.buryans.ru"
OUT = "/var/lib/vpn-health"
STATE = "/var/lib/vpn-health/last.json"
+1 -1
View File
@@ -2,7 +2,7 @@
set -e
echo "=== Проверка доступности сервисов ==="
for svc in "192.168.1.108:5680/healthz" "192.168.1.107:3001" "193.233.210.184"; do
for svc in "192.168.1.108:5680/healthz" "192.168.1.107:3001" "45.133.209.253"; do
code=$(curl -s -o /dev/null -w "%{http_code}" --max-time 5 "http://$svc" 2>/dev/null || echo "FAIL")
echo " $svc -> $code"
done
+1 -1
View File
@@ -14,7 +14,7 @@ jq '{
name: .name,
nodes: [.nodes[] |
if .name == "Notify Telegram" then
.parameters.url = "https://193.233.210.184/tg-api/bot8668603602:AAHVmUmq44dcomw8QOfw_qj1aICXuT5c5XU/sendMessage" |
.parameters.url = "https://45.133.209.253/tg-api/bot8668603602:AAHVmUmq44dcomw8QOfw_qj1aICXuT5c5XU/sendMessage" |
.parameters.options = {"allowUnauthorizedCerts": true}
else
del(.id)
+4 -4
View File
@@ -2,11 +2,11 @@
set -e
echo "=== Добавляем location /tg-api/ в nginx ==="
ssh root@193.233.210.184 'cat > /etc/nginx/sites-available/tg-proxy.conf << '"'"'CONF'"'"'
ssh root@45.133.209.253 'cat > /etc/nginx/sites-available/tg-proxy.conf << '"'"'CONF'"'"'
server {
listen 443 ssl;
http2 on;
server_name 193.233.210.184;
server_name 45.133.209.253;
ssl_certificate /etc/letsencrypt/live/buryans.ru/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/buryans.ru/privkey.pem;
@@ -25,9 +25,9 @@ nginx -t && systemctl reload nginx && echo "nginx reloaded"'
echo ""
echo "=== Тест: CT108 -> VPS:443/tg-api/ -> api.telegram.org ==="
pct exec 108 -- curl -s -m 10 -o /dev/null -w "NGINX_PROXY: code=%{http_code}\n" \
https://193.233.210.184/tg-api/ || echo "FAIL nginx proxy"
https://45.133.209.253/tg-api/ || echo "FAIL nginx proxy"
echo ""
echo "=== Тест: прямой запрос к Telegram через proxy ==="
pct exec 108 -- curl -s -m 10 \
https://193.233.210.184/tg-api/bot8668603602:AAHVmUmq44dcomw8QOfw_qj1aICXuT5c5XU/getMe | jq -r '.ok // "error"' || echo "FAIL getMe"
https://45.133.209.253/tg-api/bot8668603602:AAHVmUmq44dcomw8QOfw_qj1aICXuT5c5XU/getMe | jq -r '.ok // "error"' || echo "FAIL getMe"
+9 -9
View File
@@ -2,23 +2,23 @@
set -e
echo "=== Какие сертификаты есть на VPS? ==="
ssh root@193.233.210.184 'ls -la /etc/letsencrypt/live/ 2>/dev/null || echo "no letsencrypt"; ls -la /etc/nginx/ssl/ 2>/dev/null || echo "no /etc/nginx/ssl"'
ssh root@45.133.209.253 'ls -la /etc/letsencrypt/live/ 2>/dev/null || echo "no letsencrypt"; ls -la /etc/nginx/ssl/ 2>/dev/null || echo "no /etc/nginx/ssl"'
echo ""
echo "=== Создаём self-signed для IP 193.233.210.184 ==="
ssh root@193.233.210.184 'mkdir -p /etc/nginx/ssl && openssl req -x509 -nodes -days 3650 -newkey rsa:2048 \
echo "=== Создаём self-signed для IP 45.133.209.253 ==="
ssh root@45.133.209.253 'mkdir -p /etc/nginx/ssl && openssl req -x509 -nodes -days 3650 -newkey rsa:2048 \
-keyout /etc/nginx/ssl/tg-proxy.key \
-out /etc/nginx/ssl/tg-proxy.crt \
-subj "/CN=193.233.210.184" \
-addext "subjectAltName=IP:193.233.210.184" 2>/dev/null && echo "self-signed created"'
-subj "/CN=45.133.209.253" \
-addext "subjectAltName=IP:45.133.209.253" 2>/dev/null && echo "self-signed created"'
echo ""
echo "=== Обновляем nginx конфиг с self-signed ==="
ssh root@193.233.210.184 'cat > /etc/nginx/sites-available/tg-proxy.conf << '"'"'CONF'"'"'
ssh root@45.133.209.253 'cat > /etc/nginx/sites-available/tg-proxy.conf << '"'"'CONF'"'"'
server {
listen 443 ssl;
http2 on;
server_name 193.233.210.184;
server_name 45.133.209.253;
ssl_certificate /etc/nginx/ssl/tg-proxy.crt;
ssl_certificate_key /etc/nginx/ssl/tg-proxy.key;
@@ -36,9 +36,9 @@ nginx -t && systemctl reload nginx && echo "nginx reloaded"'
echo ""
echo "=== Тест: CT108 -> VPS:443/tg-api/ (с -k для self-signed) ==="
pct exec 108 -- curl -s -k -m 10 -o /dev/null -w "NGINX_PROXY: code=%{http_code}\n" \
https://193.233.210.184/tg-api/ || echo "FAIL nginx proxy"
https://45.133.209.253/tg-api/ || echo "FAIL nginx proxy"
echo ""
echo "=== Тест: getMe через proxy ==="
pct exec 108 -- curl -s -k -m 10 \
https://193.233.210.184/tg-api/bot8668603602:AAHVmUmq44dcomw8QOfw_qj1aICXuT5c5XU/getMe | jq -r '.ok // "error"' || echo "FAIL getMe"
https://45.133.209.253/tg-api/bot8668603602:AAHVmUmq44dcomw8QOfw_qj1aICXuT5c5XU/getMe | jq -r '.ok // "error"' || echo "FAIL getMe"
+4 -4
View File
@@ -2,10 +2,10 @@
set -e
echo "=== Добавляем location /tg-api/ в nginx ==="
ssh root@193.233.210.184 'cat > /etc/nginx/sites-available/tg-proxy.conf << CONF
ssh root@45.133.209.253 'cat > /etc/nginx/sites-available/tg-proxy.conf << CONF
server {
listen 443 ssl http2;
server_name 193.233.210.184;
server_name 45.133.209.253;
ssl_certificate /etc/letsencrypt/live/buryans.ru/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/buryans.ru/privkey.pem;
@@ -25,9 +25,9 @@ nginx -t && systemctl reload nginx && echo "nginx reloaded"'
echo ""
echo "=== Тест: CT108 -> VPS:443/tg-api/ -> api.telegram.org ==="
pct exec 108 -- curl -s -m 10 -o /dev/null -w "NGINX_PROXY: code=%{http_code}\n" \
https://193.233.210.184/tg-api/ || echo "FAIL nginx proxy"
https://45.133.209.253/tg-api/ || echo "FAIL nginx proxy"
echo ""
echo "=== Тест: прямой запрос к Telegram через proxy ==="
pct exec 108 -- curl -s -m 10 \
https://193.233.210.184/tg-api/bot8668603602:AAHVmUmq44dcomw8QOfw_qj1aICXuT5c5XU/getMe | jq -r '.ok // "error"' || echo "FAIL getMe"
https://45.133.209.253/tg-api/bot8668603602:AAHVmUmq44dcomw8QOfw_qj1aICXuT5c5XU/getMe | jq -r '.ok // "error"' || echo "FAIL getMe"
+2 -2
View File
@@ -5,7 +5,7 @@ API_KEY=$(cat /root/.n8n_api)
WORKFLOW_ID="TSqu00NJx2JOrtoN"
echo "=== Тест: CT108 -> VPS:1080 (SOCKS5) ==="
pct exec 108 -- bash -c 'curl -s -m 5 --socks5-hostname 193.233.210.184:1080 https://api.telegram.org/ -o /dev/null -w "SOCKS5: code=%{http_code}\n"' || echo "FAIL SOCKS5"
pct exec 108 -- bash -c 'curl -s -m 5 --socks5-hostname 45.133.209.253:1080 https://api.telegram.org/ -o /dev/null -w "SOCKS5: code=%{http_code}\n"' || echo "FAIL SOCKS5"
echo ""
echo "=== Получаем текущий workflow ==="
@@ -18,7 +18,7 @@ jq '{
name: .name,
nodes: [.nodes[] |
if .name == "Notify Telegram" then
.parameters.proxy = "http://193.233.210.184:1080" |
.parameters.proxy = "http://45.133.209.253:1080" |
.parameters.bodyParameters.parameters |= map(
if .name == "text" then
.value = "=🚨 {{ $json.monitorName }} DOWN\n\nURL: {{ $json.monitorUrl }}\nВремя: {{ new Date().toLocaleString(\"ru-RU\") }}\n\nIssue создан в Gitea"
+5 -5
View File
@@ -1,7 +1,7 @@
#!/bin/bash
set -e
echo "=== Устанавливаем tinyproxy на VPS ==="
ssh root@193.233.210.184 'apt install -y tinyproxy >/dev/null 2>&1; echo installed'
ssh root@45.133.209.253 'apt install -y tinyproxy >/dev/null 2>&1; echo installed'
echo "=== Конфигурируем (порт 8888, BasicAuth) ==="
CONF_LOCAL=$(mktemp)
@@ -16,13 +16,13 @@ BasicAuth n8nrelay $(cat /root/.proxy-pass)
ConnectPort 443
ConnectPort 80
CONF
scp -q "$CONF_LOCAL" root@193.233.210.184:/etc/tinyproxy/tinyproxy.conf
scp -q "$CONF_LOCAL" root@45.133.209.253:/etc/tinyproxy/tinyproxy.conf
rm -f "$CONF_LOCAL"
ssh root@193.233.210.184 'systemctl restart tinyproxy && systemctl is-active tinyproxy'
ssh root@45.133.209.253 'systemctl restart tinyproxy && systemctl is-active tinyproxy'
echo "=== Открываем порт 8888 в iptables VPS ==="
ssh root@193.233.210.184 'iptables -C INPUT -p tcp --dport 8888 -j ACCEPT 2>/dev/null || iptables -I INPUT 1 -p tcp --dport 8888 -j ACCEPT; iptables-save > /etc/iptables/rules.v4; echo ok'
ssh root@45.133.209.253 'iptables -C INPUT -p tcp --dport 8888 -j ACCEPT 2>/dev/null || iptables -I INPUT 1 -p tcp --dport 8888 -j ACCEPT; iptables-save > /etc/iptables/rules.v4; echo ok'
echo "=== Тест: CT108 -> tinyproxy -> api.telegram.org ==="
pct exec 108 -- curl -s -m 10 -x http://$(cat /root/.proxy-user):$(cat /root/.proxy-pass)@193.233.210.184:8888 \
pct exec 108 -- curl -s -m 10 -x http://$(cat /root/.proxy-user):$(cat /root/.proxy-pass)@45.133.209.253:8888 \
-o /dev/null -w "PROXY: code=%{http_code}\n" https://api.telegram.org/ || echo "FAIL proxy"
+2 -2
View File
@@ -1,11 +1,11 @@
#!/bin/bash
echo "=== VPS -> api.telegram.org ==="
ssh -o StrictHostKeyChecking=no root@193.233.210.184 \
ssh -o StrictHostKeyChecking=no root@45.133.209.253 \
'curl -s -m 10 -o /dev/null -w "IPv4: code=%{http_code}\n" https://api.telegram.org/ 2>&1'
echo ""
echo "=== VPS: есть ли tinyproxy/squid/3proxy ==="
ssh root@193.233.210.184 \
ssh root@45.133.209.253 \
'command -v tinyproxy && echo "tinyproxy found" || echo "no tinyproxy";
command -v squid && echo "squid found" || echo "no squid";
command -v 3proxy && echo "3proxy found" || echo "no 3proxy";
+1 -1
View File
@@ -34,7 +34,7 @@ INSERT INTO monitor (name, active, user_id, interval, url, type, weight, maxretr
-- VPS ping
INSERT INTO monitor (name, active, user_id, interval, hostname, type, weight, maxretries, retry_interval, timeout, packet_size) VALUES
('VPS ping (193.233.210.184)', 1, 1, 60, '193.233.210.184', 'ping', 2000, 2, 60, 48.0, 56);
('VPS ping (45.133.209.253)', 1, 1, 60, '45.133.209.253', 'ping', 2000, 2, 60, 48.0, 56);
-- Proxmox API (self-signed cert -> ignore_tls=1)
INSERT INTO monitor (name, active, user_id, interval, url, type, weight, maxretries, ignore_tls, upside_down, maxredirects, accepted_statuscodes_json, retry_interval, method, timeout) VALUES
+2 -2
View File
@@ -8,14 +8,14 @@ done
echo ""
echo "=== 2. DNS-записи через VPS (обход локального DNS) ==="
ssh root@193.233.210.184 'for d in n8n finance recipes; do
ssh root@45.133.209.253 'for d in n8n finance recipes; do
echo -n "$d.buryans.ru -> "
dig +short @8.8.8.8 ${d}.buryans.ru 2>/dev/null || echo "NXDOMAIN"
done'
echo ""
echo "=== 3. Проверка nginx на VPS — какие server_name настроены? ==="
ssh root@193.233.210.184 'grep -h "server_name" /etc/nginx/sites-enabled/*.buryans.ru | sort -u'
ssh root@45.133.209.253 'grep -h "server_name" /etc/nginx/sites-enabled/*.buryans.ru | sort -u'
echo ""
echo "=== 4. Текущие monitors в Kuma + notification_id ==="
+1 -1
View File
@@ -33,7 +33,7 @@ INSERT INTO monitor (name,active,user_id,interval,url,type,weight,maxretries,ign
('status.buryans.ru',1,1,60,'https://status.buryans.ru','http',2000,2,0,0,10,'["200-299"]','A','1.1.1.1',60,'GET',48.0);
INSERT INTO monitor (name,active,user_id,interval,hostname,type,weight,maxretries,retry_interval,timeout,packet_size) VALUES
('VPS ping',1,1,60,'193.233.210.184','ping',2000,2,60,48.0,56);
('VPS ping',1,1,60,'45.133.209.253','ping',2000,2,60,48.0,56);
INSERT INTO monitor (name,active,user_id,interval,url,type,weight,maxretries,ignore_tls,upside_down,maxredirects,accepted_statuscodes_json,retry_interval,method,timeout) VALUES
('Proxmox API',1,1,60,'https://192.168.1.5:8006','http',2000,2,1,0,10,'["200-399"]',60,'GET',48.0);
+1 -1
View File
@@ -9,7 +9,7 @@ pct exec 107 -- docker stop uptime_kuma >/dev/null
pct exec 107 -- sqlite3 "$KUMADB" "UPDATE monitor SET method='GET' WHERE name='Gitea (140)';"
pct exec 107 -- sqlite3 "$KUMADB" "UPDATE monitor SET type='port' WHERE name='Postgres (CT 151)';"
pct exec 107 -- sqlite3 "$KUMADB" "UPDATE monitor SET url='https://$PVE_IP:8006' WHERE name LIKE 'Proxmox%';"
pct exec 107 -- sqlite3 "$KUMADB" "UPDATE monitor SET name='VPS TCP 443', type='port', hostname='193.233.210.184', port=443, url=NULL WHERE name='VPS ping';"
pct exec 107 -- sqlite3 "$KUMADB" "UPDATE monitor SET name='VPS TCP 443', type='port', hostname='45.133.209.253', port=443, url=NULL WHERE name='VPS ping';"
pct exec 107 -- docker start uptime_kuma >/dev/null
sleep 5
+2 -2
View File
@@ -2,11 +2,11 @@
set -e
echo "=== 1. vault: структура файла (до правки) ==="
ssh root@193.233.210.184 'grep -n "listen\|server_name\|ssl_certificate" /etc/nginx/sites-available/vault.buryans.ru'
ssh root@45.133.209.253 'grep -n "listen\|server_name\|ssl_certificate" /etc/nginx/sites-available/vault.buryans.ru'
echo ""
echo "=== 2. vault: возвращаем listen 443 в SSL-блок ==="
ssh root@193.233.210.184 'if ! grep -q "listen 443" /etc/nginx/sites-available/vault.buryans.ru; then
ssh root@45.133.209.253 'if ! grep -q "listen 443" /etc/nginx/sites-available/vault.buryans.ru; then
sed -i "s|ssl_certificate /etc/letsencrypt/live/vault.buryans.ru/fullchain.pem;|listen 443 ssl http2;\n ssl_certificate /etc/letsencrypt/live/vault.buryans.ru/fullchain.pem;|" /etc/nginx/sites-available/vault.buryans.ru
echo "listen 443 добавлен"
else
+2 -2
View File
@@ -2,11 +2,11 @@
set -e
echo "=== 1. Аудит: у всех доменов есть listen 443? ==="
ssh root@193.233.210.184 'for f in /etc/nginx/sites-enabled/*.buryans.ru; do printf "%-28s listen443: %s\n" "$(basename $f)" "$(grep -c "listen 443" $f)"; done'
ssh root@45.133.209.253 'for f in /etc/nginx/sites-enabled/*.buryans.ru; do printf "%-28s listen443: %s\n" "$(basename $f)" "$(grep -c "listen 443" $f)"; done'
echo ""
echo "=== 2. Дописываем полный 443-блок в vault ==="
ssh root@193.233.210.184 'cat >> /etc/nginx/sites-available/vault.buryans.ru << '"'"'BLK'"'"'
ssh root@45.133.209.253 'cat >> /etc/nginx/sites-available/vault.buryans.ru << '"'"'BLK'"'"'
server {
listen 443 ssl http2;
+1 -1
View File
@@ -29,4 +29,4 @@ done
echo ""
echo "=== Кто слушает 443 на VPS ==="
ssh -o ConnectTimeout=3 root@193.233.210.184 'ss -tlnp 2>/dev/null | grep :443 | head -3'
ssh -o ConnectTimeout=3 root@45.133.209.253 'ss -tlnp 2>/dev/null | grep :443 | head -3'
+1 -1
View File
@@ -11,7 +11,7 @@ pct exec 107 -- curl -s -o /dev/null -w "code=%{http_code} redirect=%{redirect_u
echo ""
echo "=== 3. curl с VPS + напрямую в бэкенд ==="
ssh root@193.233.210.184 'curl -s -o /dev/null -w "public=%{http_code}\n" -m 15 https://vault.buryans.ru/; curl -s -o /dev/null -w "backend_109_8080=%{http_code}\n" -m 10 http://192.168.1.109:8080/'
ssh root@45.133.209.253 'curl -s -o /dev/null -w "public=%{http_code}\n" -m 15 https://vault.buryans.ru/; curl -s -o /dev/null -w "backend_109_8080=%{http_code}\n" -m 10 http://192.168.1.109:8080/'
echo ""
echo "=== 4. Что реально слушает CT109 ==="
+3 -3
View File
@@ -6,7 +6,7 @@ pct exec 109 -- bash -c 'docker inspect vaultwarden 2>/dev/null | jq -r ".[0].Co
echo ""
echo "=== 2. Тест: прямой curl с заголовками nginx ==="
ssh root@193.233.210.184 'curl -s -o /dev/null -w "code=%{http_code}\n" -m 10 \
ssh root@45.133.209.253 'curl -s -o /dev/null -w "code=%{http_code}\n" -m 10 \
-H "Host: vault.buryans.ru" \
-H "X-Forwarded-Proto: https" \
-H "X-Forwarded-Host: vault.buryans.ru" \
@@ -14,11 +14,11 @@ ssh [email protected] 'curl -s -o /dev/null -w "code=%{http_code}\n" -m 10 \
echo ""
echo "=== 3. Текущий nginx конфиг vault (location /) ==="
ssh root@193.233.210.184 'grep -A 10 "location /" /etc/nginx/sites-available/vault.buryans.ru | tail -11'
ssh root@45.133.209.253 'grep -A 10 "location /" /etc/nginx/sites-available/vault.buryans.ru | tail -11'
echo ""
echo "=== 4. Фикс: добавляем proxy_redirect off + явный Host ==="
ssh root@193.233.210.184 'if ! grep -q "proxy_redirect off" /etc/nginx/sites-available/vault.buryans.ru; then
ssh root@45.133.209.253 'if ! grep -q "proxy_redirect off" /etc/nginx/sites-available/vault.buryans.ru; then
sed -i "/proxy_pass http:\/\/192.168.1.109:8080;/a\\
proxy_redirect off;\\
proxy_set_header Host vault.buryans.ru;" /etc/nginx/sites-available/vault.buryans.ru
+4 -4
View File
@@ -2,19 +2,19 @@
set -e
echo "=== 1. Текущий proxy_pass в vault nginx ==="
ssh root@193.233.210.184 'grep "proxy_pass" /etc/nginx/sites-available/vault.buryans.ru'
ssh root@45.133.209.253 'grep "proxy_pass" /etc/nginx/sites-available/vault.buryans.ru'
echo ""
echo "=== 2. Правим: 8080 → 8001 (oauth2-proxy) ==="
ssh root@193.233.210.184 'sed -i "s|proxy_pass http://192.168.1.109:8080;|proxy_pass http://192.168.1.109:8001;|" /etc/nginx/sites-available/vault.buryans.ru'
ssh root@45.133.209.253 'sed -i "s|proxy_pass http://192.168.1.109:8080;|proxy_pass http://192.168.1.109:8001;|" /etc/nginx/sites-available/vault.buryans.ru'
echo ""
echo "=== 3. Тест nginx config + reload ==="
ssh root@193.233.210.184 'nginx -t && systemctl reload nginx && echo "nginx reloaded"'
ssh root@45.133.209.253 'nginx -t && systemctl reload nginx && echo "nginx reloaded"'
echo ""
echo "=== 4. Проверка: curl с VPS ==="
ssh root@193.233.210.184 'curl -s -o /dev/null -w "code=%{http_code}\n" -m 10 https://vault.buryans.ru/'
ssh root@45.133.209.253 'curl -s -o /dev/null -w "code=%{http_code}\n" -m 10 https://vault.buryans.ru/'
echo ""
echo "=== 5. Проверка: curl из CT107 (глазами Kuma) ==="
+4 -4
View File
@@ -2,11 +2,11 @@
set -e
echo "=== 1. Бэкап текущего файла ==="
ssh root@193.233.210.184 'cp /etc/nginx/sites-available/vault.buryans.ru /root/vault.buryans.ru.bak-$(date +%H%M%S)'
ssh root@45.133.209.253 'cp /etc/nginx/sites-available/vault.buryans.ru /root/vault.buryans.ru.bak-$(date +%H%M%S)'
echo ""
echo "=== 2. Перезаписываем файл правильно ==="
ssh root@193.233.210.184 'cat > /etc/nginx/sites-available/vault.buryans.ru << '"'"'NGINX'"'"'
ssh root@45.133.209.253 'cat > /etc/nginx/sites-available/vault.buryans.ru << '"'"'NGINX'"'"'
server {
listen 80;
listen [::]:80;
@@ -43,9 +43,9 @@ NGINX'
echo ""
echo "=== 3. Test + reload ==="
ssh root@193.233.210.184 'nginx -t && systemctl reload nginx && echo OK'
ssh root@45.133.209.253 'nginx -t && systemctl reload nginx && echo OK'
echo ""
echo "=== 4. Curl tests ==="
ssh root@193.233.210.184 'curl -s -o /dev/null -w "VPS: code=%{http_code}\n" -m 10 https://vault.buryans.ru/'
ssh root@45.133.209.253 'curl -s -o /dev/null -w "VPS: code=%{http_code}\n" -m 10 https://vault.buryans.ru/'
pct exec 107 -- curl -s -o /dev/null -w "CT107: code=%{http_code}\n" -m 10 https://vault.buryans.ru/
+1 -1
View File
@@ -57,7 +57,7 @@ Vaultwarden возвращал 403 при попытке логина через
- \`DOMAIN=https://vault.buryans.ru\`
- Убран старый \`OIDC_CONFIG\` из compose.
### nginx (VPS 193.233.210.184)
### nginx (VPS 45.133.209.253)
- \`proxy_pass\` переключён с \`192.168.1.109:8001\` на \`192.168.1.109:8081\`.
- \`X-Forwarded-*\` + WebSocket upgrade сохранены как были.
@@ -32,7 +32,7 @@ systemctl reload nginx && echo " перезагружен"
echo
echo "=== VPS ==="
ssh -o BatchMode=yes root@193.233.210.184 'cp /etc/nginx/conf.d/buryans-all.conf /etc/nginx/conf.d/buryans-all.conf.before-jf-sso-$(date +%Y%m%d_%H%M%S); python3 - <<PY
ssh -o BatchMode=yes root@45.133.209.253 'cp /etc/nginx/conf.d/buryans-all.conf /etc/nginx/conf.d/buryans-all.conf.before-jf-sso-$(date +%Y%m%d_%H%M%S); python3 - <<PY
import re
p = "/etc/nginx/conf.d/buryans-all.conf"
t = open(p, encoding="utf-8").read()
@@ -72,8 +72,8 @@ else:
print(" VPS: блок не найден")
''')
PY
scp -q /tmp/vps-home2.py root@193.233.210.184:/tmp/vps-home2.py
ssh -o BatchMode=yes root@193.233.210.184 'python3 /tmp/vps-home2.py && nginx -t 2>&1 | tail -1 && systemctl reload nginx && echo " VPS перезагружен"' 2>&1 | sed 's/^/ /'
scp -q /tmp/vps-home2.py root@45.133.209.253:/tmp/vps-home2.py
ssh -o BatchMode=yes root@45.133.209.253 'python3 /tmp/vps-home2.py && nginx -t 2>&1 | tail -1 && systemctl reload nginx && echo " VPS перезагружен"' 2>&1 | sed 's/^/ /'
echo
echo "=== 3. ПРОКСИ В АВТОЗАПУСК ==="
@@ -56,8 +56,8 @@ else:
print(" VPS: блок не найден")
''')
PY
scp -q /tmp/vps-home.py root@193.233.210.184:/tmp/vps-home.py
ssh -o BatchMode=yes root@193.233.210.184 'python3 /tmp/vps-home.py && nginx -t 2>&1 | tail -1 && systemctl reload nginx && echo " VPS перезагружен"' 2>&1 | sed 's/^/ /'
scp -q /tmp/vps-home.py root@45.133.209.253:/tmp/vps-home.py
ssh -o BatchMode=yes root@45.133.209.253 'python3 /tmp/vps-home.py && nginx -t 2>&1 | tail -1 && systemctl reload nginx && echo " VPS перезагружен"' 2>&1 | sed 's/^/ /'
echo
echo "=== 5. ПРОВЕРКА ==="
@@ -47,8 +47,8 @@ else:
print(" VPS: блок не найден")
''')
PY
scp -q /tmp/vps-meals.py root@193.233.210.184:/tmp/vps-meals.py
ssh -o BatchMode=yes root@193.233.210.184 'python3 /tmp/vps-meals.py && nginx -t 2>&1 | tail -1 && systemctl reload nginx && echo " VPS перезагружен"' 2>&1 | sed 's/^/ /'
scp -q /tmp/vps-meals.py root@45.133.209.253:/tmp/vps-meals.py
ssh -o BatchMode=yes root@45.133.209.253 'python3 /tmp/vps-meals.py && nginx -t 2>&1 | tail -1 && systemctl reload nginx && echo " VPS перезагружен"' 2>&1 | sed 's/^/ /'
echo
echo "=== ВЫКЛЮЧАЮ ПРОКСИ MEALS ==="
@@ -3,7 +3,7 @@
# VPS: та же схема auth_request для home
# ============================================================
set -uo pipefail
SSH="ssh -o BatchMode=yes root@193.233.210.184"
SSH="ssh -o BatchMode=yes root@45.133.209.253"
cat > /tmp/vps-ha-ar.py <<'PY'
import re
@@ -63,7 +63,7 @@ PY
echo "=== 1. КОПИЯ И ПРАВКА НА VPS ==="
$SSH 'cp /etc/nginx/conf.d/buryans-all.conf /etc/nginx/conf.d/buryans-all.conf.before-ha-ar-$(date +%Y%m%d_%H%M%S)'
scp -q /tmp/vps-ha-ar.py root@193.233.210.184:/tmp/vps-ha-ar.py
scp -q /tmp/vps-ha-ar.py root@45.133.209.253:/tmp/vps-ha-ar.py
$SSH 'python3 /tmp/vps-ha-ar.py && nginx -t 2>&1 | tail -1 && systemctl reload nginx && echo " VPS перезагружен"' 2>&1 | sed 's/^/ /'
echo
@@ -42,8 +42,8 @@ if m:
print(" VPS: ombi -> 5055")
''')
PY
scp -q /tmp/vps-ombi.py root@193.233.210.184:/tmp/vps-ombi.py
ssh -o BatchMode=yes root@193.233.210.184 'python3 /tmp/vps-ombi.py && nginx -t 2>&1 | tail -1 && systemctl reload nginx && echo " VPS перезагружен"' 2>&1 | sed 's/^/ /'
scp -q /tmp/vps-ombi.py root@45.133.209.253:/tmp/vps-ombi.py
ssh -o BatchMode=yes root@45.133.209.253 'python3 /tmp/vps-ombi.py && nginx -t 2>&1 | tail -1 && systemctl reload nginx && echo " VPS перезагружен"' 2>&1 | sed 's/^/ /'
echo
echo "=== 3. ВЫКЛЮЧАЮ ПРОКСИ OVERSEERR ==="
@@ -1,7 +1,7 @@
#!/bin/bash
# Сравнение домашнего nginx и VPS по всем доменам
set -uo pipefail
scp -q root@193.233.210.184:/etc/nginx/conf.d/buryans-all.conf /tmp/vps.conf
scp -q root@45.133.209.253:/etc/nginx/conf.d/buryans-all.conf /tmp/vps.conf
python3 - <<'PY'
import re
@@ -53,8 +53,8 @@ systemctl reload nginx && echo " домашний nginx перезагруже
echo
echo "=== 3. VPS: то же ==="
scp -q /etc/nginx/conf.d/buryans-all.conf root@193.233.210.184:/etc/nginx/conf.d/buryans-all.conf.new
ssh -o BatchMode=yes root@193.233.210.184 'f=/etc/nginx/conf.d/buryans-all.conf; cp $f $f.before-direct-$(date +%Y%m%d_%H%M%S) && mv $f.new $f && nginx -t 2>&1 | tail -1 && systemctl reload nginx && echo " VPS nginx перезагружен"' 2>&1 | sed 's/^/ /'
scp -q /etc/nginx/conf.d/buryans-all.conf root@45.133.209.253:/etc/nginx/conf.d/buryans-all.conf.new
ssh -o BatchMode=yes root@45.133.209.253 'f=/etc/nginx/conf.d/buryans-all.conf; cp $f $f.before-direct-$(date +%Y%m%d_%H%M%S) && mv $f.new $f && nginx -t 2>&1 | tail -1 && systemctl reload nginx && echo " VPS nginx перезагружен"' 2>&1 | sed 's/^/ /'
echo
echo "=== 4. ОСТАНОВЛЮ ЛИШНИЕ ПРОКСИ ==="
@@ -3,7 +3,7 @@
# Откат VPS: домашний конфиг нельзя копировать — пути сертификатов разные
# ============================================================
set -uo pipefail
VPS=193.233.210.184
VPS=45.133.209.253
echo "=== 1. САМЫЙ СВЕЖИЙ БЭКАП НА VPS ==="
ssh -o BatchMode=yes root@$VPS 'ls -t /etc/nginx/conf.d/buryans-all.conf.before-direct-* 2>/dev/null | head -3'
@@ -74,8 +74,8 @@ for dom, ins in (("plex.buryans.ru", "location = / {\n return 302 /web/;\
open(p, "w", encoding="utf-8").write(t)
''')
PY
scp -q /tmp/vps2.py root@193.233.210.184:/tmp/vps2.py
ssh -o BatchMode=yes root@193.233.210.184 'python3 /tmp/vps2.py && nginx -t 2>&1 | tail -1 && systemctl reload nginx && echo " VPS перезагружен"' 2>&1 | sed 's/^/ /'
scp -q /tmp/vps2.py root@45.133.209.253:/tmp/vps2.py
ssh -o BatchMode=yes root@45.133.209.253 'python3 /tmp/vps2.py && nginx -t 2>&1 | tail -1 && systemctl reload nginx && echo " VPS перезагружен"' 2>&1 | sed 's/^/ /'
echo
echo "=== 4. FIREFLY: адрес приложения (сейчас http) ==="
+1 -1
View File
@@ -10,7 +10,7 @@
# Лечение: поднять буферы заголовков на обоих nginx.
# ============================================================
set -uo pipefail
VPS=193.233.210.184
VPS=45.133.209.253
CONF=/etc/nginx/conf.d/00-proxy-buffers.conf
make_conf() {
+1 -1
View File
@@ -51,7 +51,7 @@ change_host
echo
echo "=== 3. VPS ==="
ssh -o BatchMode=yes root@193.233.210.184 'f=/etc/nginx/conf.d/buryans-all.conf; cp $f $f.before-vault-direct-$(date +%Y%m%d_%H%M%S); python3 - <<PY
ssh -o BatchMode=yes root@45.133.209.253 'f=/etc/nginx/conf.d/buryans-all.conf; cp $f $f.before-vault-direct-$(date +%Y%m%d_%H%M%S); python3 - <<PY
import re
p = "/etc/nginx/conf.d/buryans-all.conf"
t = open(p, encoding="utf-8").read()
+1 -1
View File
@@ -43,7 +43,7 @@ systemctl reload nginx && echo " nginx перезагружен"
echo
echo "=== 3. VPS: то же ==="
ssh -o BatchMode=yes root@193.233.210.184 'f=/etc/nginx/conf.d/buryans-all.conf; cp $f $f.before-requests-alias-$(date +%Y%m%d_%H%M%S); python3 - <<PY
ssh -o BatchMode=yes root@45.133.209.253 'f=/etc/nginx/conf.d/buryans-all.conf; cp $f $f.before-requests-alias-$(date +%Y%m%d_%H%M%S); python3 - <<PY
import re
p = "/etc/nginx/conf.d/buryans-all.conf"
t = open(p, encoding="utf-8").read()
+2 -2
View File
@@ -10,11 +10,11 @@
set -uo pipefail
echo "=== 1. HEADSCALE ОТВЕЧАЕТ НА VPS? ==="
ssh -o BatchMode=yes root@193.233.210.184 "curl -s -o /dev/null -w ' 127.0.0.1:8443/health -> %{http_code}\n' --max-time 6 http://127.0.0.1:8443/health; curl -s -o /dev/null -w ' 127.0.0.1:8443/windows -> %{http_code}\n' --max-time 6 http://127.0.0.1:8443/windows"
ssh -o BatchMode=yes root@45.133.209.253 "curl -s -o /dev/null -w ' 127.0.0.1:8443/health -> %{http_code}\n' --max-time 6 http://127.0.0.1:8443/health; curl -s -o /dev/null -w ' 127.0.0.1:8443/windows -> %{http_code}\n' --max-time 6 http://127.0.0.1:8443/windows"
echo
echo "=== 2. VPS: направляю домен на headscale ==="
ssh -o BatchMode=yes root@193.233.210.184 'python3 - <<PY
ssh -o BatchMode=yes root@45.133.209.253 'python3 - <<PY
import re
p = "/etc/nginx/conf.d/buryans-all.conf"
t = open(p, encoding="utf-8").read()
+2 -2
View File
@@ -45,9 +45,9 @@ fix_host
echo
echo "=== 3. VPS ==="
ssh -o BatchMode=yes root@193.233.210.184 'f=/etc/nginx/conf.d/buryans-all.conf; cp $f $f.before-headscale-target-$(date +%Y%m%d_%H%M%S)' 2>&1
ssh -o BatchMode=yes root@45.133.209.253 'f=/etc/nginx/conf.d/buryans-all.conf; cp $f $f.before-headscale-target-$(date +%Y%m%d_%H%M%S)' 2>&1
scp -q [email protected]:/root/fix-hs-remote.sh /dev/null 2>/dev/null || true
ssh -o BatchMode=yes root@193.233.210.184 'python3 - <<PY
ssh -o BatchMode=yes root@45.133.209.253 'python3 - <<PY
import re
p = "/etc/nginx/conf.d/buryans-all.conf"
t = open(p, encoding="utf-8").read()
+1 -1
View File
@@ -3,7 +3,7 @@
# domains-vs-proxies.sh — у кого есть домен, а у кого только прокси
# ============================================================
set -uo pipefail
VPS=193.233.210.184
VPS=45.133.209.253
echo "=== 1. ДОМЕНЫ В NGINX (VPS) ==="
ssh -o BatchMode=yes -o ConnectTimeout=25 root@$VPS "grep -oE 'server_name [a-z0-9.-]+\.buryans\.ru' /etc/nginx/conf.d/buryans-all.conf | sed 's/server_name //' | sort" 2>/dev/null > /tmp/nginx-domains.txt
+1 -1
View File
@@ -6,7 +6,7 @@
# www) — перенаправление 301 на основной домен, чтобы вход был один.
# ============================================================
set -uo pipefail
VPS=193.233.210.184
VPS=45.133.209.253
VCONF=/etc/nginx/conf.d/buryans-all.conf
HCONF=/etc/nginx/conf.d/buryans-all.conf
+1 -1
View File
@@ -34,7 +34,7 @@ LIST="
C=$(pct exec 114 -- bash -c 'grep "^POSTGRES_PASSWORD=" /opt/authentik-security/.env | cut -d= -f2' | tr -d '\r')
U=$(pct exec 114 -- bash -c 'grep "^POSTGRES_USER=" /opt/authentik-security/.env | cut -d= -f2' | tr -d '\r')
B=$(pct exec 114 -- bash -c 'grep "^POSTGRES_DB=" /opt/authentik-security/.env | cut -d= -f2' | tr -d '\r')
VPS=193.233.210.184
VPS=45.133.209.253
VCONF=/etc/nginx/conf.d/buryans-all.conf
for row in $LIST; do
+1 -1
View File
@@ -94,7 +94,7 @@ README = """Что это за файлы
Настраивать можно прямо на телефоне — второй экран не нужен.
Проверка, что всё работает:
* откройте 2ip.ru — должен показаться 193.233.210.184;
* откройте 2ip.ru — должен показаться 45.133.209.253;
* откройте приложение банка или госуслуги — должны работать как обычно.
Если банк всё равно ругается — напишите мне: возможно, он проверяет
+1 -1
View File
@@ -19,7 +19,7 @@ import urllib.request
import yaml
VPS = "193.233.210.184"
VPS = "45.133.209.253"
SUB = ("https://git.buryans.ru/p/gI07G56cccz/sub/vpn-akadmin.yaml")
USER, PWD = "vpn", "II52njGhou5hJ1"
DIR = "/tmp/mihomo-recipient"
+1 -1
View File
@@ -69,7 +69,7 @@ VPN, продолжат работать, и выключать VPN для ни
4. Нажмите подключение и разрешите VPN.
Проверка, что разделение работает:
* откройте 2ip.ru — покажет 193.233.210.184;
* откройте 2ip.ru — покажет 45.133.209.253;
* откройте приложение банка — должно работать как обычно.
Если банк всё равно ругается — напишите мне. Возможно, он проверяет не
+1 -1
View File
@@ -24,7 +24,7 @@ import sys
import time
import uuid
VPS = "193.233.210.184"
VPS = "45.133.209.253"
CFG = "/usr/local/etc/xray/config.json"
EMAIL = "[email protected]"
+1 -1
View File
@@ -58,7 +58,7 @@ check_gateway_tunnel() {
local name="Шлюз туннель" got
got=$(timeout 40 curl -s --max-time 30 -x http://192.168.1.161:7890 \\
https://api.ipify.org 2>/dev/null | tr -d '\\r\\n ')
if [ "$got" = "193.233.210.184" ]; then
if [ "$got" = "45.133.209.253" ]; then
PASSED=$((PASSED+1))
return 0
fi
+1 -1
View File
@@ -75,7 +75,7 @@ ok=0
for i in 1 2 3; do
ip=$(curl -s --max-time 25 -x "http://192.168.1.161:7890" https://api.ipify.org 2>/dev/null | tr -d '\r\n ')
echo " попытка $i: ${ip:-нет ответа}"
[ "$ip" = "193.233.210.184" ] && ok=$((ok+1))
[ "$ip" = "45.133.209.253" ] && ok=$((ok+1))
sleep 2
done
+1 -1
View File
@@ -69,7 +69,7 @@ echo " youtube.com: HTTP $res"
echo
echo "============================================================"
if [ "$ip" = "193.233.210.184" ]; then
if [ "$ip" = "45.133.209.253" ]; then
echo " ТУННЕЛЬ НА ШЛЮЗЕ РАБОТАЕТ"
echo " прокси: 192.168.1.161:7890"
else
+1 -1
View File
@@ -48,7 +48,7 @@ AFTER=$(( (t1-t0)/1000000 ))
echo " через шлюз (домашний адрес): ${AFTER} мс"
t0=$(date +%s%N)
pct exec $DEV -- curl -s -o /dev/null --max-time 15 -k --resolve "git.buryans.ru:443:193.233.210.184" https://git.buryans.ru/ 2>/dev/null
pct exec $DEV -- curl -s -o /dev/null --max-time 15 -k --resolve "git.buryans.ru:443:45.133.209.253" https://git.buryans.ru/ 2>/dev/null
t1=$(date +%s%N)
VIA_VPS=$(( (t1-t0)/1000000 ))
echo " через VPS (как было раньше): ${VIA_VPS} мс"
+1 -1
View File
@@ -20,7 +20,7 @@
# ============================================================
set -uo pipefail
CT=161
VPS=193.233.210.184
VPS=45.133.209.253
GW=192.168.1.161
PORT=7890
+1 -1
View File
@@ -27,7 +27,7 @@ printf ' %-34s%s\n' "через шлюз (192.168.1.10)" "$via_gw"
via_vps=""
for i in 1 2 3; do
t=$(pct exec $DEV -- curl -s -o /dev/null -w '%{time_total}' --max-time 20 -k \
--resolve "git.buryans.ru:443:193.233.210.184" https://git.buryans.ru/ 2>/dev/null)
--resolve "git.buryans.ru:443:45.133.209.253" https://git.buryans.ru/ 2>/dev/null)
ms=$(python3 -c "print(int(float('${t:-0}')*1000))")
via_vps="$via_vps $ms"
done
+2 -2
View File
@@ -196,7 +196,7 @@ echo
echo "=== 10. СОХРАНЯЮ ДАННЫЕ ПОДКЛЮЧЕНИЯ ==="
cat > /root/.buryan-hy2 <<EOF
PROTOCOL=hysteria2
HOST=193.233.210.184
HOST=45.133.209.253
PORT=$PORT
PASSWORD=$PASS
SNI=git.buryans.ru
@@ -206,7 +206,7 @@ echo " /root/.buryan-hy2 (600)"
echo
echo "============================================================"
if [ "${GOT:-}" = "193.233.210.184" ]; then
if [ "${GOT:-}" = "45.133.209.253" ]; then
echo " ГОТОВО: Hysteria2 работает, трафик выходит через VPS"
else
echo " ВНИМАНИЕ: канал не подтверждён — смотрите вывод выше"
+1 -1
View File
@@ -1,7 +1,7 @@
#!/bin/bash
# Чистая проверка Hysteria2 снаружи: свободный порт, честные запросы
set -uo pipefail
VPS=193.233.210.184
VPS=45.133.209.253
PORT=10443
SNI=git.buryans.ru
SOCKS=10999
+1 -1
View File
@@ -461,7 +461,7 @@ INSTRUCTION = """Как подключить VPN на телефоне
3. Нажмите кнопку подключения. Телефон спросит разрешение на VPN — разрешите.
4. Проверьте: откройте 2ip.ru. Должен показаться адрес 193.233.210.184.
4. Проверьте: откройте 2ip.ru. Должен показаться адрес 45.133.209.253.
5. Отключите экономию батареи для VPN-приложения
(Настройки → Приложения → ваше приложение → Батарея → «Без ограничений»),
+2 -2
View File
@@ -228,7 +228,7 @@ def instructions():
"1. Приложение: Android — Hiddify или v2rayNG; iPhone — Streisand или FoXray.\n"
"2. В приложении «+» → «Сканировать QR-код» (или «Импорт из ссылки»).\n"
"3. Нажать кнопку подключения и разрешить VPN.\n"
"4. Проверка: 2ip.ru должен показать 193.233.210.184.\n"
"4. Проверка: 2ip.ru должен показать 45.133.209.253.\n"
"5. Отключить экономию батареи для VPN-приложения.\n\n"
"Подробная инструкция — на странице, которую я присылал. "
"Если что-то не идёт — напишите, разберёмся.")
@@ -435,7 +435,7 @@ def handle_check(room_id, sender, room_key):
lines.append(" 3. Импорт: FlClash — «Профили» → «Добавить» → «Импорт из файла».")
lines.append(" Hiddify — «+» → импорт из файла.")
lines.append(" 4. Подключите и разрешите VPN.")
lines.append(" 5. Откройте 2ip.ru — должен показаться 193.233.210.184.")
lines.append(" 5. Откройте 2ip.ru — должен показаться 45.133.209.253.")
lines.append(" 6. Откройте приложение банка — должно работать как обычно.")
lines.append("")
lines.append("Если на шаге 5 адрес другой или на шаге 6 не работает — "
+1 -1
View File
@@ -128,7 +128,7 @@ def _page_conf():
else:
r = subprocess.run(
["ssh", "-o", "BatchMode=yes", "-o", "ConnectTimeout=10",
"root@193.233.210.184", "cat " + PAGE_CONF],
"root@45.133.209.253", "cat " + PAGE_CONF],
capture_output=True, text=True, timeout=40)
text = r.stdout
for line in text.splitlines():
+2 -2
View File
@@ -2,7 +2,7 @@
# Переносит готовые профили на VPS и обновляет страницу раздачи.
# VPS до дома не дотягивается, поэтому копируем ОТСЮДА.
set -uo pipefail
VPS=193.233.210.184
VPS=45.133.209.253
SRC=/root/buryan-infra/ops/vpn/build/profiles
TMP=/tmp/vpn-profiles-push
@@ -93,7 +93,7 @@ block = """
<li><b>Подключите</b> и разрешите VPN.</li>
</ol>
<p style="margin-bottom:0"><b>Проверка:</b> <code>2ip.ru</code> покажет
<code>193.233.210.184</code>. Приложение банка или госуслуги должно
<code>45.133.209.253</code>. Приложение банка или госуслуги должно
работать как обычно.</p>
</div>
""" + "\n".join(rows) + "\n"
+1 -1
View File
@@ -19,7 +19,7 @@ import json
import subprocess
import time
VPS = "193.233.210.184"
VPS = "45.133.209.253"
XRAY = "/usr/local/bin/xray"
PORT = 2096
SOCKS = 10903
+1 -1
View File
@@ -5,7 +5,7 @@ import json
import subprocess
import time
VPS = "193.233.210.184"
VPS = "45.133.209.253"
XRAY = "/usr/local/bin/xray"
+1 -1
View File
@@ -42,7 +42,7 @@ tun:
proxies:
- name: "Buryan"
type: vless
server: 193.233.210.184
server: 45.133.209.253
port: 10443
uuid: <ВАШ-UUID>
network: tcp
+1 -1
View File
@@ -27,7 +27,7 @@
"settings": {
"vnext": [
{
"address": "193.233.210.184",
"address": "45.133.209.253",
"port": 10443,
"users": [
{
+1 -1
View File
@@ -51,7 +51,7 @@ def ru_cidr():
# Сервер и параметры подключения — тоже в одном месте
SERVER = "193.233.210.184"
SERVER = "45.133.209.253"
PORT = 10443
SNI = "git.buryans.ru"
FINGERPRINT = "firefox"
+1 -1
View File
@@ -16,7 +16,7 @@
# ============================================================
set -uo pipefail
CT=161
VPS=193.233.210.184
VPS=45.133.209.253
PORT=10443
RULE_ADDED=0
+1 -1
View File
@@ -153,7 +153,7 @@ fi
echo
echo "=== 7. КОПИИ ВНЕ ЭТОГО ХОСТА ==="
for remote in 193.233.210.184; do
for remote in 45.133.209.253; do
got=$(ssh -o BatchMode=yes -o ConnectTimeout=8 root@$remote \
'ls /root/*encrypted*.json 2>/dev/null | wc -l' 2>/dev/null | tr -d '\r')
echo " на $remote: файлов копий ${got:-?}"
+1 -1
View File
@@ -23,7 +23,7 @@
# ============================================================
set -uo pipefail
VPS=193.233.210.184
VPS=45.133.209.253
REPO=/root/buryan-infra
TMP=$(mktemp -d /tmp/vpn-backup.XXXXXX)
trap 'rm -rf "$TMP"' EXIT
+1 -1
View File
@@ -25,7 +25,7 @@ QUIET=0
say() { [ "$QUIET" -eq 0 ] && echo "$@"; return 0; }
VPS_IP=193.233.210.184
VPS_IP=45.133.209.253
SNI=git.buryans.ru
FP=firefox
+1 -1
View File
@@ -22,7 +22,7 @@ set -uo pipefail
REPO=/root/buryan-infra
ENC=$REPO/ops/secrets-enc/xray-config.json
VPS=193.233.210.184
VPS=45.133.209.253
APPLY=0
[ "${1:-}" = "--apply" ] && APPLY=1
+1 -1
View File
@@ -26,7 +26,7 @@ import urllib.error
import urllib.parse
import urllib.request
VPS = "193.233.210.184"
VPS = "45.133.209.253"
HS = "http://192.168.1.155:8008"
NOTIFY_ENV = "/root/.buryan-notify.env"
STATE_FILE = "/root/.buryan-vpn-matrix-state.json"
+1 -1
View File
@@ -13,7 +13,7 @@ import subprocess
import sys
import time
VPS = "193.233.210.184"
VPS = "45.133.209.253"
PORT = 8444
PATH = "/buryan-xhttp"
SNI = "git.buryans.ru"
+1 -1
View File
@@ -1,7 +1,7 @@
#!/bin/bash
# Что нужно для Element Call на VPS и потянет ли он
set -uo pipefail
VPS=193.233.210.184
VPS=45.133.209.253
echo "=== 1. РЕСУРСЫ VPS ==="
ssh -o BatchMode=yes root@$VPS 'echo " ЦП: $(nproc) ядер"; free -m | awk "NR==2{print \" память: \" \$2 \" МБ, свободно \" \$7}"; df -h / | tail -1 | sed "s/^/ диск: /"; uptime | sed "s/^/ нагрузка:/"' 2>&1 | sed 's/^/ /'
+2 -2
View File
@@ -18,7 +18,7 @@ HUB=192.168.1.10
echo "=== 1. СПИСОК ДОМЕНОВ: откуда беру ==="
# источник 1: конфигурация VPS (там все домены, что обслуживаются)
DOMS=$(ssh -o BatchMode=yes root@193.233.210.184 \
DOMS=$(ssh -o BatchMode=yes root@45.133.209.253 \
"grep -oE 'server_name [a-z0-9.-]+' /etc/nginx/conf.d/buryans-all.conf 2>/dev/null | awk '{print \$2}' | sort -u" 2>/dev/null)
echo " доменов у VPS: $(echo "$DOMS" | grep -c .)"
@@ -38,7 +38,7 @@ for d in $DOMS; do
h="—"
fi
# 3. VPS
v=$(curl -s -o /dev/null -w '%{http_code}' --max-time 6 -k --resolve "$d:443:193.233.210.184" "https://$d/" 2>/dev/null)
v=$(curl -s -o /dev/null -w '%{http_code}' --max-time 6 -k --resolve "$d:443:45.133.209.253" "https://$d/" 2>/dev/null)
case "$h" in
2*|3*) ok_home=$((ok_home+1)) ;;
+1 -1
View File
@@ -9,7 +9,7 @@
# ============================================================
set -uo pipefail
ssh -o BatchMode=yes root@193.233.210.184 'bash -s' <<'REMOTE'
ssh -o BatchMode=yes root@45.133.209.253 'bash -s' <<'REMOTE'
CONF=/etc/nginx/conf.d/buryans-all.conf
printf ' %-26s %-34s %-6s %s\n' "домен" "адрес" "код" "вывод"
echo " ------------------------------------------------------------------------------------"
Loaded 100 of 107 files, more files were not shown because too many files have changed in this diff. Show more