diff --git a/web/assets/js/model/xray.js b/web/assets/js/model/xray.js index 678d7d9d..113fa2aa 100644 --- a/web/assets/js/model/xray.js +++ b/web/assets/js/model/xray.js @@ -1528,7 +1528,7 @@ Inbound.VmessSettings = class extends Inbound.Settings { } }; Inbound.VmessSettings.Vmess = class extends XrayCommonClass { - constructor(id=RandomUtil.randomUUID(), alterId=0, email=RandomUtil.randomText(), totalGB=0, expiryTime=0, enable=true, tgId='', subId='') { + constructor(id=RandomUtil.randomUUID(), alterId=0, email=RandomUtil.randomText(), totalGB=0, expiryTime=0, enable=true, tgId='', subId=RandomUtil.randomText(16,16)) { super(); this.id = id; this.alterId = alterId; @@ -1618,7 +1618,7 @@ Inbound.VLESSSettings = class extends Inbound.Settings { }; Inbound.VLESSSettings.VLESS = class extends XrayCommonClass { - constructor(id=RandomUtil.randomUUID(), flow='', email=RandomUtil.randomText(), totalGB=0, expiryTime=0, enable=true, tgId='', subId='') { + constructor(id=RandomUtil.randomUUID(), flow='', email=RandomUtil.randomText(), totalGB=0, expiryTime=0, enable=true, tgId='', subId=RandomUtil.randomText(16,16)) { super(); this.id = id; this.flow = flow; @@ -1739,7 +1739,7 @@ Inbound.TrojanSettings = class extends Inbound.Settings { } }; Inbound.TrojanSettings.Trojan = class extends XrayCommonClass { - constructor(password=RandomUtil.randomSeq(10), flow='', email=RandomUtil.randomText(), totalGB=0, expiryTime=0, enable=true, tgId='', subId='') { + constructor(password=RandomUtil.randomSeq(10), flow='', email=RandomUtil.randomText(), totalGB=0, expiryTime=0, enable=true, tgId='', subId=RandomUtil.randomText(16,16)) { super(); this.password = password; this.flow = flow; @@ -1878,7 +1878,7 @@ Inbound.ShadowsocksSettings = class extends Inbound.Settings { }; Inbound.ShadowsocksSettings.Shadowsocks = class extends XrayCommonClass { - constructor(password=RandomUtil.randomShadowsocksPassword(), email=RandomUtil.randomText(), totalGB=0, expiryTime=0, enable=true, tgId='', subId='') { + constructor(password=RandomUtil.randomShadowsocksPassword(), email=RandomUtil.randomText(), totalGB=0, expiryTime=0, enable=true, tgId='', subId=RandomUtil.randomText(16,16)) { super(); this.password = password; this.email = email; diff --git a/web/html/xui/client_bulk_modal.html b/web/html/xui/client_bulk_modal.html index 37e8045d..bccfeba4 100644 --- a/web/html/xui/client_bulk_modal.html +++ b/web/html/xui/client_bulk_modal.html @@ -179,8 +179,8 @@ newClient = clientsBulkModal.newClient(clientsBulkModal.dbInbound.protocol); if(method==4) newClient.email = ""; newClient.email += useNum ? prefix + i.toString() + postfix : prefix + postfix; - newClient.subId = clientsBulkModal.subId; - newClient.tgId = clientsBulkModal.tgId; + if (clientsBulkModal.subId.length > 0) newClient.subId = clientsBulkModal.subId; + if (clientsBulkModal.tgId.length > 0) newClient.tgId = clientsBulkModal.tgId; newClient._totalGB = clientsBulkModal.totalGB; newClient._expiryTime = clientsBulkModal.expiryTime; if(clientsBulkModal.inbound.canEnableTlsFlow()){