mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-08-30 06:46:17 +00:00
modified: web/job/check_client_ip_job.go
This commit is contained in:
parent
74bbc4e2c7
commit
928d88f131
1 changed files with 7 additions and 9 deletions
|
@ -32,6 +32,13 @@ func (j *CheckClientIpJob) Run() {
|
||||||
logger.Debug("Check Client IP Job...")
|
logger.Debug("Check Client IP Job...")
|
||||||
|
|
||||||
if hasLimitIp() {
|
if hasLimitIp() {
|
||||||
|
logIpFile, err := os.OpenFile("/var/log/3xipl.log", os.O_CREATE|os.O_APPEND|os.O_RDWR, 0644)
|
||||||
|
if err != nil {
|
||||||
|
log.Panic(err)
|
||||||
|
}
|
||||||
|
defer logIpFile.Close()
|
||||||
|
log.SetOutput(logIpFile)
|
||||||
|
log.SetFlags(log.LstdFlags)
|
||||||
processLogFile()
|
processLogFile()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -240,15 +247,6 @@ func updateInboundClientIps(inboundClientIps *model.InboundClientIps, clientEmai
|
||||||
shouldCleanLog = true
|
shouldCleanLog = true
|
||||||
|
|
||||||
if limitIp < len(ips) && inbound.Enable {
|
if limitIp < len(ips) && inbound.Enable {
|
||||||
|
|
||||||
logIpFile, err := os.Create("/var/log/3xipl.log")
|
|
||||||
if err != nil {
|
|
||||||
log.Panic(err)
|
|
||||||
}
|
|
||||||
defer logIpFile.Close()
|
|
||||||
log.SetOutput(logIpFile)
|
|
||||||
log.SetFlags(log.LstdFlags)
|
|
||||||
|
|
||||||
disAllowedIps = append(disAllowedIps, ips[limitIp:]...)
|
disAllowedIps = append(disAllowedIps, ips[limitIp:]...)
|
||||||
for i := limitIp; i < len(ips); i++ {
|
for i := limitIp; i < len(ips); i++ {
|
||||||
log.Println("[LIMIT_IP] Email=", clientEmail, " SRC=", ips[i])
|
log.Println("[LIMIT_IP] Email=", clientEmail, " SRC=", ips[i])
|
||||||
|
|
Loading…
Reference in a new issue