This commit is contained in:
Kirill Kozlov 2024-07-20 10:02:19 +00:00 committed by GitHub
commit 709ff058c6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -97,12 +97,11 @@ func (s *XrayService) GetXrayConfig() (*xray.Config, error) {
if !clientTraffic.Enable {
clients = RemoveIndex(clients, index-indexDecrease)
indexDecrease++
logger.Infof("Remove Inbound User %s due to expiration or traffic limit", c["email"])
logger.Info("Remove Inbound User ", c["email"], " due to expire or traffic limit")
}
}
}
}
// clear client config for additional parameters
var final_clients []interface{}
for _, client := range clients {
@ -123,6 +122,9 @@ func (s *XrayService) GetXrayConfig() (*xray.Config, error) {
final_clients = append(final_clients, interface{}(c))
}
// Add maxClient setting
settings["maxClient"] = 1 // Replace with desired maxClient value
settings["clients"] = final_clients
modifiedSettings, err := json.MarshalIndent(settings, "", " ")
if err != nil {