mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-08-30 14:56:17 +00:00
Added separate log file
This commit is contained in:
parent
577ba30913
commit
74bbc4e2c7
1 changed files with 8 additions and 7 deletions
|
@ -67,13 +67,6 @@ func hasLimitIp() bool {
|
||||||
for _, client := range clients {
|
for _, client := range clients {
|
||||||
limitIp := client.LimitIP
|
limitIp := client.LimitIP
|
||||||
if limitIp > 0 {
|
if limitIp > 0 {
|
||||||
logIpFile, err := os.Create("/var/log/3xipl.log")
|
|
||||||
if err != nil {
|
|
||||||
log.Panic(err)
|
|
||||||
}
|
|
||||||
defer logIpFile.Close()
|
|
||||||
log.SetOutput(logIpFile)
|
|
||||||
log.SetFlags(log.LstdFlags)
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -248,6 +241,14 @@ func updateInboundClientIps(inboundClientIps *model.InboundClientIps, clientEmai
|
||||||
|
|
||||||
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