Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b240b843c8 | ||
|
|
500b08b112 | ||
|
|
64c5ecce99 | ||
|
|
3e08b794be | ||
|
|
e473b7393e | ||
|
|
942ac7f562 |
23
README.md
23
README.md
@@ -6,14 +6,33 @@
|
|||||||
- 支持多用户多协议,网页可视化操作
|
- 支持多用户多协议,网页可视化操作
|
||||||
- 支持的协议:vmess、vless、trojan、shadowsocks、dokodemo-door、socks、http
|
- 支持的协议:vmess、vless、trojan、shadowsocks、dokodemo-door、socks、http
|
||||||
- 支持配置更多传输配置
|
- 支持配置更多传输配置
|
||||||
- 账号流量统计
|
- 流量统计,限制流量,限制到期时间
|
||||||
- 可自定义 xray 配置模板
|
- 可自定义 xray 配置模板
|
||||||
- 支持 https 访问面板(自备域名 + ssl 证书)
|
- 支持 https 访问面板(自备域名 + ssl 证书)
|
||||||
- 更多高级配置项,详见面板
|
- 更多高级配置项,详见面板
|
||||||
|
|
||||||
# 安装&升级
|
# 安装&升级
|
||||||
```
|
```
|
||||||
bash <(curl -Ls https://raw.githubusercontent.com/sprov065/x-ui/master/install.sh) 0.2.0
|
bash <(curl -Ls https://raw.githubusercontent.com/sprov065/x-ui/master/install.sh)
|
||||||
|
```
|
||||||
|
|
||||||
|
## 手动安装&升级
|
||||||
|
1. 首先从 https://github.com/sprov065/x-ui/releases 下载最新的压缩包,一般选择`amd64`架构
|
||||||
|
2. 然后将这个压缩包上传到服务器的`/root/`目录下,并使用`root`用户登录服务器
|
||||||
|
|
||||||
|
> 如果你的服务器 cpu 架构不是`amd64`,自行将命令中的`amd64`替换为其他架构
|
||||||
|
|
||||||
|
```
|
||||||
|
cd /root/
|
||||||
|
rm x-ui/ /usr/local/x-ui/ /usr/bin/x-ui -rf
|
||||||
|
tar zxvf x-ui-linux-amd64.tar.gz
|
||||||
|
chmod +x x-ui/x-ui x-ui/bin/xray-linux-* x-ui/x-ui.sh
|
||||||
|
cp x-ui/x-ui.sh /usr/bin/x-ui
|
||||||
|
cp -f x-ui/x-ui.service /etc/systemd/system/
|
||||||
|
mv x-ui/ /usr/local/
|
||||||
|
systemctl daemon-reload
|
||||||
|
systemctl enable x-ui
|
||||||
|
systemctl restart x-ui
|
||||||
```
|
```
|
||||||
|
|
||||||
## 建议系统
|
## 建议系统
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
0.3.0
|
0.3.1
|
||||||
12
install.sh
12
install.sh
@@ -82,9 +82,6 @@ install_base() {
|
|||||||
install_x-ui() {
|
install_x-ui() {
|
||||||
systemctl stop x-ui
|
systemctl stop x-ui
|
||||||
cd /usr/local/
|
cd /usr/local/
|
||||||
if [[ -e /usr/local/x-ui/ ]]; then
|
|
||||||
rm /usr/local/x-ui/ -rf
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ $# == 0 ] ;then
|
if [ $# == 0 ] ;then
|
||||||
last_version=$(curl -Ls "https://api.github.com/repos/sprov065/x-ui/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
|
last_version=$(curl -Ls "https://api.github.com/repos/sprov065/x-ui/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
|
||||||
@@ -109,11 +106,16 @@ install_x-ui() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ -e /usr/local/x-ui/ ]]; then
|
||||||
|
rm /usr/local/x-ui/ -rf
|
||||||
|
fi
|
||||||
|
|
||||||
tar zxvf x-ui-linux-${arch}.tar.gz
|
tar zxvf x-ui-linux-${arch}.tar.gz
|
||||||
rm x-ui-linux-${arch}.tar.gz -f
|
rm x-ui-linux-${arch}.tar.gz -f
|
||||||
cd x-ui
|
cd x-ui
|
||||||
chmod +x x-ui bin/xray-linux-${arch}
|
chmod +x x-ui bin/xray-linux-${arch} x-ui.sh
|
||||||
cp -f x-ui.service /etc/systemd/system/
|
cp -f x-ui.service /etc/systemd/system/
|
||||||
|
cp -f x-ui.sh /usr/bin/x-ui
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
systemctl enable x-ui
|
systemctl enable x-ui
|
||||||
systemctl start x-ui
|
systemctl start x-ui
|
||||||
@@ -125,8 +127,6 @@ install_x-ui() {
|
|||||||
echo -e ""
|
echo -e ""
|
||||||
echo -e "如果是更新面板,则按你之前的方式访问面板"
|
echo -e "如果是更新面板,则按你之前的方式访问面板"
|
||||||
echo -e ""
|
echo -e ""
|
||||||
curl -o /usr/bin/x-ui -Ls https://raw.githubusercontent.com/sprov065/x-ui/master/x-ui.sh
|
|
||||||
chmod +x /usr/bin/x-ui
|
|
||||||
echo -e "x-ui 管理脚本使用方法: "
|
echo -e "x-ui 管理脚本使用方法: "
|
||||||
echo -e "----------------------------------------------"
|
echo -e "----------------------------------------------"
|
||||||
echo -e "x-ui - 显示管理菜单 (功能更多)"
|
echo -e "x-ui - 显示管理菜单 (功能更多)"
|
||||||
|
|||||||
@@ -167,7 +167,7 @@ func (s *InboundService) AddTraffic(traffics []*xray.Traffic) (err error) {
|
|||||||
|
|
||||||
func (s *InboundService) DisableInvalidInbounds() (int64, error) {
|
func (s *InboundService) DisableInvalidInbounds() (int64, error) {
|
||||||
db := database.GetDB()
|
db := database.GetDB()
|
||||||
now := time.Now()
|
now := time.Now().Unix() * 1000
|
||||||
result := db.Model(model.Inbound{}).
|
result := db.Model(model.Inbound{}).
|
||||||
Where("((total > 0 and up + down >= total) or (expiry_time > 0 and expiry_time <= ?)) and enable = ?", now, true).
|
Where("((total > 0 and up + down >= total) or (expiry_time > 0 and expiry_time <= ?)) and enable = ?", now, true).
|
||||||
Update("enable", false)
|
Update("enable", false)
|
||||||
|
|||||||
Reference in New Issue
Block a user