git:20260704.135f674 to git:20260829.ead7c8d
251 added, 59 removed. Audit A to A.
---
id: xrayebator
name: 'Xrayebator: your own VPN on a VPS (Xray Reality)'
summary: >-
- KISA's skill: an interactive manager for an Xray Reality VPN on your own VPS. VLESS +
- REALITY — traffic indistinguishable from ordinary HTTPS, no domain or certificate, bypasses
- DPI. Transport profiles, adding clients, HAPP subscription. So the agent runs research and
- the browser through its own clean exit, past the blocks.
+ KISA's skill for installing and repairing a personal Xray Reality exit on a VPS. The current
+ 3.0 line provides VLESS + REALITY routes, a managed HAPP subscription, and an August 2026 DNS
+ hardening path: encrypted DNS stays inside the full TUN instead of leaking to the access ISP.
type: skill
author: kisa
recommended: false
added: 2026-07-04
- tags: [vpn, xray, reality, vless, vps, censorship, proxy]
+ tags: [vpn, xray, reality, vless, vps, censorship, dns, doh, happ]
source: https://github.com/howdeploy/Xrayebator
description: >-
- Use when the user needs their own VPN/proxy on a VPS to bypass regional blocks or DPI so
- research APIs and browsers work through a clean exit. One-script Xray VLESS+REALITY
- installer and client manager.
+ Use when the user needs a personal VPN/proxy on a VPS, or when an existing Xrayebator + HAPP
+ connection needs to be repaired after DNS interception or encrypted-resolver blocking. Covers
+ safe update, managed routing, DNS bootstrap, leak checks, rollback boundaries, and redaction.
license: MIT
---
# Xrayebator — your own VPN on a VPS (Xray Reality)
- A single script spins up and manages an **Xray Reality VPN** on your VPS. The tech is **VLESS +
- REALITY**: traffic is indistinguishable from an ordinary HTTPS connection to a real site, with no
- domain or certificate of your own. Ordinary protocols (OpenVPN, WireGuard, Shadowsocks) get
- caught by DPI on their signature; REALITY masquerades as legitimate TLS to someone else's site —
- and so it doesn't get flagged by packet inspection. Public: `howdeploy/Xrayebator` (v2.0), MIT.
+ Xrayebator installs and manages a personal **VLESS + REALITY** exit on a VPS. REALITY makes the
+ transport resemble an allowed TLS connection without requiring a public domain for the VPN
+ transport itself. This raises the cost of basic DPI classification; it is not a promise that the
+ traffic is literally indistinguishable or immune to active probing.
- > **Legality.** Your own VPN for privacy and access to your own services is legitimate in many
- > countries, but not everywhere. This is for personal access and research, not for breaking the
- > law. Check your local rules; responsibility for use is on the user.
+ This guide was reviewed on **2026-08-29** against Xrayebator `main` at
+ [`7df2381`](https://github.com/howdeploy/Xrayebator/commit/7df2381ce2427378e80e4e2fbc74f801d83a6795).
+ The dated DNS section matters: filtering behaviour differs by operator and can change without a
+ client update.
- ## Why this is in deploychan
+ > **Legality and scope.** Use this for systems and accounts the user is authorised to operate.
+ > Local rules differ. Do not weaken a corporate DNS or monitoring policy without the system
+ > owner's approval.
- Some services are unavailable from your region or flag public VPNs. The `agent-internet` and
- `agent-voice` guides point right at this: research APIs, the browser, ElevenLabs, Stripe may not
- work from within your region. Xrayebator gives you **your own clean exit** — the agent runs
- research and the browser through your VPS, not through a flagged public VPN. Your own VPN = your
- own control.
+ ## Privacy boundary for the agent
- ## Install and management
+ Treat connection material as secrets. Do not ask the user to paste or publish:
- The script is interactive — run it on a clean VPS as root:
+ - a subscription URL or QR code;
+ - tokens, keys, exported client JSON, server addresses, or domains;
+ - the user's labels for servers, subscriptions, routes, or routing profiles;
+ - unredacted service logs or packet captures.
+ Operate over the authorised SSH session, inspect values locally, and report only state such as
+ “subscription endpoint returned success”, “managed routing is active”, or “one plaintext DNS
+ packet was observed”. Keep backups on the server. Never put private values in an issue, chat,
+ shell history, screenshot, or this guide.
+
+ ## Install or update
+
+ For a new disposable VPS, inspect the installer before running it:
+
```bash
- git clone https://github.com/howdeploy/Xrayebator.git
- cd Xrayebator
- sudo bash xrayebator
+ curl -fsSLo ./xrayebator-install.sh \
+ https://raw.githubusercontent.com/howdeploy/Xrayebator/main/install.sh
+ less ./xrayebator-install.sh
+ sudo bash ./xrayebator-install.sh
```
- First run — installation (installs Xray-core, generates Reality keys, brings up the node). Every
- subsequent run — a management menu:
+ For an existing installation, take a provider snapshot or another tested recovery point, then
+ update the project code and enter the menu so one-time migrations run:
- - **Install** — deploy Xray Reality on this VPS.
- - **Add client** — generate a new client (VLESS link + QR).
- - **Remove** — remove a client or tear down Xray.
+ ```bash
+ sudo xrayebator-update main
+ sudo xrayebator
+ ```
- Keys and config live in `/usr/local/etc/xray/`. Masking is configured via the SNI list (which
- real site the connection mimics).
+ The similarly named `sudo xrayebator update` updates Xray-core only. It does not install the
+ subscription and routing fixes from the project repository.
- ## Transport profiles
+ The current 3.0 flow builds several TCP, XHTTP, and gRPC route variants. HAPP is the primary
+ subscription client; use version **3.3.6 or newer**. Other clients can consume compatible raw
+ VLESS routes or the reduced v2ray subscription, but they do not receive the complete managed HAPP
+ routing behaviour.
- v2.0 supports several combinations for different network and DPI conditions:
+ ## DNS threat model — Russia, August 2026
- - **VLESS + TCP + Reality + Vision** — the baseline, the most stable.
- - **+ Mux / + uTLS** — multiplexing and TLS-fingerprint spoofing.
- - **VLESS + XHTTP + Reality** — an HTTP wrapper, more resilient where TCP gets cut.
- - **VLESS + gRPC + Reality** — gRPC transport (careful, slower).
- - **VLESS PQ encryption** (`mlkem768x25519plus`) — post-quantum encryption.
+ As of 2026-08-29, assume all three conditions below can occur:
- Plus a **HAPP subscription** and multi-route profiles: the client gets a subscription rather than
- a single link.
+ 1. **Open DNS can be redirected or forged.** Measurements published on 2026-08-28 showed selected
+ UDP/53 queries sent to well-known public resolvers receiving authoritative-looking `NXDOMAIN`
+ answers. In the same measurement, TCP/53 reached the intended resolver. This is evidence for
+ those networks and timestamps, not proof that every operator implements one identical rule.
+ 2. **A public encrypted resolver can be blocked before DNS is exchanged.** August field reports
+ describe DoH and DoT connections stalling or being reset during TLS setup. Results varied by
+ operator, region, resolver, address family, and day.
+ 3. **Correct DNS alone does not bypass later filtering.** DoH protects the query on the path to the
+ resolver, but a direct connection can still expose destination IP metadata or TLS SNI. A full
+ tunnel protects more of the access link than “secure DNS” enabled in a browser alone.
- ## Clients
+ The practical conclusion is deliberately narrower than “switch resolver”: **the DNS transport
+ must itself be captured by the working VPN tunnel**.
- Import the generated VLESS link or scan the QR:
+ ```text
+ application
+ ↓
+ operating-system DNS + HAPP TUN
+ ↓
+ managed Global Proxy routing
+ ↓
+ VLESS + REALITY tunnel
+ ↓
+ VPS outside the filtered access network
+ ↓
+ authenticated DoH resolver
+ ```
- | Platform | App |
- |---|---|
- | Android | v2rayNG, NekoBox, Hiddify, HAPP |
- | iOS/macOS | Shadowrocket, V2BOX, Streisand, HAPP |
- | Windows | v2rayN, Hiddify |
- | Linux | v2rayA, Nekoray, Hiddify |
+ On this path the access ISP sees the tunnel flow, not a separate open DNS exchange or a direct TLS
+ session to a public resolver. The VPS operator and the chosen resolver remain inside the trust
+ model: the resolver can see queries, and the VPS can observe destination metadata.
- ## In practice
+ ## Required routing invariants
- - Take a VPS in a clean datacenter, outside the blocked region.
- - Don't put detectable protocols (OpenVPN/WireGuard) on the same VPS — some providers ban a VPS
- that's been spotted using them. REALITY doesn't require that.
- - Pick your SNI masking to match a site reachable from your region: if the current one gets
- blocked, you switch the SNI to another and the connection looks legitimate again.
- - Your own VPN is what the "agent + research/browser" combo needs: set up the exit, and
- `ALL_PROXY` / the system proxy route the agent's traffic through the clean exit.
+ Current Xrayebator `main` generates a complete HAPP routing payload and validates its schema before
+ publishing it. For the safe default, verify these invariants instead of copying a sample JSON with
+ someone else's values:
+
+ - **Global Proxy is enabled.** Public application traffic and the DoH connection use the tunnel.
+ - Both **remote DNS** and **domestic DNS** use DoH. Do not leave a provider-DNS or open-UDP fallback
+ active merely because it answers faster.
+ - The DoH hostname has a locally stored **bootstrap address** and a matching host override. This
+ avoids the circular first lookup through the access provider. The bootstrap address selects the
+ server; TLS certificate validation authenticates it.
+ - Direct destinations contain only local, private, link-local, multicast, and other host-network
+ ranges needed to reach the LAN. There are no public-domain or country-wide direct rules on the
+ client.
+ - Domain strategy is `IPIfNonMatch`; FakeDNS is disabled in this managed DoH profile.
+ - Geo databases come from the same authenticated HTTPS subscription origin. The client does not
+ need a separate direct download from GitHub before routing can initialise.
+
+ These are the invariants implemented and regression-tested in the reviewed `main` commit. The
+ official [HAPP routing documentation](https://www.happ.su/main/dev-docs/routing) confirms the
+ meaning of Global Proxy, DNS types, host overrides, direct lists, domain strategy, and FakeDNS.
+
+ ### What the bootstrap entry does not do
+
+ A bootstrap entry prevents a plaintext lookup of the DoH hostname; it does not make a direct DoH
+ connection invisible. Safety comes from **both** the bootstrap entry **and** routing the resulting
+ HTTPS connection through REALITY. If that HTTPS connection leaves on the physical interface, a
+ known public endpoint can still be blocked.
+
+ The tunnel endpoint has its own bootstrap boundary. When a connection route uses a hostname, that
+ name may need resolving before the tunnel exists. Keep an out-of-band recovery path and prefer a
+ locally stored address-based endpoint when DNS failure prevents the tunnel from starting. Do not
+ publish that address. If using Xrayebator's address-based HTTPS subscription mode, verify its
+ short-lived certificate renewal rather than assuming it is permanent.
+
+ ## Repair runbook for an existing HAPP user
+
+ Follow the sequence; a green latency result for one route is not enough.
+
+ 1. **Preserve recovery access.** Confirm SSH access that does not depend on the connection being
+ repaired. Take a VPS snapshot. Record no secret values in the work log.
+ 2. **Update the project, then run migrations.** Execute the two update/menu commands above. Do not
+ stop after updating Xray-core.
+ 3. **Repair or create the managed HAPP subscription** from the Xrayebator menu. Use the existing
+ server-side data where possible; do not invent a public profile label for the user.
+ 4. **Validate locally on the VPS:**
+
+ ```bash
+ sudo /usr/local/bin/xray test -config /usr/local/etc/xray/config.json
+ sudo systemctl is-active xray
+ sudo systemctl is-active xrayebator-sub
+ ```
+
+ Inspect detailed logs locally only if a status is not `active`; redact all addresses, domains,
+ tokens, labels, and connection strings before reporting.
+ 5. **Update HAPP**, fully quit every old HAPP process, start one current instance, force-refresh the
+ existing subscription, and reconnect once. A managed routing entry may be locked in the UI by
+ design because the subscription owns it.
+ 6. **Disable competing client routing overrides** during verification. Confirm every invariant in
+ the previous section and wait until both geo assets load successfully.
+ 7. **Confirm the main TUN is running.** HAPP route latency is measured by a temporary core and can
+ be green while the main application TUN is down.
+ 8. **Run the leak and behaviour checks below.** Only then hand the connection back to the user.
+
+ ## Verification without disclosing connection data
+
+ ### Plaintext DNS leak check
+
+ On a desktop client, identify the physical network interface locally. In one terminal, observe
+ only port 53 while HAPP TUN is connected:
+
+ ```bash
+ sudo tcpdump -pni <physical-interface> 'udp port 53 or tcp port 53'
+ ```
+
+ In another terminal, trigger several uncached lookups through ordinary applications. Stop the
+ capture and report only whether the packet count was zero. Do not paste the capture: even one line
+ can expose queried names and network addresses.
+
+ Expected result: **no port-53 packets on the physical interface**. Seeing encrypted tunnel traffic
+ is normal. If port-53 traffic appears, find the process or application bypassing TUN; do not solve
+ it by selecting another open resolver.
+
+ ### Direct encrypted-resolver check
+
+ Inspect the physical-interface destinations locally while generating a fresh lookup. There must
+ be no direct connection to the configured DoH bootstrap destination; the only access-network flow
+ for the lookup should be the VPN transport. Report pass/fail only.
+
+ ### Behaviour checks
+
+ - Resolve and open several ordinary domains through normal applications, not only with a route
+ ping tool.
+ - Confirm subscription refresh and both geo downloads succeed while connected.
+ - Temporarily test on each access network the user actually relies on; operator behaviour is not
+ uniform.
+ - If the user requires fail-closed behaviour, enable the operating system's “block without VPN” or
+ equivalent kill switch after explicit approval and test tunnel failure. Xrayebator configures
+ the server; it cannot guarantee the client OS will suppress DNS after HAPP disconnects.
+
+ ## Fallback order
+
+ 1. **Full TUN with DNS inside the tunnel** — the managed Xrayebator + HAPP design.
+ 2. **A private or low-profile DoH service on standard HTTPS, still inside the tunnel** — use when
+ the managed resolver is unavailable from the VPS. Preserve certificate validation, bootstrap,
+ Global Proxy, and the no-public-direct-rules invariant.
+ 3. **Another working public DoH endpoint, still inside the tunnel** — availability is operator- and
+ resolver-dependent when used directly, so do not treat today's success as a durable property.
+ 4. **TCP/53 only as a short diagnostic or emergency observation.** It is unencrypted, exposes the
+ query, and can be redirected as easily as UDP once policy changes. Never make it the steady-state
+ configuration.
+
+ DoT and DoQ have distinct, easy-to-filter transports and were not a reliable direct-access escape
+ in the August reports. They can be valid between the VPS and its resolver, but they do not replace
+ the client-side full-tunnel requirement.
+
+ ## What does not solve the problem
+
+ - **Changing one open public resolver for another:** the censor can redirect by port or add the
+ new endpoint to a block rule.
+ - **Enabling DNSSEC alone:** a validating resolver can reject forged data or an invalid denial of
+ existence for signed zones, but it cannot recover the correct answer from a blocked path. The
+ result is commonly a safe failure, not connectivity.
+ - **Adding site addresses to a hosts file:** CDN addresses change, multiple record types are used,
+ and later IP/SNI filtering remains.
+ - **Browser-only DoH with public traffic outside TUN:** it may protect the DNS exchange while the
+ subsequent connection still leaks the destination or is blocked.
+ - **Country-wide direct routing on the client:** it reintroduces the access ISP into DNS and TLS
+ decisions. If the user explicitly needs split DNS for local services, document the privacy
+ trade-off and route only the minimum named zones after approval.
+
+ ## Incident handling
+
+ - **Subscription refresh fails before the tunnel starts:** distinguish subscription-hostname
+ bootstrap from in-tunnel DNS. Restore through the authorised recovery channel; do not send the
+ secret URL to a public checker.
+ - **Routes are green but applications fail:** update HAPP, terminate stale HAPP cores, refresh the
+ subscription, confirm the main TUN, then check routing overrides and geo downloads.
+ - **DoH appears on the physical interface:** routing is bypassed. Stop and repair Global
+ Proxy/direct rules; do not declare success merely because DNS answers are correct.
+ - **DoH works with TUN off but fails with TUN on:** first test resolver reachability from the VPS.
+ Preserve full-tunnel routing while distinguishing a VPS-egress problem from a client leak.
+ - **The managed DoH endpoint fails from the VPS:** test from the VPS, then select an authorised
+ private or alternative DoH endpoint. Keep its identity in local configuration only.
+ - **A custom routing payload is rejected:** use the managed fallback. Current Xrayebator validates
+ the full HAPP schema and deliberately rejects old rules-only JSON that can create a broken locked
+ entry.
+
+ ## Sources and evidence quality
+
+ - [Habr, 2026-08-28: open DNS interception measurements](https://habr.com/ru/articles/1075272) —
+ direct `dig` observations for UDP/53 versus TCP/53 on the author's network; useful but not a
+ nationwide measurement.
+ - [Teplitsa, 2026-08-07: multi-node DNS censorship study](https://te-st.org/2026/08/07/dnsdnsdns) —
+ five observation points, several transports, and an explicit distinction between in-path
+ interference and resolver/geolocation behaviour.
+ - [NTC community thread, August 2026](https://ntc.party/t/%D0%B1%D0%BB%D0%BE%D0%BA%D0%B8%D1%80%D0%BE%D0%B2%D0%BA%D0%B0-doh-google-cloudflare-quad9-opendns/23007?page=7) —
+ operator-specific reports showing heterogeneity; treat as field evidence, not controlled proof.
+ - [Xrayebator reviewed source, 2026-08-29](https://github.com/howdeploy/Xrayebator/blob/7df2381ce2427378e80e4e2fbc74f801d83a6795/xrayebator#L589-L707) —
+ managed HAPP schema validation, Global Proxy, DoH bootstrap, local-only direct ranges, geo URLs,
+ domain strategy, and FakeDNS state.
+ - [Xrayebator regression test at the same commit](https://github.com/howdeploy/Xrayebator/blob/7df2381ce2427378e80e4e2fbc74f801d83a6795/validation/test-happ-subscription-static.sh#L65-L100) —
+ executable assertions for the managed routing payload and rejection of the legacy incomplete
+ shape.
+ - [RFC 8484 — DNS Queries over HTTPS](https://www.rfc-editor.org/rfc/rfc8484),
+ [RFC 7858 — DNS over TLS](https://www.rfc-editor.org/rfc/rfc7858),
+ [RFC 9250 — DNS over QUIC](https://www.rfc-editor.org/rfc/rfc9250), and
+ [RFC 4033 — DNSSEC capabilities and limits](https://www.rfc-editor.org/rfc/rfc4033) — protocol
+ definitions; they do not describe the August 2026 deployment state in Russia.
+
+ Re-check current sources before applying this runbook after August 2026. A temporary protocol gap
+ is an observation, not a stable feature.