- 增加到期时间限制
 - 新增配置面板 https 访问后,http 自动跳转 https(同端口)
 - 降低获取系统连接数的 cpu 使用率
 - 优化界面
 - VMess 协议 alterId 默认改为 0
 - 修复旧版本 iOS 系统白屏问题
 - 修复重启面板后 xray 没有启动的问题
This commit is contained in:
sprov
2021-07-26 13:29:29 +08:00
parent f1057b1142
commit 292d5b89d4
22 changed files with 474 additions and 147 deletions

View File

@@ -18,6 +18,7 @@ import (
"runtime"
"time"
"x-ui/logger"
"x-ui/util/sys"
"x-ui/xray"
)
@@ -142,18 +143,14 @@ func (s *ServerService) GetStatus(lastStatus *Status) *Status {
logger.Warning("can not find io counters")
}
tcpConnStats, err := net.Connections("tcp")
status.TcpCount, err = sys.GetTCPCount()
if err != nil {
logger.Warning("get connections failed:", err)
} else {
status.TcpCount = len(tcpConnStats)
logger.Warning("get tcp connections failed:", err)
}
udpConnStats, err := net.Connections("udp")
status.UdpCount, err = sys.GetUDPCount()
if err != nil {
logger.Warning("get connections failed:", err)
} else {
status.UdpCount = len(udpConnStats)
logger.Warning("get udp connections failed:", err)
}
if s.xrayService.IsXrayRunning() {
@@ -265,7 +262,7 @@ func (s *ServerService) UpdateXray(version string) error {
s.xrayService.StopXray()
defer func() {
err := s.xrayService.RestartXray()
err := s.xrayService.RestartXray(true)
if err != nil {
logger.Error("start xray failed:", err)
}