Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Multi-Language #180

Open
wants to merge 83 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
1ff2af1
add: vue-i18n file
foroughi1380 Oct 27, 2022
a2db446
creade client ip db model
hossinasaadi Oct 29, 2022
d864d20
add email and ip limit to vmess ui
hossinasaadi Oct 29, 2022
20e7b9e
add client ip limit job
hossinasaadi Oct 29, 2022
07c53bc
update: remove vue i18n
foroughi1380 Oct 29, 2022
eae4ca6
update: add .chache folder to gitignore
foroughi1380 Oct 29, 2022
057491d
update: user i18n to show title
foroughi1380 Oct 29, 2022
0685387
update: add pages title
foroughi1380 Oct 29, 2022
1bb9cd5
update: translate page header title with i18n
foroughi1380 Oct 29, 2022
35652d2
updatE: ignore
foroughi1380 Oct 29, 2022
01970cf
update: read localizer from cookies
foroughi1380 Oct 29, 2022
90cb773
update: create supoorted lanquage array
foroughi1380 Oct 29, 2022
74b5dcd
update: relocate the langs.js
foroughi1380 Oct 29, 2022
214a2e3
update: load langs file
foroughi1380 Oct 29, 2022
d4a32a2
update: add required function for set and get current lang
foroughi1380 Oct 29, 2022
bf34f23
update: add a select box to select lang
foroughi1380 Oct 29, 2022
da1f161
update: add language button to setting
foroughi1380 Oct 29, 2022
1f87c1f
update: translate common sider
foroughi1380 Oct 29, 2022
2d2d13a
pass i18n to next level
foroughi1380 Oct 30, 2022
1811783
update: add a function to translate
foroughi1380 Oct 30, 2022
d2544e7
update: pass name to i18n function
foroughi1380 Oct 30, 2022
25e818e
update: translate login page toasts
foroughi1380 Oct 30, 2022
d28da19
update: translate panel config in setting page
foroughi1380 Oct 30, 2022
3289658
update: translate tabs
foroughi1380 Oct 30, 2022
7c72aac
translate user
foroughi1380 Oct 30, 2022
f3d394a
update: translate xray configuration in setting page
foroughi1380 Oct 30, 2022
41023ef
update: translate tg panel
foroughi1380 Oct 30, 2022
ab0a7f9
update: translate other setting
foroughi1380 Oct 30, 2022
9289ce6
update: translate dashboard
foroughi1380 Oct 30, 2022
fa62f8e
update: translate dashboard
foroughi1380 Oct 30, 2022
5e4c8b4
update: translate inbound table titles
foroughi1380 Oct 30, 2022
33aa572
update: translate table
foroughi1380 Oct 30, 2022
cdd96ee
update: translate operate menu
foroughi1380 Oct 30, 2022
7c2471d
update: translate dialogs
foroughi1380 Oct 30, 2022
b7233a9
update: translate buttons and title of details dialog
foroughi1380 Oct 30, 2022
2722d29
restart xray service after disable inbound
hossinasaadi Oct 30, 2022
e0abaf5
add ip log, clear ip log button in edit modal
hossinasaadi Oct 30, 2022
6863c2b
update: translate restart panel dialog
foroughi1380 Oct 30, 2022
606b741
update: translate dialog
foroughi1380 Oct 30, 2022
beacad3
remove merging new ips and old ones in ip log
hossinasaadi Oct 30, 2022
41e7201
update: translate inbound_info
foroughi1380 Oct 30, 2022
6f97a5c
update: translate inbound modal
foroughi1380 Oct 30, 2022
17b9057
update: translate dokodemo porotocol
foroughi1380 Oct 30, 2022
58327d5
replace text and add condtion to field
hossinasaadi Oct 30, 2022
441ae56
update: fix target address
foroughi1380 Oct 30, 2022
60b649b
bugs fix
hossinasaadi Oct 30, 2022
061e005
update: translate protocol
foroughi1380 Oct 31, 2022
114af22
update: translate inbound modal
foroughi1380 Oct 31, 2022
2b5fd5c
update: util controller translate
foroughi1380 Oct 31, 2022
d6f8c9d
update :translate base cotroller
foroughi1380 Oct 31, 2022
2cea3d0
update: translate inbound component
foroughi1380 Oct 31, 2022
66d21fa
update: translate setting and server controller
foroughi1380 Oct 31, 2022
9235ef5
update: remove always return true in debug mode
foroughi1380 Oct 31, 2022
f8bddd4
add vless limit ip
proshir Nov 1, 2022
375835e
clear ip log for clients after 1 min with bulk add
proshir Nov 2, 2022
91e416b
set default limitIp value
hossinasaadi Nov 2, 2022
74f7af6
fix funny bug in line 49 check_clinet_ip_job
proshir Nov 2, 2022
b5a6882
Merge pull request #1 from proshir/main
hossinasaadi Nov 2, 2022
3d0f25b
add connection limit inbound
hossinasaadi Nov 4, 2022
87b301c
fix run schedule run time
hossinasaadi Nov 4, 2022
d564956
ip sort and fix bug
hossinasaadi Nov 4, 2022
131a9ae
change job run time
hossinasaadi Nov 4, 2022
b95a8ec
Merge pull request #6 from hossinasaadi/limit-connection
hossinasaadi Nov 4, 2022
44ca9cc
fix IP Restrict bug
hossinasaadi Nov 5, 2022
10613bd
Merge pull request #11 from hossinasaadi/limit-connection
hossinasaadi Nov 5, 2022
91c891c
Update README.md
hossinasaadi Nov 5, 2022
8282a3b
Update install.sh
hossinasaadi Nov 5, 2022
7327f26
Update x-ui.sh
hossinasaadi Nov 5, 2022
675c211
fix getting server IP
hossinasaadi Nov 5, 2022
5e2c12b
Merge pull request #12 from hossinasaadi/limit-connection
hossinasaadi Nov 5, 2022
253f5dc
sort Log Ips
hossinasaadi Nov 5, 2022
b9f1dcc
Merge pull request #13 from hossinasaadi/limit-connection
hossinasaadi Nov 5, 2022
3f03070
lower schedule time
hossinasaadi Nov 5, 2022
3bac66c
Merge pull request #16 from hossinasaadi/limit-connection
hossinasaadi Nov 5, 2022
ec56af4
revert schedule time
hossinasaadi Nov 5, 2022
be55e44
Merge pull request #18 from hossinasaadi/limit-connection
hossinasaadi Nov 5, 2022
3c5ddad
fix clean all Ip database
hossinasaadi Nov 6, 2022
e2150c3
add func
hossinasaadi Nov 6, 2022
cb4f02c
Merge pull request #22 from hossinasaadi/limit-connection
hossinasaadi Nov 6, 2022
62d8c47
add Environment & update sh files
hossinasaadi Nov 7, 2022
979eccf
Update release.yml
hossinasaadi Nov 7, 2022
5705948
Merge pull request #25 from hossinasaadi/limit-connection
hossinasaadi Nov 7, 2022
a73f20e
Merge branch 'main' into main
hossinasaadi Nov 8, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
mv xui-release x-ui
mkdir bin
cd bin
wget https://github.com/XTLS/Xray-core/releases/latest/download/Xray-linux-64.zip
wget https://github.com/hossinasaadi/Xray-core/releases/latest/download/Xray-linux-64.zip
unzip Xray-linux-64.zip
rm -f Xray-linux-64.zip geoip.dat geosite.dat
wget https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat
Expand Down Expand Up @@ -84,7 +84,7 @@ jobs:
mv xui-release x-ui
mkdir bin
cd bin
wget https://github.com/XTLS/Xray-core/releases/latest/download/Xray-linux-arm64-v8a.zip
wget https://github.com/hossinasaadi/Xray-core/releases/latest/download/Xray-linux-arm64-v8a.zip
unzip Xray-linux-arm64-v8a.zip
rm -f Xray-linux-arm64-v8a.zip geoip.dat geosite.dat
wget https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat
Expand Down Expand Up @@ -126,7 +126,7 @@ jobs:
mv xui-release x-ui
mkdir bin
cd bin
wget https://github.com/XTLS/Xray-core/releases/latest/download/Xray-linux-s390x.zip
wget https://github.com/hossinasaadi/Xray-core/releases/latest/download/Xray-linux-s390x.zip
unzip Xray-linux-s390x.zip
rm -f Xray-linux-s390x.zip geoip.dat geosite.dat
wget https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat
Expand All @@ -144,4 +144,4 @@ jobs:
upload_url: ${{ needs.release.outputs.upload_url }}
asset_path: x-ui-linux-s390x.tar.gz
asset_name: x-ui-linux-s390x.tar.gz
asset_content_type: application/gzip
asset_content_type: application/gzip
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@ x-ui-*.tar.gz
/release.sh
.sync*
main
release/
access.log
.cache
141 changes: 77 additions & 64 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,45 @@
# x-ui

