Simple one-click script for installing and managing Xray-core on Ubuntu.
Automatically sets up the protocol, obtains a TLS certificate, and generates connection links and QR codes.
bash <(curl -sSL https://raw.githubusercontent.com/SpecFlowdev/Xray-Script/main/xray.sh)Requires Ubuntu 20.04 / 22.04 / 24.04 and root access
| Protocol | Transport | Description |
|---|---|---|
| Trojan | WS + TLS | WebSocket over TLS |
| Trojan | TCP + TLS | Direct connection, low overhead |
| VLESS | WS + TLS | WebSocket over TLS |
| VLESS | TCP + TLS | Direct connection, low overhead |
- Auto install β system packages, UFW, Xray, TLS certificate in one run
- Auto TLS β Let's Encrypt via acme.sh with auto-renewal
- Certificate management β dedicated menu, expiry check, issuance
- Named users β each user has a name, easy to manage
- User management β add, remove, show QR for one or all users
- Protocol switching β change protocol from menu without reinstalling
- WARP β Cloudflare WARP as outbound, route all traffic or specific domains
- Multihop β chain two servers, Russian traffic goes direct, rest via second server
- Short command β after install just type
xray-manage
| Platform | Client |
|---|---|
| Android | v2rayNG |
| iOS | Shadowrocket, Karing |
| Windows | v2rayN, Hiddify |
| macOS | Hiddify, Karing |
| Linux | v2rayN, NekoBox |
xray-manageDomain: vpn.example.com
Protocol: TROJAN_WS_TLS
Users: 3
Xray: active
ββ Users ββ
1. List all users
2. Add user
3. Remove user
4. Link & QR for one user
5. Show all links & QR
ββ Protocol ββ
6. Install or reinstall protocol
7. TLS Certificates
ββ Extra ββ
8. WARP (bypass blocks)
9. Multihop (server chain)
ββ System ββ
10. Restart Xray
11. Status & logs
12. Update script
Chain of two servers:
Client β Server 1 β Server 2 β Internet
- π·πΊ Russian domains and IPs β Server 1 directly (fast)
- π Everything else β Server 2 (via chain)
Both servers are installed with the same script.
- Route all traffic through Cloudflare WARP
- Route only specific domains (e.g.
openai.com)
- Ubuntu 20.04 / 22.04 / 24.04
- Root access
- Open ports: 22, 80, and the port for Xray
- Domain with an A record pointing to your server IP
MIT