https://github.com/masterhide/x-sl
Xray panel supporting multi-protocol multi-user expire day & traffic & IP limit (Vmess & Vless & Trojan & ShadowSocks & Wireguard)
https://github.com/masterhide/x-sl
http iptables-rules shadowsocks socks5 trojan vless vmess wiregurad xtls
Last synced: 3 months ago
JSON representation
Xray panel supporting multi-protocol multi-user expire day & traffic & IP limit (Vmess & Vless & Trojan & ShadowSocks & Wireguard)
- Host: GitHub
- URL: https://github.com/masterhide/x-sl
- Owner: MasterHide
- License: gpl-3.0
- Created: 2025-02-09T18:20:36.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-03-16T11:29:31.000Z (3 months ago)
- Last Synced: 2025-03-16T12:27:52.573Z (3 months ago)
- Topics: http, iptables-rules, shadowsocks, socks5, trojan, vless, vmess, wiregurad, xtls
- Language: JavaScript
- Homepage: https://t.me/Xray_SL
- Size: 7.59 MB
- Stars: 1
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
[English](/README.md)
![]()
**An Advanced Web Panel • Built on Xray Core**
[](https://github.com/MHSanaei/3x-ui/releases)
[](#)
[](#)
[](#)
[](https://www.gnu.org/licenses/gpl-3.0.en.html)> **Disclaimer:** This project is only for personal learning and communication, please do not use it for illegal purposes, please do not use it in a production environment
**If this project is helpful to you, you may wish to give it a**:star2:
- USDT (TRC20): `TTJZdUms8KQ9WMJg8i7AGxxkFBMzmsEaRN`
- PAYID (Binance): `426577151`## Install & Upgrade
```
bash <(curl -Ls https://raw.githubusercontent.com/MasterHide/X-SL/main/install.sh)```
## SSL Certificate (Enable SSL before running the web panel.)
Click for SSL Certificate details
### ACME
To manage SSL certificates using ACME:
1. Ensure your domain is correctly resolved to the server.
2. Run the `x-ui` command in the terminal, then choose `Manage SSL Certificates`.
3. You will be presented with the following options:- **Get SSL:** Obtain SSL certificates.
- **Revoke:** Revoke existing SSL certificates.
- **Force Renew:** Force renewal of SSL certificates.
- **Show Existing Domains:** Display all domain certificates available on the server.
- **Set Certificate Paths for the Panel:** Specify the certificate for your domain to be used by the panel.
## Features 🚀
| Category | Details |
|-------------------------|-------------------------------------------------------------------------|
| **Monitoring & Security** | |
| 📊 System Status | Real-time monitoring of system performance and resource usage |
| 🚫 Torrent Blocking | Block public torrent traffic via iptables (reduce the risk) |
| 📉 Usage Analytics | Traffic statistics, traffic limits, and client expiration management |
| | |
| **Protocol Support** | |
| 🌐 Multi-Protocol | Supports VMESS, VLESS, Trojan, Shadowsocks, Dokodemo-door, Socks, HTTP |
| 🔒 Advanced Protocols | XTLS native support (RPRX-Direct, Vision, REALITY) and WireGuard |
| | |
| **Automation** | |
| ⚙️ Server Management | Automated server boot system and API route fixes |
| 🔒 SSL Management | One-click SSL certificate issuance + automatic renewal |
| 🔄 Data Control | Export/import database functionality |
| | |
| **Customization** | |
| 🎨 Theme Support | Dark/Light mode toggle |
| 🛠️ Configuration | Customizable Xray templates and panel-driven config adjustments |
| 🔍 Search | Full search capability across inbounds and clients |
| | |
| **User Management** | |
| 👥 Multi-User System | Robust multi-user support with traffic monitoring (Traffic-X) |
| 🔧 Admin Tools | Create user settings via API and advanced panel configurations |## Nginx Settings
Click for Reverse Proxy Configuration
#### Nginx Reverse Proxy
```nginx
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Range $http_range;
proxy_set_header If-Range $http_if_range;
proxy_redirect off;
proxy_pass http://127.0.0.1:2053;
}
```#### Nginx sub-path
- Ensure that the "URI Path" in the `/sub` panel settings is the same.
- The `url` in the panel settings needs to end with `/`.```nginx
location /sub {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Range $http_range;
proxy_set_header If-Range $http_if_range;
proxy_redirect off;
proxy_pass http://127.0.0.1:2053;
}
```## Recommended OS
- Ubuntu 20.04+
- Debian 11+
- CentOS 8+
- OpenEuler 22.03+
- Fedora 36+
- Arch Linux
- Parch Linux
- Manjaro
- Armbian
- AlmaLinux 8.0+
- Rocky Linux 8+
- Oracle Linux 8+
- OpenSUSE Tubleweed
- Amazon Linux 2023## Default Panel Settings
Click for default settings details
### Username, Password, Port, and Web Base Path
If you choose not to modify these settings, they will be generated randomly .
**Default Settings for Docker:**
- **Username:** admin
- **Password:** admin
- **Port:** 2053### Database Management:
You can conveniently perform database Backups and Restores directly from the panel.
- **Database Path:**
- `/etc/x-ui/x-ui.db`### Web Base Path
1. **Reset Web Base Path:**
- Open your terminal.
- Run the `x-ui` command.
- Select the option to `Reset Web Base Path`.2. **Generate or Customize Path:**
- The path will be randomly generated, or you can enter a custom path.3. **View Current Settings:**
- To view your current settings, use the `x-ui settings` command in the terminal or `View Current Panel Info` in `x-ui`### Security Recommendation:
- For enhanced security, use a long, random word in your URL structure.**Examples:**
- `http://ip:port/*webbasepath*/panel`
- `https://domain:port/*webbasepath*/panel`## WARP Configuration
Click for WARP configuration details
#### Usage
**For versions `v2.1.0` and later:**
WARP is built-in, and no additional installation is required. Simply turn on the necessary configuration in the panel.
## API Routes
Click for API routes details
#### Usage
- `/login` with `POST` user data: `{username: '', password: ''}` for login
- `/panel/api/inbounds` base for following actions:| Method | Path | Action |
| :----: | ---------------------------------- | ------------------------------------------- |
| `GET` | `"/list"` | Get all inbounds |
| `GET` | `"/get/:id"` | Get inbound with inbound.id |
| `GET` | `"/getClientTraffics/:email"` | Get Client Traffics with email |
| `GET` | `"/getClientTrafficsById/:id"` | Get client's traffic By ID |
| `GET` | `"/createbackup"` | Telegram bot sends backup to admins |
| `POST` | `"/add"` | Add inbound |
| `POST` | `"/del/:id"` | Delete Inbound |
| `POST` | `"/update/:id"` | Update Inbound |
| `POST` | `"/clientIps/:email"` | Client Ip address |
| `POST` | `"/clearClientIps/:email"` | Clear Client Ip address |
| `POST` | `"/addClient"` | Add Client to inbound |
| `POST` | `"/:id/delClient/:clientId"` | Delete Client by clientId\* |
| `POST` | `"/updateClient/:clientId"` | Update Client by clientId\* |
| `POST` | `"/:id/resetClientTraffic/:email"` | Reset Client's Traffic |
| `POST` | `"/resetAllTraffics"` | Reset traffics of all inbounds |
| `POST` | `"/resetAllClientTraffics/:id"` | Reset traffics of all clients in an inbound |
| `POST` | `"/delDepletedClients/:id"` | Delete inbound depleted clients (-1: all) |
| `POST` | `"/onlines"` | Get Online users ( list of emails ) |\*- The field `clientId` should be filled by:
- `client.id` for VMESS and VLESS
- `client.password` for TROJAN
- `client.email` for Shadowsocks- [
](https://app.getpostman.com/run-collection/5146551-dda3cab3-0e33-485f-96f9-d4262f437ac5?action=collection%2Ffork&source=rip_markdown&collection-url=entityId%3D5146551-dda3cab3-0e33-485f-96f9-d4262f437ac5%26entityType%3Dcollection%26workspaceId%3Dd64f609f-485a-4951-9b8f-876b3f917124)
## Environment Variables
Click for environment variables details
#### Usage
| Variable | Type | Default |
| -------------- | :--------------------------------------------: | :------------ |
| XUI_LOG_LEVEL | `"debug"` \| `"info"` \| `"warn"` \| `"error"` | `"info"` |
| XUI_DEBUG | `boolean` | `false` |
| XUI_BIN_FOLDER | `string` | `"bin"` |
| XUI_DB_FOLDER | `string` | `"/etc/x-ui"` |
| XUI_LOG_FOLDER | `string` | `"/var/log"` |Example:
```sh
XUI_BIN_FOLDER="bin" XUI_DB_FOLDER="/etc/x-ui" go build main.go
```## Preview



## A Special Thanks to
- [Project X](https://github.com/XTLS)
- [Inspired by 3x-ui](https://github.com/MHSanaei)## Acknowledgment
- [Iran v2ray rules](https://github.com/chocolate4u/Iran-v2ray-rules) (License: **GPL-3.0**): _Enhanced v2ray/xray and v2ray/xray-clients routing rules with built-in Iranian domains and a focus on security and adblocking._
- [Russia v2ray rules](https://github.com/runetfreedom/russia-v2ray-rules-dat) (License: **GPL-3.0**): _This repository contains automatically updated V2Ray routing rules based on data on blocked domains and addresses in Russia._
## Stargazers over time
[](https://starchart.cc/MasterHide/X-SL)