支持多协议多用户的 xray 面板
xray panel supporting multi-protocol multi-user

# Features

- System Status Monitoring
- Support multi-user multi-protocol, web page visualization operation
- Supported protocols: vmess, vless, trojan, shadowsocks, dokodemo-door, socks, http
- Support for configuring more transport configurations
- Traffic statistics, limit traffic, limit expiration time
- Customizable xray configuration templates
- Support https access panel (self-provided domain name + ssl certificate)
- Support one-click SSL certificate application and automatic renewal
- For more advanced configuration items, please refer to the panel

# Enable IP Restrictions Per Inbound
1 - open panel settings and tab xray related settings put this to first of json :
```
{
"log": {
"loglevel": "warning",
"access": "./access.log"
},

# 功能介绍
```
- change access log path as you want

- 系统状态监控
- 支持多用户多协议,网页可视化操作
- 支持的协议:vmess、vless、trojan、shadowsocks、dokodemo-door、socks、http
- 支持配置更多传输配置
- 流量统计,限制流量,限制到期时间
- 可自定义 xray 配置模板
- 支持 https 访问面板(自备域名 + ssl 证书)
- 支持一键SSL证书申请且自动续签
- 更多高级配置项,详见面板
2 - add **IP limit and Email** for inbound(vmess & vless)

