{"id":49760336,"url":"https://github.com/imrui/xray-pilot","last_synced_at":"2026-06-05T08:00:35.218Z","repository":{"id":346586609,"uuid":"1190551289","full_name":"imrui/xray-pilot","owner":"imrui","description":"Self-hosted Xray proxy management for small teams.  Push configs via SSH, auto-detect config drift,  and generate multi-format subscriptions. Built with Go + React.","archived":false,"fork":false,"pushed_at":"2026-06-04T15:54:16.000Z","size":1223,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-04T17:09:39.796Z","etag":null,"topics":["admin-dashboard","golang","proxy-panel","react","vless","vless-reality","vpn-panel","xray","xray-core","xray-panel"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/imrui.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-24T11:50:37.000Z","updated_at":"2026-06-04T15:54:20.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/imrui/xray-pilot","commit_stats":null,"previous_names":["imrui/xray-pilot"],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/imrui/xray-pilot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imrui%2Fxray-pilot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imrui%2Fxray-pilot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imrui%2Fxray-pilot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imrui%2Fxray-pilot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/imrui","download_url":"https://codeload.github.com/imrui/xray-pilot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imrui%2Fxray-pilot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33935514,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-05T02:00:06.157Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["admin-dashboard","golang","proxy-panel","react","vless","vless-reality","vpn-panel","xray","xray-core","xray-panel"],"created_at":"2026-05-11T05:12:51.584Z","updated_at":"2026-06-05T08:00:35.198Z","avatar_url":"https://github.com/imrui.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# xray-pilot\n\nSelf-hosted Xray proxy management for small teams. Push configs over SSH, detect config drift, and generate multi-format subscriptions from one embedded Go binary.\n\n[中文文档](./README.zh-CN.md)\n\n## Features\n\n- Node lifecycle management for Xray Reality deployments\n- Config drift detection with scheduled SHA256 comparisons\n- User and group management for subscription access control\n- Subscription generation with health-aware node selection\n- SSH-based sync with atomic uploads and remote service reloads\n- Single-binary deployment with the frontend embedded via `go:embed`\n- Runtime system settings managed from the web UI and persisted in the database\n\n## Screenshots\n\nPlace screenshots in [`docs/screenshots/`](./docs/screenshots/) with the following naming convention:\n\n- `01-login.png`\n- `02-dashboard.png`\n- `03-users.png`\n- `04-profiles.png`\n- `05-settings.png`\n- `06-subscribe.png`\n\nRecommended capture order:\n\n1. Login screen\n2. Dashboard overview\n3. User management\n4. Protocol configuration\n5. System settings\n6. Subscription portal\n\n\u003e The current admin UI is primarily Chinese. Keeping `README.md` in English is still recommended for project discovery, while the screenshots and the Chinese manual provide localized context.\n\n### Login\n\n![Login](./docs/screenshots/01-login.png)\n\nSecure access to the control panel with a lightweight sign-in screen, theme toggle, GitHub link, and clear operator-facing branding.\n\n### Dashboard\n\n![Dashboard](./docs/screenshots/02-dashboard.png)\n\nThe dashboard highlights node health, active users, subscription delivery, recent operations, and the current control-plane status in a single view.\n\n### User Management\n\n![Users](./docs/screenshots/03-users.png)\n\nManage subscription users, copy subscription links, open QR codes, assign groups, control expiration, and toggle access with consistent confirmation flows.\n\n### Protocol Configuration\n\n![Profiles](./docs/screenshots/04-profiles.png)\n\nDefine protocol templates, attach node-specific key material, and keep shared settings separate from node overrides for clearer operations.\n\n### System Settings\n\n![Settings](./docs/screenshots/05-settings.png)\n\nInspect runtime diagnostics, review deployment hints, and manage database-backed system settings without editing config files manually.\n\n### Subscription Portal\n\n![Subscribe](./docs/screenshots/06-subscribe.png)\n\nRender a browser-friendly subscription page with QR import, node-level copy actions, theme support, and smart fallback links while keeping client access on the same `/sub/{token}` endpoint.\n\n## Tech Stack\n\n| Layer | Technology |\n| --- | --- |\n| Backend | Go 1.26.1+, Gin, GORM, Zap |\n| Database | SQLite by default, PostgreSQL optional |\n| Auth | JWT bearer tokens, bcrypt |\n| Crypto | AES-GCM for secrets at rest, SHA256 for drift checks |\n| Frontend | React 19, Vite, TypeScript, Tailwind CSS v4 |\n\n## Installation\n\n### One-line install\n\nLinux `amd64` and `arm64` hosts can install the latest release with:\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/imrui/xray-pilot/main/install.sh | sudo bash\n```\n\nThe installer will:\n\n- detect `amd64` or `arm64`\n- download the latest GitHub Release\n- verify `checksums.txt`\n- install `xray-pilot` to `/usr/local/bin/xray-pilot`\n- create `/etc/xray-pilot/config.yaml`\n- create `/etc/xray-pilot/ssh/` for service-managed SSH keys\n- create and start the `xray-pilot.service` systemd unit\n- generate a random admin password, JWT secret, and crypto master key\n\n### Manual install\n\n| Platform | Archive |\n| --- | --- |\n| Linux amd64 | `xray-pilot_\u003cversion\u003e_linux_amd64.tar.gz` |\n| Linux arm64 | `xray-pilot_\u003cversion\u003e_linux_arm64.tar.gz` |\n| macOS amd64 | `xray-pilot_\u003cversion\u003e_darwin_amd64.tar.gz` |\n| macOS arm64 | `xray-pilot_\u003cversion\u003e_darwin_arm64.tar.gz` |\n\nManual installation steps:\n\n1. Download the matching archive and `checksums.txt` from the latest [GitHub Release](https://github.com/imrui/xray-pilot/releases).\n2. Verify the archive with `sha256sum -c checksums.txt --ignore-missing`.\n3. Extract the binary and place it in your preferred location.\n4. Copy [`config.yaml.example`](./config.yaml.example) to `config.yaml` and adjust the values.\n5. Start the service with `./xray-pilot`.\n\n### Node bootstrap\n\nFor fresh nodes, use [`scripts/node-bootstrap.sh`](./scripts/node-bootstrap.sh) to prepare SSH access, install Xray, and optionally enable BBR before adding the node to the panel.\n\nTypical flow:\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/imrui/xray-pilot/main/scripts/node-bootstrap.sh | sudo bash\n```\n\nThe script supports interactive public-key input, or you can provide `AUTHORIZED_KEYS` up front for non-interactive usage:\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/imrui/xray-pilot/main/scripts/node-bootstrap.sh | \\\nsudo AUTHORIZED_KEYS=$'ssh-ed25519 AAAA... admin@main\\nssh-ed25519 AAAA... root@main' bash\n```\n\nThe script creates a timestamped backup of `sshd_config` before changing `PermitRootLogin`.\n\n#### Auto-onboarding mode (v0.4.0+, recommended)\n\nIf you already run a panel, open the \"One-click install\" dialog in the node list; it generates a curl command that wires the panel SSH pubkey, installs Xray, and posts the node back to the panel — no need to paste pubkeys or manually add the node afterwards.\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/imrui/xray-pilot/main/scripts/node-bootstrap.sh | \\\n  sudo PANEL_URL=https://your-panel INSTALL_TOKEN=abc123... bash\n```\n\n`PANEL_URL` and `INSTALL_TOKEN` come from the dialog. Tokens default to 10-minute TTL, are single-use, and are bound to the first source IP that fetches the panel pubkey. The script falls back to the interactive flow when these variables are absent.\n\n## Upgrade\n\nExisting Linux installations can be upgraded by re-running the installer:\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/imrui/xray-pilot/main/install.sh | sudo bash\n```\n\nThe upgrade process will:\n\n- replace `/usr/local/bin/xray-pilot` with the latest release binary\n- keep the existing `/etc/xray-pilot/config.yaml`\n- keep the existing `/etc/xray-pilot/ssh/` key directory\n- keep the existing SQLite database or external database settings\n- reload and restart `xray-pilot.service`\n\nAfter the upgrade, you can confirm the running version with:\n\n```bash\njournalctl -u xray-pilot -n 20 --no-pager\n```\n\n## Quick Start From Source\n\n**Prerequisites:** Go 1.26.1+, Node.js 24+\n\n```bash\ngit clone https://github.com/imrui/xray-pilot.git\ncd xray-pilot\n\nmake build\n\ncp config.yaml.example config.yaml\n# edit jwt.secret and crypto.master_key before first production run\n\n./xray-pilot\n```\n\nOpen `http://localhost:2026` and sign in with the administrator account defined in `config.yaml`.\n\n## Configuration\n\nCopy [`config.yaml.example`](./config.yaml.example) to `config.yaml`.\n\n```yaml\nserver:\n  port: 2026\n  mode: release\n\ndatabase:\n  driver: sqlite\n  dsn: xray-pilot.db\n\njwt:\n  secret: \"change-me-use-a-long-random-string\"\n  expire: 24\n\ncrypto:\n  master_key: \"\"\n\nssh:\n  default_port: 22\n  default_user: \"root\"\n  default_key_path: \"\"\n  known_hosts_path: \"/var/lib/xray-pilot/known_hosts\"\n\nadmins:\n  - username: admin\n    password: \"change-me-now\"\n```\n\nFor Linux service deployments, the recommended SSH key location is `/etc/xray-pilot/ssh/id_ed25519`. The service-owned known_hosts file is stored at `/var/lib/xray-pilot/known_hosts`.\n\nRuntime settings such as scheduler intervals, SSH defaults, subscription formatting, and Xray log options are stored in the database-backed system settings table and managed from the web UI.\n\nEnvironment variable override:\n\n```bash\nXRAY_PILOT_MASTER_KEY=\u003chex-key\u003e ./xray-pilot\n```\n\nPriority order:\n\n1. `XRAY_PILOT_MASTER_KEY`\n2. `config.yaml -\u003e crypto.master_key`\n3. auto-generated key on first start\n\n## Development\n\n```bash\n# backend\nmake dev-backend\n\n# frontend\nmake dev-frontend\n```\n\nThe frontend dev server proxies API requests to `http://localhost:2026`.\n\n## Release Automation\n\nPushing a tag named `v*` triggers GitHub Actions to:\n\n1. build the frontend with Node 24\n2. compile release binaries with Go 1.26\n3. package `tar.gz` archives for Linux and macOS on `amd64` and `arm64`\n4. generate `checksums.txt`\n5. publish a GitHub Release with all artifacts attached\n\n## License\n\nMIT. See [LICENSE](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimrui%2Fxray-pilot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimrui%2Fxray-pilot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimrui%2Fxray-pilot/lists"}