You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ansible playbooks for deploying a self-hosted VPN server stack based on [Xray-core](https://github.com/XTLS/Xray-core) and [Raven-subscribe](https://github.com/AlchemyLink/Raven-subscribe).
8
+
Ansible playbooks for deploying a production-ready self-hosted VPN server stack based on [Xray-core](https://github.com/XTLS/Xray-core) and [Raven-subscribe](https://github.com/AlchemyLink/Raven-subscribe). Designed for censorship circumvention with traffic indistinguishable from regular HTTPS.
9
9
10
10
**What you get:**
11
11
12
-
- Xray-core with VLESS + XTLS-Reality and VLESS + XHTTP inbounds
- **TCP stream relay**: port 8445 → `127.0.0.1:443` (passes VLESS Reality through nginx)
269
+
270
+
**Important:** When deploying nginx_frontend and Xray inbounds together, always deploy **Xray first** (`--tags xray_inbounds`), then nginx. nginx sends PROXY protocol headers immediately — Xray must be ready to accept them.
263
271
264
272
---
265
273
266
274
### `relay` role
267
275
268
-
Deploys nginx on the RU VPS as a relay. Responsibilities:
276
+
Deploys nginx on the RU VPS as an SNI relay. Responsibilities:
269
277
270
-
- Obtains Let's Encrypt certificates for `relay_domain` and `relay_sub_my`
271
-
- Serves a static stub site on `relay_domain` (camouflage)
278
+
- **Stream SNI routing on :443** — forwards all VPN traffic to EU VPS:443 by default
279
+
- Serves a static stub site on `relay_domain` (camouflage, Let's Encrypt cert)
272
280
- Proxies `my.relay_domain` → EU VPS nginx_frontend `:8443` (Raven-subscribe)
273
-
- **TCP stream relay**: port 8444 → EU VPS `:8445` (VLESS Reality passthrough)
281
+
282
+
---
283
+
284
+
### `monitoring` role
285
+
286
+
Deploys the full monitoring stack on the EU VPS:
287
+
288
+
- **[xray-stats-exporter](https://github.com/AlchemyLink/xray-stats-exporter)** — Prometheus exporter for per-user and per-inbound traffic metrics
289
+
- **VictoriaMetrics** — Prometheus-compatible time series database
290
+
- **Grafana** — dashboards for traffic, server health, Raven-subscribe status, and alerting rules
274
291
275
292
---
276
293
@@ -384,20 +401,21 @@ singbox:
384
401
385
402
| Variable | Default | Description |
386
403
|----------|---------|-------------|
387
-
| `nginx_frontend_domain` | `media.example.com` | EU VPS domain — set to your domain |
388
-
| `nginx_frontend_listen_port` | `8443` | nginx HTTPS listen port (not 443 — taken by Xray) |
389
-
| `nginx_frontend_xhttp_port` | `2053` | Xray XHTTP upstream port |
- [Raven-subscribe](https://github.com/AlchemyLink/Raven-subscribe) — subscription server (Go): auto-discovers users from Xray config, syncs via gRPC API, serves personal subscription URLs in Xray JSON / sing-box JSON / share link formats
546
+
- [xray-stats-exporter](https://github.com/AlchemyLink/xray-stats-exporter) — Prometheus exporter for per-user and per-inbound Xray traffic metrics
500
547
- [Xray-core](https://github.com/XTLS/Xray-core) — the VPN core
501
548
- [sing-box](https://github.com/SagerNet/sing-box) — alternative VPN core (Hysteria2)
0 commit comments