# 安装&升级
# Install & Upgrade

```
bash <(curl -Ls https://raw.githubusercontent.com/vaxilu/x-ui/master/install.sh)
bash <(curl -Ls https://raw.githubusercontent.com/hossinasaadi/x-ui/master/install.sh)
```

## 手动安装&升级
## Manual install & upgrade

1. 首先从 https://github.com/vaxilu/x-ui/releases 下载最新的压缩包,一般选择 `amd64`架构
2. 然后将这个压缩包上传到服务器的 `/root/`目录下,并使用 `root`用户登录服务器
1. First download the latest compressed package from https://github.com/hossinasaadi/x-ui/releases , generally choose Architecture `amd64`
2. Then upload the compressed package to the server's `/root/` directory and `root` rootlog in to the server with user

> 如果你的服务器 cpu 架构不是 `amd64`,自行将命令中的 `amd64`替换为其他架构
> If your server cpu architecture is not `amd64` replace another architecture

```
cd /root/
Expand All @@ -40,17 +54,17 @@ systemctl enable x-ui
systemctl restart x-ui
```

## 使用docker安装
## Install using docker

> docker 教程与 docker 镜像由[Chasing66](https://github.com/Chasing66)提供
> This docker tutorial and docker image are provided by [Chasing66](https://github.com/Chasing66)

1. 安装docker
1. install docker

```shell
curl -fsSL https://get.docker.com | sh
```

2. 安装x-ui
2. install x-ui

```shell
mkdir x-ui && cd x-ui
Expand All @@ -61,83 +75,82 @@ docker run -itd --network=host \
enwaiax/x-ui:latest
```

> Build 自己的镜像
> Build your own image

```shell
docker build -t x-ui .
```

## SSL证书申请
## SSL certificate application

> 此功能与教程由[FranzKafkaYu](https://github.com/FranzKafkaYu)提供
> This feature and tutorial are provided by [FranzKafkaYu](https://github.com/FranzKafkaYu)

脚本内置SSL证书申请功能,使用该脚本申请证书,需满足以下条件:
The script has a built-in SSL certificate application function. To use this script to apply for a certificate, the following conditions must be met:

- 知晓Cloudflare 注册邮箱
- 知晓Cloudflare Global API Key
- 域名已通过cloudflare进行解析到当前服务器
- Know the Cloudflare registered email
- Know the Cloudflare Global API Key
- The domain name has been resolved to the current server through cloudflare

获取Cloudflare Global API Key的方法:
How to get the Cloudflare Global API Key:
![](media/bda84fbc2ede834deaba1c173a932223.png)
![](media/d13ffd6a73f938d1037d0708e31433bf.png)

使用时只需输入 `域名`, `邮箱`, `API KEY`即可,示意图如下
When using, just enter `email`, `domain`, `API KEY` and the schematic diagram is as follows
![](media/2022-04-04_141259.png)

注意事项:
Precautions:

- The script uses DNS API for certificate request
- By default, Let'sEncrypt is used as the CA party
- The certificate installation directory is the /root/cert directory
- The certificates applied for by this script are all generic domain name certificates

## Tg robot use (under development, temporarily unavailable)

> This feature and tutorial are provided by [FranzKafkaYu](https://github.com/FranzKafkaYu)

- 该脚本使用DNS API进行证书申请
- 默认使用Let'sEncrypt作为CA方
- 证书安装目录为/root/cert目录
- 本脚本申请证书均为泛域名证书
X-UI supports daily traffic notification, panel login reminder and other functions through the Tg robot. To use the Tg robot, you need to apply for the specific application tutorial. You can refer to the [blog](https://coderfan.net/how-to-use-telegram-bot-to-alarm-you-when-someone-login-into-your-vps.html)
Set the robot-related parameters in the panel background, including:

## Tg机器人使用(开发中,暂不可使用)
- Tg Robot Token
- Tg Robot ChatId
- Tg robot cycle runtime, in crontab syntax

> 此功能与教程由[FranzKafkaYu](https://github.com/FranzKafkaYu)提供

X-UI支持通过Tg机器人实现每日流量通知,面板登录提醒等功能,使用Tg机器人,需要自行申请
具体申请教程可以参考[博客链接](https://coderfan.net/how-to-use-telegram-bot-to-alarm-you-when-someone-login-into-your-vps.html)
使用说明:在面板后台设置机器人相关参数,具体包括
Reference syntax:

- Tg机器人Token
- Tg机器人ChatId
- Tg机器人周期运行时间,采用crontab语法
- 30 * * * * * //Notify at the 30s of each point
- @hourly // hourly notification
- @daily // Daily notification (00:00 in the morning)
- @every 8h // notify every 8 hours
- TG notification content:

参考语法:
- 30 * * * * * //每一分的第30s进行通知
- @hourly //每小时通知
- @daily //每天通知(凌晨零点整)
- @every 8h //每8小时通知
- Node traffic usage
- Panel login reminder
- Node expiration reminder
- Traffic warning reminder

TG通知内容:
- 节点流量使用
- 面板登录提醒
- 节点到期提醒
- 流量预警提醒
More features are planned...

更多功能规划中...
## 建议系统

## suggestion system

- CentOS 7+
- Ubuntu 16+
- Debian 8+

# 常见问题
# common problem

## v2-ui 迁移
## Migrating from v2-ui

首先在安装了 v2-ui 的服务器上安装最新版 x-ui,然后使用以下命令进行迁移,将迁移本机 v2-ui 的 `所有 inbound 账号数据`至 x-ui,`面板设置和用户名密码不会迁移`
First install the latest version of x-ui on the server where v2-ui is installed, and then use the following command to migrate, which will migrate the native v2-ui `All inbound account data` to x-ui,`Panel settings and username passwords are not migrated`

> 迁移成功后请 `关闭 v2-ui`并且 `重启 x-ui`,否则 v2-ui 的 inbound 会与 x-ui 的 inbound 会产生 `端口冲突`
> Please `Close v2-ui` and `restart x-ui`, otherwise the inbound of v2-ui will cause a `port conflict with the inbound of x-ui`

```
x-ui v2-ui
```

## issue 关闭

各种小白问题看得血压很高

## Stargazers over time

[![Stargazers over time](https://starchart.cc/vaxilu/x-ui.svg)](https://starchart.cc/vaxilu/x-ui)
[![Stargazers over time](https://starchart.cc/hossinasaadi/x-ui.svg)](https://starchart.cc/hossinasaadi/x-ui)
7 changes: 7 additions & 0 deletions database/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ func initInbound() error {
func initSetting() error {
return db.AutoMigrate(&model.Setting{})
}
func initInboundClientIps() error {
return db.AutoMigrate(&model.InboundClientIps{})
}

func InitDB(dbPath string) error {
dir := path.Dir(dbPath)
Expand Down Expand Up @@ -76,6 +79,10 @@ func InitDB(dbPath string) error {
if err != nil {
return err
}
err = initInboundClientIps()
if err != nil {
return err
}

return nil
}
Expand Down
5 changes: 5 additions & 0 deletions database/model/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ type Inbound struct {
Tag string `json:"tag" form:"tag" gorm:"unique"`
Sniffing string `json:"sniffing" form:"sniffing"`
}
type InboundClientIps struct {
Id int `json:"id" gorm:"primaryKey;autoIncrement"`
ClientEmail string `json:"clientEmail" form:"clientEmail" gorm:"unique"`
Ips string `json:"ips" form:"ips"`
}

func (i *Inbound) GenXrayInboundConfig() *xray.InboundConfig {
listen := i.Listen
Expand Down
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ require (
github.com/Workiva/go-datastructures v1.0.53
github.com/gin-contrib/sessions v0.0.3
github.com/gin-gonic/gin v1.7.1
github.com/go-cmd/cmd v1.4.1 // indirect
github.com/go-ole/go-ole v1.2.5 // indirect
github.com/go-telegram-bot-api/telegram-bot-api/v5 v5.5.1
github.com/nicksnyder/go-i18n/v2 v2.1.2
Expand Down
3 changes: 3 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ github.com/gin-gonic/gin v1.7.1 h1:qC89GU3p8TvKWMAVhEpmpB2CIb1hnqt2UdKZaP93mS8=
github.com/gin-gonic/gin v1.7.1/go.mod h1:jD2toBW3GZUr5UMcdrwQA10I7RuaFOl/SGeDjXkfUtY=
github.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0=
github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q=
github.com/go-cmd/cmd v1.4.1 h1:JUcEIE84v8DSy02XTZpUDeGKExk2oW3DA10hTjbQwmc=
github.com/go-cmd/cmd v1.4.1/go.mod h1:tbBenttXtZU4c5djS1o7PWL5pd2xAr5sIqH1kGdNiRc=
github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q=
github.com/go-ole/go-ole v1.2.5 h1:t4MGB5xEDZvXI+0rMjjsfBsD7yAgp/s9ZDkL1JndXwY=
github.com/go-ole/go-ole v1.2.5/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
Expand All @@ -72,6 +74,7 @@ github.com/go-playground/validator/v10 v10.4.1 h1:pH2c5ADXtd66mxoE0Zm9SUhxE20r7a
github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4=
github.com/go-telegram-bot-api/telegram-bot-api/v5 v5.5.1 h1:wG8n/XJQ07TmjbITcGiUaOtXxdrINDz1b0J1w0SzqDc=
github.com/go-telegram-bot-api/telegram-bot-api/v5 v5.5.1/go.mod h1:A2S0CWkNylc2phvKXWBBdD3K0iGnDBGbzRpISP2zBl8=
github.com/go-test/deep v1.0.7/go.mod h1:QV8Hv/iy04NyLBxAdO9njL0iVPN1S4d/A3NVv1V36o8=
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
github.com/golang/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:tluoj9z5200jBnyusfRPU2LqT6J+DAorxEvtC7LHB+E=
Expand Down
8 changes: 4 additions & 4 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -107,20 +107,20 @@ install_x-ui() {
cd /usr/local/

if [ $# == 0 ]; then
last_version=$(curl -Ls "https://api.github.com/repos/vaxilu/x-ui/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
last_version=$(curl -Ls "https://api.github.com/repos/hossinasaadi/x-ui/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
if [[ ! -n "$last_version" ]]; then
echo -e "${red}检测 x-ui 版本失败,可能是超出 Github API 限制,请稍后再试,或手动指定 x-ui 版本安装${plain}"
exit 1
fi
echo -e "检测到 x-ui 最新版本:${last_version},开始安装"
wget -N --no-check-certificate -O /usr/local/x-ui-linux-${arch}.tar.gz https://github.com/vaxilu/x-ui/releases/download/${last_version}/x-ui-linux-${arch}.tar.gz
wget -N --no-check-certificate -O /usr/local/x-ui-linux-${arch}.tar.gz https://github.com/hossinasaadi/x-ui/releases/download/${last_version}/x-ui-linux-${arch}.tar.gz
if [[ $? -ne 0 ]]; then
echo -e "${red}下载 x-ui 失败,请确保你的服务器能够下载 Github 的文件${plain}"
exit 1
fi
else
last_version=$1
url="https://github.com/vaxilu/x-ui/releases/download/${last_version}/x-ui-linux-${arch}.tar.gz"
url="https://github.com/hossinasaadi/x-ui/releases/download/${last_version}/x-ui-linux-${arch}.tar.gz"
echo -e "开始安装 x-ui v$1"
wget -N --no-check-certificate -O /usr/local/x-ui-linux-${arch}.tar.gz ${url}
if [[ $? -ne 0 ]]; then
Expand All @@ -138,7 +138,7 @@ install_x-ui() {
cd x-ui
chmod +x x-ui bin/xray-linux-${arch}
cp -f x-ui.service /etc/systemd/system/
wget --no-check-certificate -O /usr/bin/x-ui https://raw.githubusercontent.com/vaxilu/x-ui/main/x-ui.sh
wget --no-check-certificate -O /usr/bin/x-ui https://raw.githubusercontent.com/hossinasaadi/x-ui/main/x-ui.sh
chmod +x /usr/local/x-ui/x-ui.sh
chmod +x /usr/bin/x-ui
config_after_install
Expand Down
Loading