CLI configuration manager for XRay-core.
Rayconf converts XRay outbound URLs (vless://, vmess://, trojan://, ss://, socks://) into valid JSON configuration files that XRay can consume directly. It also fetches and decodes subscription (remote) links — lists of servers shared in plain-text or Base64-encoded format — so you can pick the best server without writing a single line of JSON by hand.
Output goes to stdout, meant to be piped straight into xray run -c stdin: (or xray run without -c — XRay reads from stdin by default when no config file is given).
GUI apps like Happ and v2raytun are great, but if you prefer the original xray CLI, you need to manage configurations yourself. Subscription links (e.g. www.example.com/subscription/abcde) and outbound URLs (e.g. vless://...) must be translated into verbose XRay JSON. Rayconf does that translation for you, interactively, right in the terminal.
| Protocol | URI scheme |
|---|---|
| VLESS | vless:// |
| VMess | vmess:// |
| Trojan | trojan:// |
| Shadowsocks | ss:// |
| SOCKS | socks:// / socks4:// / socks5:// |
Supported transports: TCP, WebSocket, gRPC, QUIC, KCP, XHTTP.
Supported security layers: TLS, Reality.
- Rust (edition 2024)
- tokio — async runtime
- clap — CLI argument parsing with derive macros
- dialoguer — interactive fuzzy-select prompts, multi-select, input
- reqwest — HTTP client for fetching subscription URLs
- serde / serde_json — configuration serialization
- base64 — decoding Base64-encoded subscription lists
- dnsclient — DNS resolution for server reachability checks
- futures — concurrent TCP probes (buffered, unordered)
- spinners — terminal spinners during long operations
git clone https://github.com/pokatomnik/rayconf.git
cd rayconf
cargo build --releaseThe binary will be at target/release/rayconf. Move it to a directory in your $PATH.
Pre-built binaries are available on the Releases page. Download the archive for your platform, extract, and place the binary in your $PATH.
Rayconf can generate completion scripts for Bash, Zsh, Fish, and other shells:
rayconf completion --shell bash > /usr/share/bash-completion/completions/rayconf
rayconf completion --shell zsh > /usr/share/zsh/site-functions/_rayconf
rayconf completion --shell fish > ~/.config/fish/completions/rayconf.fishStore an outbound URL so you can reuse it later:
rayconf add vless://uuid@server:443?security=reality&sni=example.com&fp=chrome&type=tcp&flow=xtls-rprx-vision#MyServerOr run rayconf add without arguments — you will be prompted interactively.
Alias: rayconf a
rayconf deleteSelect one or more servers from the list to remove. Aliases: rayconf d, rayconf r, rayconf remove
rayconf select | xray runYou will be prompted to pick a server from saved ones. The generated JSON config is printed to stdout and piped into XRay.
rayconf remote add # add a new subscription
rayconf remote remove # remove a subscription
rayconf remote list # list all subscriptionsWhen adding a remote, you specify:
- alias — a name to identify the subscription
- URL — the subscription endpoint
- decoder —
plain(newline-separated URLs) orbase64(Base64-encoded blob) - custom HTTP headers (optional) — add arbitrary headers to the subscription request
rayconf select --remote | xray runRayconf fetches the subscription, decodes the server list, probes each server over TCP (measures round-trip time), and shows servers sorted by response time with dead/unreachable servers marked. Pick one and the JSON config is piped to XRay.
| Flag | Description |
|---|---|
--remote, -r |
Use servers from subscription URLs instead of locally saved ones |
--socks-port |
Override the default SOCKS5 inbound port (default: 1080) |
--http-port |
Use an HTTP inbound instead of SOCKS5 (default: 8080) |
--log-level |
Set XRay log level: none, debug, info, warning, error |
--log-dns |
Enable DNS query logging in XRay |
--skip-check |
Skip the TCP reachability probe; show servers immediately |
--socks-portand--http-portare mutually exclusive. Without either, the config defaults to a SOCKS5 inbound on port1080.
Server URLs and subscription metadata are stored in ~/.config/rayconf/rayconf.json. The file is auto-created on first use.
When you run rayconf select --remote, Rayconf:
- Fetches the subscription URL.
- Decodes the server list (plain or Base64).
- Parses each URL into an XRay server entry.
- Runs concurrent TCP probes (up to 5 in parallel) to measure round-trip time.
- Sorts servers from fastest to slowest; servers that do not respond within 10 seconds are marked as dead.
- Displays the sorted list with per-server latency.
Use --skip-check to bypass the probe and show the raw server list immediately.
- XRay-core — the engine that keeps the internet open
- AvenCores — free VPN configurations (Гойда!)
- Keivan-sf — original URI parsing logic that powers the config generator
- @pokatomnik — project author and maintainer
- Keivan-sf — author of the original idea
BSD Zero Clause License — do whatever you want with this code.