# xvrvx/autoxray architecture

> Architecture diagram of the GitHub repository xvrvx/autoxray, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-26). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/xvrvx/autoxray
- Repository: https://github.com/xvrvx/autoxray

## Overview

autoXRAY is a Bash-based VPS setup tool for creating a personal Xray VPN server and usable client configurations. The documented main workflow runs `autoXRAY2.sh` on a Debian VPS with a domain, then provides several VPN access methods and a subscription page; the README also describes direct routing for Russian traffic and an optional RU-to-EU bridge configured with `bridgeTLSxhttp.sh`. The README documents capabilities but no source excerpts were supplied, so links show only these documented relationships, not internal call order or implementation details.

Main entry points: [`autoXRAY2.sh`](https://github.com/xvrvx/autoxray/blob/main/autoXRAY2.sh) (Main installer), [`bridgeTLSxhttp.sh`](https://github.com/xvrvx/autoxray/blob/main/bridgeTLSxhttp.sh) (Bridge installer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_setup["Server setup"]
  node_main["Main installer<br/>[autoXRAY2.sh]"]
  node_xray["Xray core"]
  node_selfsteal["Selfsteal website"]
  node_routing["Traffic routing<br/>[autoXRAY2.sh]"]
end

subgraph group_access["VPN access"]
  node_vless_raw["VLESS RAW TLS<br/>[autoXRAY2.sh]"]
  node_vless_xhttp["VLESS XHTTP TLS<br/>[autoXRAY2.sh]"]
  node_hysteria["Hysteria2<br/>[autoXRAY2.sh]"]
  node_web_proxy["Telegram web proxy<br/>[autoXRAY2.sh]"]
end

subgraph group_delivery["Config delivery"]
  node_subscription["Subscription page<br/>[autoXRAY2.sh]"]
  node_vpn_clients(("VPN client apps"))
end

subgraph group_bridge["RU EU bridge"]
  node_bridge_script["Bridge installer<br/>[bridgeTLSxhttp.sh]"]
  node_ru_server["RU VPS"]
  node_eu_server["EU VPS"]
  node_bridge_tunnel["XHTTP bridge<br/>[bridgeTLSxhttp.sh]"]
end

node_operator(("Server operator"))
node_domain["Domain and DNS"]

node_operator -->|"runs on VPS"| node_main
node_domain -->|"provides domain"| node_main
node_main -->|"installs and configures"| node_xray
node_main -->|"sets up masking"| node_selfsteal
node_main -->|"configures routing"| node_routing
node_main -->|"configures inbound"| node_vless_raw
node_main -->|"configures inbound"| node_vless_xhttp
node_main -->|"configures inbound"| node_hysteria
node_main -->|"sets up proxy"| node_web_proxy
node_main -->|"generates configs"| node_subscription
node_subscription -->|"provides subscription"| node_vpn_clients
node_operator -->|"runs on RU VPS"| node_bridge_script
node_domain -->|"provides domain"| node_bridge_script
node_bridge_script -->|"configures"| node_bridge_tunnel
node_ru_server -->|"hosts bridge"| node_bridge_tunnel
node_bridge_tunnel -->|"connects to"| node_eu_server
node_eu_server -->|"provides XHTTP TLS"| node_vless_xhttp

click node_main "https://github.com/xvrvx/autoxray/blob/main/autoXRAY2.sh"
click node_bridge_script "https://github.com/xvrvx/autoxray/blob/main/bridgeTLSxhttp.sh"
click node_routing "https://github.com/xvrvx/autoxray/blob/main/autoXRAY2.sh"
click node_vless_raw "https://github.com/xvrvx/autoxray/blob/main/autoXRAY2.sh"
click node_vless_xhttp "https://github.com/xvrvx/autoxray/blob/main/autoXRAY2.sh"
click node_hysteria "https://github.com/xvrvx/autoxray/blob/main/autoXRAY2.sh"
click node_web_proxy "https://github.com/xvrvx/autoxray/blob/main/autoXRAY2.sh"
click node_subscription "https://github.com/xvrvx/autoxray/blob/main/autoXRAY2.sh"
click node_bridge_tunnel "https://github.com/xvrvx/autoxray/blob/main/bridgeTLSxhttp.sh"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_main,node_xray,node_selfsteal,node_routing toneBlue
class node_vless_raw,node_vless_xhttp,node_hysteria,node_web_proxy toneAmber
class node_subscription,node_vpn_clients,node_operator toneMint
class node_bridge_script,node_ru_server,node_eu_server,node_bridge_tunnel toneRose
class node_domain toneIndigo
```

## Components

### Server setup

- [Main installer](https://github.com/xvrvx/autoxray/blob/main/autoXRAY2.sh): `autoXRAY2.sh`
- **Xray core**
- **Selfsteal website**
- [Traffic routing](https://github.com/xvrvx/autoxray/blob/main/autoXRAY2.sh): `autoXRAY2.sh`

### VPN access

- [VLESS RAW TLS](https://github.com/xvrvx/autoxray/blob/main/autoXRAY2.sh): `autoXRAY2.sh`
- [VLESS XHTTP TLS](https://github.com/xvrvx/autoxray/blob/main/autoXRAY2.sh): `autoXRAY2.sh`
- [Hysteria2](https://github.com/xvrvx/autoxray/blob/main/autoXRAY2.sh): `autoXRAY2.sh`
- [Telegram web proxy](https://github.com/xvrvx/autoxray/blob/main/autoXRAY2.sh): `autoXRAY2.sh`

### Config delivery

- [Subscription page](https://github.com/xvrvx/autoxray/blob/main/autoXRAY2.sh): `autoXRAY2.sh`
- **VPN client apps**

### RU EU bridge

- [Bridge installer](https://github.com/xvrvx/autoxray/blob/main/bridgeTLSxhttp.sh): `bridgeTLSxhttp.sh`
- **RU VPS**
- **EU VPS**
- [XHTTP bridge](https://github.com/xvrvx/autoxray/blob/main/bridgeTLSxhttp.sh): `bridgeTLSxhttp.sh`

### Other components

- **Server operator**
- **Domain and DNS**

## Connections

- Server operator → Main installer: runs on VPS
- Domain and DNS → Main installer: provides domain
- Main installer → Xray core: installs and configures
- Main installer → Selfsteal website: sets up masking
- Main installer → Traffic routing: configures routing
- Main installer → VLESS RAW TLS: configures inbound
- Main installer → VLESS XHTTP TLS: configures inbound
- Main installer → Hysteria2: configures inbound
- Main installer → Telegram web proxy: sets up proxy
- Main installer → Subscription page: generates configs
- Subscription page → VPN client apps: provides subscription
- Server operator → Bridge installer: runs on RU VPS
- Domain and DNS → Bridge installer: provides domain
- Bridge installer → XHTTP bridge: configures
- RU VPS → XHTTP bridge: hosts bridge
- XHTTP bridge → EU VPS: connects to
- EU VPS → VLESS XHTTP TLS: provides XHTTP TLS
