Files
infrastructure/configs/vps02-chain-client.md
T
hermes 8dfaa2a719 vpn chain vps02->vps03: VLESS+WS+TLS via Caddy entry, WG egress vps03
- chain entry xray-chain container on vps02 (127.0.0.1:18443), Caddy
  handle /vless-chain -> reverse_proxy (chat.nixg.ru:443)
- egress via vps03 XRay :50002 over WG mesh, verified egress IP
  77.67.89.154 (curl, UDP/DNS)
- SS-2022: blocked by Cloud.ru firewall (18338 closed externally),
  cipher name 2022-blake3-aes-128-gcm noted for future use
- client configs: v2rayNG vps02-chain + Clash Verge block
  (no v2ray-http-upgrade), direct vps03 config kept
- openspec change add-shadowsocks-chain-vps02-vps03 (proposal/design/
  tasks/specs), configs/, STATUS.md; skill vpn-proxy-chain-setup
2026-10-16 16:57:05 +00:00

84 lines
3.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Клиентские конфиги — цепочка vps02 → vps03 (vpn-chain)
Проверено 2026-10-17: egress = **77.67.89.154** (vps03).
## Топология
```
Клиент (v2rayNG / Clash Verge)
│ VLESS + WS + TLS
▼
chat.nixg.ru:443 (vps02 87.242.100.206, Caddy, сертификат Let's Encrypt)
│ path /vless-chain → reverse_proxy 127.0.0.1:18443
▼
xray-chain (контейнер XRay 26.10.10, inbound VLESS+WS 127.0.0.1:18443)
│ VLESS + WS (без TLS) через WireGuard-меш
▼
10.8.0.3:50002 (vps03 77.67.89.154, XRay 26.9.9, outbound freedom)
▼
Интернет (egress IP = 77.67.89.154)
```
UUID (одинаковый на обоих узлах): `cf4d32e5-9c19-460e-a5de-f881b01dcfe1`
## v2rayNG (Android) — профиль `vps02-chain`
- Address: `chat.nixg.ru`
- Port: `443`
- ID: `cf4d32e5-9c19-460e-a5de-f881b01dcfe1`
- Flow: пусто
- Encryption: none
- Network: `ws` (WebSocket)
- Path: `/vless-chain`
- Host: `chat.nixg.ru`
- TLS: **on** (SNI: `chat.nixg.ru`), allowInsecure off
Share-ссылка:
```
vless://cf4d32e5-9c19-460e-a5de-f881b01dcfe1@chat.nixg.ru:443?encryption=none&security=tls&sni=chat.nixg.ru&type=ws&host=chat.nixg.ru&path=%2Fvless-chain#vps02-chain
```
## Clash Verge (Windows/Linux) — append-блок
```yaml
- type: 'vless'
name: 'vps02-chain'
server: 'chat.nixg.ru'
port: 443
uuid: 'cf4d32e5-9c19-460e-a5de-f881b01dcfe1'
network: 'ws'
tls: true
udp: true
servername: 'chat.nixg.ru'
skip-cert-verify: false
ws-opts:
path: '/vless-chain'
headers:
Host: 'chat.nixg.ru'
```
ВНИМАНИЕ: НЕ добавлять `v2ray-http-upgrade: true` / `v2ray-http-upgrade-fast-open: true` — это переключает транспорт mihomo на httpupgrade, несовместимый с ws-входом XRay (таймаут; была такая ошибка на vps03).
## Проверка
```
# Clash Verge (порт по умолчанию 7897, бывает 7890)
curl -x http://127.0.0.1:7897 -s https://ifconfig.me
# v2rayNG: включить профиль и открыть https://ifconfig.me
```
Ожидается: **77.67.89.154** (vps03).
Прямой профиль vps03 (без цепочки): см. configs/vps03-xray-client.md (egress тоже 77.67.89.154).
## Откат / если не работает
1. `nc -z -w5 chat.nixg.ru 443` → должен быть open.
2. WS-handshake: `curl -sk --http1.1 -H "Connection: Upgrade" -H "Upgrade: websocket" -H "Sec-WebSocket-Key: x" -H "Sec-WebSocket-Version: 13" https://chat.nixg.ru/vless-chain -o /dev/null -w "%{http_code}"` → **101**.
3. На vps02: `docker ps --filter name=xray-chain` (Up), `sudo docker logs xray-chain --tail 10`.
4. На vps02: `sudo docker exec caddy caddy reload --config /etc/caddy/Caddyfile` (если Caddyfile менялся).
5. Egress с vps02: `curl -s https://api.ipify.org` (ожидается 87.242.100.206 — это НЕ ошибка; цепочка считается только когда клиент снаружи).
## Серверная часть (vps02, для справки)
- Контейнер: `xray-chain` (teddysun/xray), конфиг `/opt/xray-chain/config.json`, слушает 127.0.0.1:18443 (loopback).
- Caddyfile: `/opt/caddy/Caddyfile`, блок `chat.nixg.ru` → `handle /vless-chain* { reverse_proxy 127.0.0.1:18443 { header_up Connection {http.request.header.Connection}; header_up Upgrade {http.request.header.Upgrade} } }`.
- vps03: без изменений (XRay :50002).