- 增加到期时间限制 - 新增配置面板 https 访问后,http 自动跳转 https(同端口) - 降低获取系统连接数的 cpu 使用率 - 优化界面 - VMess 协议 alterId 默认改为 0 - 修复旧版本 iOS 系统白屏问题 - 修复重启面板后 xray 没有启动的问题
26 lines
404 B
Go
26 lines
404 B
Go
package job
|
|
|
|
import "x-ui/web/service"
|
|
|
|
type CheckXrayRunningJob struct {
|
|
xrayService service.XrayService
|
|
|
|
checkTime int
|
|
}
|
|
|
|
func NewCheckXrayRunningJob() *CheckXrayRunningJob {
|
|
return new(CheckXrayRunningJob)
|
|
}
|
|
|
|
func (j *CheckXrayRunningJob) Run() {
|
|
if j.xrayService.IsXrayRunning() {
|
|
j.checkTime = 0
|
|
return
|
|
}
|
|
j.checkTime++
|
|
if j.checkTime < 2 {
|
|
return
|
|
}
|
|
j.xrayService.SetToNeedRestart()
|
|
}
|