[feature] using xray API for inbound

Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
This commit is contained in:
MHSanaei
2023-07-18 02:40:22 +03:30
parent 81a057d638
commit 1f78842b70
7 changed files with 386 additions and 60 deletions

View File

@@ -25,11 +25,13 @@ func (j *CheckInboundJob) Run() {
}
}
count, err = j.inboundService.DisableInvalidInbounds()
needRestart, count, err = j.inboundService.DisableInvalidInbounds()
if err != nil {
logger.Warning("Error in disabling invalid inbounds:", err)
} else if count > 0 {
logger.Debugf("%v inbounds disabled", count)
j.xrayService.SetToNeedRestart()
if needRestart {
j.xrayService.SetToNeedRestart()
}
}
}