mirror of
https://github.com/alireza0/x-ui.git
synced 2026-03-18 14:55:49 +00:00
remove merging new ips and old ones in ip log
This commit is contained in:
@@ -179,11 +179,7 @@ func addInboundClientIps(clientEmail string,ips []string) error {
|
||||
}
|
||||
func updateInboundClientIps(inboundClientIps *model.InboundClientIps,clientEmail string,ips []string) error {
|
||||
|
||||
var oldIps []string
|
||||
err := json.Unmarshal([]byte(inboundClientIps.Ips), &oldIps)
|
||||
mergedIps := Unique(append(oldIps, ips...))
|
||||
|
||||
jsonIps, err := json.Marshal(mergedIps)
|
||||
jsonIps, err := json.Marshal(ips)
|
||||
checkError(err)
|
||||
|
||||
inboundClientIps.ClientEmail = clientEmail
|
||||
@@ -199,7 +195,7 @@ func updateInboundClientIps(inboundClientIps *model.InboundClientIps,clientEmail
|
||||
limitIp, err := strconv.Atoi(limitIpMactch)
|
||||
|
||||
|
||||
if(limitIp < len(mergedIps) && limitIp != 0 && inbound.Enable) {
|
||||
if(limitIp < len(ips) && limitIp != 0 && inbound.Enable) {
|
||||
|
||||
DisableInbound(inbound.Id)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user