A dual-core Xray + Sing-box management script for self-hosted servers
One command to deploy, one panel to operate, one subscription to deliver every node
Quick Start · At a Glance · Protocols & Cores · Operations · 简体中文
ArgoV combines Xray, Cloudflare Tunnel (Argo), and Sing-box behind one interactive operations script. It can run an Argo deployment with no public VLESS/VMess listening ports, or a direct-only server for Reality, Hysteria2, TUIC, AnyTLS, and Shadowsocks. Protocols, users, quotas, subscriptions, WARP, and relays remain manageable after the initial install.
ArgoV is for Linux VPS owners who want to manage several inbound protocols without maintaining several configuration files. Deploy only on networks and servers you are authorized to use, and assess applicable laws, provider terms, and network policies yourself.
Run this as root, or from an account with sudo access:
bash <(curl -fsSL https://raw.githubusercontent.com/m2dumpling/ArgoV/main/argov.sh)The installer walks through node name, optional Argo, subscriptions, direct protocols, and the optional Sing-box core.
VLESS-Argo and VMess-Argo are selected by default; toggle them independently with 4 / 5 on the protocol selection page. After installation, open ag → a:
| Action | VLESS + Argo | VMess + Argo |
|---|---|---|
| Add (when absent) | a4 |
a5 |
| Edit internal port / WS path | e1 |
e2 |
| View parameters and link | v1 |
v2 |
| Delete | d1 |
d2 |
To remove only VMess, use ag → a → d2, confirm, then refresh the client subscription. Other nodes are preserved, and reinstalling with data retained does not re-add removed protocols. Removing the last Argo protocol stops the shared tunnel; adding one again restores it. Existing deployments retain their actual enabled protocols, ports and WS paths without reinstalling. Changes validate the Xray configuration and roll back on failure. Both protocols share the tunnel hostname, CDN settings and user credentials; changing one protocol does not restart their shared tunnel.
See the maintenance review (Chinese) for the persistence, service lifecycle, traffic collection and WARP refactoring, compatibility checks and remaining limitations.
Existing VPS deployments do not need reinstalling for this update. Exit the old panel with 0, then run ag again from the SSH shell. The new panel atomically refreshes existing subscription and traffic helpers while retaining deployed nodes, credentials, certificates and core versions. See the VPS upgrade guide (Chinese).
The initial Sing-box step only asks whether to install the core. It prepares the binary and service definition without creating nodes or certificates, or starting an empty service. Add HY2, TUIC, or other protocols later through s → s2; after configuration validation, the first node starts the service and enables it at boot. Existing Sing-box node configurations are preserved.
When it finishes, open the panel with:
agYou can also preset a node name:
NODE_NAME=Tokyo bash <(curl -fsSL https://raw.githubusercontent.com/m2dumpling/ArgoV/main/argov.sh)New Xray HY2 setup defaults the SNI/TLS domain to www.tesla.com; press Enter to accept it or enter another domain. Adding Sing-box HY2 requires a domain. Setup then asks for the port, congestion control, and port hopping. Xray offers BBR, Brutal, Reno, and automatic negotiation; Sing-box offers BBR, Brutal, and client negotiation. Brutal asks for server upload and download bandwidth in Mbps; when no existing values are available, upload defaults to 100 and download to 200. Server download corresponds to client upload. The domain identifies the generated self-signed certificate and TLS handshake; domain ownership is not required and traffic is not forwarded to that website. Existing nodes keep their domains, including when accepting current values in the edit form.
New HY2 nodes enable port hopping by default, preferring UDP 47000-48000 for Xray and 49000-50000 for Sing-box. The form chooses another available range on conflict; enter off to disable hopping. Open the entire selected UDP range in both the cloud security group and host firewall. Both cores restore their rules at boot. Updating the script alone preserves existing bandwidth values, hopping switches, and ranges.
Edit Xray HY2 through ag → a → e4. All five Sing-box protocols have edit actions under ag → s → s2 (e1 for HY2). Enter keeps the current value, invalid input retries, and 0 or cancel returns. HY2/Sing-box edits validate generated configurations and restore configuration, users, and certificates on failure. Refresh subscriptions after changing a domain or certificate. See the usability review in Chinese for completed fixes and remaining improvements.
For testing the development branch on a real server, see the VPS canary validation guide in Chinese, covering fresh installation, deployed-user upgrades, checks, and acceptance criteria.
Script updates retain deployed protocols, domains, ports, credentials, and certificates. Core upgrades validate the existing configuration with the candidate binary before replacement, reject incompatible configurations, and restore the previous binary if service startup fails. Stopped services remain stopped; successful upgrades keep the former binary next to the current one as .argov-previous.
If Sing-box is still running after its installed binary was deleted, the panel identifies the missing files and blocks installation or upgrade. Restore missing configurations from backup before restarting. Uninstallation also refuses to delete files if the service remains running. Upgrade checks for active services use their actual -c / -C configuration paths and working directory.
Earlier scripts could fail to resolve the Sing-box version when GitHub returned compact JSON. The current script accepts compact and multiline responses; fetch it through ag or menu 8, then retry s → s1. API request failures and invalid version responses report their cause and cancel the operation while preserving deployed nodes. An explicitly configured SB_VERSION remains in use.
HY2/TUIC exports read certificate fingerprints from the active configuration and keep legacy URI compatibility options. Mihomo profiles preserve certificate pins, VLESS encryption, and supported transport settings. See the core compatibility review in Chinese for implemented fixes, version limits, and optional follow-up features.
| Item | Notes |
|---|---|
| OS | Debian, Ubuntu, CentOS/RHEL-family, and Alpine Linux; systemd and OpenRC are supported |
| Privilege | Root is recommended. The script installs runtime tools such as curl, jq, openssl, and unzip |
| Ports | Argo does not expose its internal VLESS/VMess ports. Direct protocols require matching TCP/UDP firewall and security-group rules |
| Domain | A temporary Argo tunnel needs no domain. A named tunnel and HTTPS subscription need your domain and/or Cloudflare token |
| Certificates | HY2 and TUIC can use generated self-signed certificates; subscription links include certificate pins where available |
| Area | What ArgoV provides |
|---|---|
| Dual-core control | Xray handles Argo, Reality, HY2, and SS. Optional Sing-box adds TUIC, AnyTLS, and its own direct inbounds |
| Argo tunnel | VLESS / VMess WebSocket over Cloudflare Tunnel, using either temporary trycloudflare.com or a token-based named tunnel |
| Direct protocols | VLESS Reality, Hysteria2, and Shadowsocks, with post-install add/edit/delete/link actions |
| Sing-box | Hysteria2, TUIC, AnyTLS Reality, VLESS Reality, and Shadowsocks, plus install and update actions |
| Users and quotas | Per-user UUID, subscription token, quota, and reset day; over-quota users are automatically disabled and restored on their monthly reset |
| Dynamic subscriptions | One URL emits the current user's available nodes; Base64 links and Clash/Mihomo YAML are supported |
| Certificate pinning | HY2 links can carry pinSHA256 for self-signed certificate pinning |
| Port hopping | Xray HY2 and Sing-box HY2 support UDP port hopping with iptables-managed rules |
| Landing relay | Chain Xray egress through SS, VLESS, VMess, or Trojan relay links |
| WARP routing | Send selected domains through WARP SOCKS5, IPv6 direct, or smart split routing |
| Subscription aggregation | Merge, de-duplicate, and serve external subscription sources alongside local nodes |
| Safe state handling | Checked downloads, atomic state writes, file locking, and migration from older ArgoX state |
| Protocol | Core | Typical use | Notes |
|---|---|---|---|
| VLESS + Argo | Xray | Cloudflare Tunnel with no public proxy port | WebSocket; Argo is optional |
| VMess + Argo | Xray | Compatibility with existing VMess clients | WebSocket; newer Xray builds warn that VMess is deprecated |
| VLESS Reality | Xray / Sing-box | Direct TLS-shaped endpoint | Vision, SNI, Short ID, and x25519 keys |
| Hysteria2 | Xray / Sing-box | UDP/QUIC direct endpoint | Custom SNI and congestion control, certificate pinning, port hopping, and Brutal bandwidth values in both cores |
| TUIC | Sing-box | QUIC direct endpoint | Available after enabling Sing-box |
| AnyTLS Reality | Sing-box | Reality-based direct endpoint | Available after enabling Sing-box |
| Shadowsocks | Xray / Sing-box | Traditional AEAD / SS2022 endpoint | TCP/UDP; newer Xray builds warn that it is deprecated |
ArgoV
│
┌────────────────┴────────────────┐
│ │
Xray Sing-box (optional)
│ │
Argo · Reality · HY2 · SS HY2 · TUIC · AnyTLS · Reality · SS
│ │
└───────────────┬─────────────────┘
│
Users, quotas, subscriptions, routing, operations
Generated configurations follow current Xray and sing-box conventions: Xray Reality server inbounds use target, Xray HY2 Brutal uses brutalUp / brutalDown, and Sing-box uses up_mbps / down_mbps. Sing-box HY2 BBR ignores client bandwidth declarations; BBR profiles are offered and emitted only on supported 1.14+ versions. Built-in Mihomo subscriptions include HY2 certificate pins and client upload/download bandwidth, with directions reversed from the server values. Other URI clients may require manual bandwidth settings. Argo WebSocket, VMess, and Shadowsocks remain available to avoid breaking existing clients; newer Xray releases may warn about their deprecation. Moving to XHTTP or VLESS Encryption changes client connection details, so it is not forced during an update.
Node name
│
├─ Enable Argo ── CDN / UUID / temporary or named tunnel / internal ports
│
└─ Skip Argo ─── Deploy direct Reality / HY2 / SS endpoints
│
├─ Subscription server (HTTP or HTTPS)
└─ Optional Sing-box (HY2 / TUIC / AnyTLS / Reality / SS)
Argo is not required. If you skip it at install time, enable it later from a → a0. Reinstalling preserves user state and configured optional inbounds.
Run ag to enter the panel.
| Entry | Action |
|---|---|
1 |
View links, subscription address, and QR code |
2 / 3 |
Switch CDN; edit basic settings and subscription settings |
a |
Manage Xray protocols, enable Argo, and add custom links |
u |
Add/enable/disable users; set quotas, reset days, and subscription tokens |
s |
Install or update Sing-box; manage its protocols and links |
w |
Configure WARP SOCKS5 / IPv6 domain routing |
r |
Configure or clear a landing relay |
g |
Manage external subscription sources |
4 / 5 / 6 |
Start, stop, or restart services |
7 / 8 / x |
Reinstall while keeping data; update the script; update Xray |
User state is stored in /etc/xray/argov_users.json. Each user can have an independent UUID, subscription token, quota, consumption counters, and monthly reset day.
| Path | Accounting method | Quota behavior |
|---|---|---|
| Xray inbounds | Xray StatsService gRPC, per-user email and both traffic directions | Over-quota users are removed from Xray client lists |
| Sing-box dedicated-port inbounds | iptables port counters, periodically accumulated | Over-quota users no longer receive active per-user inbounds |
| HY2 hopping ports | No individual HY2 inbound for non-default users | Current limitation of shared port-hopping mode |
| Mode | Example |
|---|---|
| HTTPS domain | https://sub.example.com:2096/sub?token=... |
| HTTP IP | http://SERVER_IP:PORT/sub?token=... |
The default user receives shared nodes and custom links. Quota users receive only their available nodes and dedicated Sing-box ports.
- SOCKS5: list traffic is sent through local WARP SOCKS5, normally
127.0.0.1:40000. - IPv6: list traffic is sent through the IPv6 direct egress.
- Smart: Google-family domains use IPv6 while YouTube-family domains use WARP SOCKS5.
Landing relay sends traffic received by both Xray and Sing-box proxy inbounds to another SS, VLESS, VMess, or Trojan node. “All” covers client traffic received by either proxy core, not traffic initiated by the server itself. When both cores offer the same protocol, Sing-box subscription names include a core label to make the endpoints distinguishable. Subscription aggregation merges multiple VPS or external feeds, removes duplicates, and serves the result through the local subscription endpoint.
# Open the panel
ag
# Check services on systemd systems
systemctl status xray sing-box
# Or on Alpine / OpenRC
rc-service xray statusImportant files:
| File | Purpose |
|---|---|
/etc/xray/argov.conf |
Persisted ArgoV options and secret references |
/etc/xray/config.json |
Xray runtime configuration |
/etc/xray/argov_users.json |
Users, tokens, quotas, and traffic state |
/etc/sing-box/config.json |
Sing-box runtime configuration |
/etc/xray/argo.log |
Temporary Argo tunnel URL log |
If a node or subscription stops working, check the service for the feature you enabled before reinstalling. On systemd systems, inspect the Xray service and recent logs:
systemctl status xray
journalctl -u xray -n 50 --no-pagerFor Argo tunnel issues, check argov-tunnel and the tunnel URL log:
systemctl status argov-tunnel
journalctl -u argov-tunnel -n 50 --no-pager
tail -n 50 /etc/xray/argo.logOn Alpine / OpenRC, use rc-service for service status:
rc-service xray status
rc-service argov-tunnel statusargov-tunnel is absent when Argo is disabled. The sing-box and argov-sub services are present only when those optional features are enabled. Redact tokens, UUIDs, and domains before sharing logs in an issue.
If nodes connect but the subscription fails to update, check the subscription service separately from Xray and Argo. On systemd systems:
systemctl status argov-sub
journalctl -u argov-sub -n 50 --no-pagerOn Alpine / OpenRC:
rc-service argov-sub statusThe service exists only after subscriptions are enabled. Use the current subscription address shown by the panel; for a per-user subscription, use that user's address from the u menu.
| Symptom | What to check |
|---|---|
| Connection refused or timeout | Confirm argov-sub is running, the URL uses the configured subscription port, and that TCP port is allowed by both the host firewall and cloud security group. Argo does not automatically expose the subscription service. |
| HTTPS certificate error | Check the subscription domain and certificate separately from the proxy node's certificate. |
| HTTP 404 | Check the address and token, then confirm the user is enabled and has not been disabled by their quota. A valid user's subscription can also briefly return 404 while its cache is being generated; retry after the refresh rather than immediately reinstalling. |
Subscription URLs contain credentials. Do not post the complete URL, user database, or configuration file in a public issue; share the error and redacted diagnostic output instead.
Common link formats work with v2rayN, Nekoray, Shadowrocket, sing-box, Mihomo / Clash Verge, Karing, and similar applications, subject to each client's core version and protocol support.
- Open matching cloud security-group and host firewall ports for direct Reality, HY2, TUIC, AnyTLS, and SS endpoints.
- Self-signed HY2/TUIC certificates require client-side insecure acceptance; prefer the
pinSHA256value in subscription links for certificate pinning. - Sing-box HY2, TUIC, and AnyTLS rely on features included in official release builds. Prefer updating through the panel rather than replacing the binary with a minimal build.
- The repository currently does not include a
LICENSEfile. Confirm authorization and compliance requirements before reuse, distribution, or deployment.
Issues and pull requests are welcome. From the repository root, run the complete check before submitting a change (Bash and Python are required):
bash tests/argov_static_tests.sh argov.shThis checks Bash syntax, all Python regression suites (including interactive forms, configuration generation, subscriptions, migrations, relay configuration, and core compatibility), and the tunnel service log settings. Interactive tests require jq and openssl; Xray, Sing-box, and Mihomo binaries on PATH enable checks against the actual cores and local connection tests. Use tests/run_xray_matrix.py to repeat the full suite for multiple Xray binaries; see the Xray version matrix for scope and usage.