Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Getting Started

xrat is a Rust-based CLI tool and daemon for managing proxy configurations. It imports subscription links, parses and normalizes proxy URIs, tests connectivity and performance, previews runtime configs for Xray-core and sing-box, manages an Xray/V2Ray local proxy runtime process plus sing-box-backed Hysteria2 sessions, and exposes an HTTP API.

Prerequisites

  • Xray-core binary installed and available in PATH
  • Proxy cores: Xray is required for runtime use; setup can install Xray, sing-box, and V2Ray as verified user-local tools
  • Rust toolchain and just when building from source

Installation

Choose one install path:

Configuration Directory

xrat uses a configuration directory with the following resolution order:

  1. --config <path> CLI flag
  2. XRAT_PATH environment variable
  3. ~/.config/xrat/

The directory layout:

~/.config/xrat/
├── config.toml      # Application configuration
├── db.sqlite        # SQLite database (default)
├── runtime/         # Runtime session files (generated configs, logs)
└── logs/            # Xray/V2Ray process logs

Next Steps