From ac58a65750cfac64fc11e75fdacd331d1436ec57 Mon Sep 17 00:00:00 2001 From: Alireza Ahmadi Date: Tue, 20 Jun 2023 12:42:31 +0200 Subject: [PATCH] remove trojan flow --- sub/subService.go | 4 ---- web/assets/js/model/xray.js | 8 +------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/sub/subService.go b/sub/subService.go index c1413eed..d344fcfa 100644 --- a/sub/subService.go +++ b/sub/subService.go @@ -558,10 +558,6 @@ func (s *SubService) genTrojanLink(inbound *model.Inbound, email string) string } } } - - if streamNetwork == "tcp" && len(clients[clientIndex].Flow) > 0 { - params["flow"] = clients[clientIndex].Flow - } } link := fmt.Sprintf("trojan://%s@%s:%d", password, address, port) diff --git a/web/assets/js/model/xray.js b/web/assets/js/model/xray.js index 76969c46..d1448666 100644 --- a/web/assets/js/model/xray.js +++ b/web/assets/js/model/xray.js @@ -1369,9 +1369,6 @@ class Inbound extends XrayCommonClass { if (!ObjectUtil.isEmpty(this.stream.reality.settings.spiderX)) { params.set("spx", this.stream.reality.settings.spiderX); } - if (this.stream.network === 'tcp' && !ObjectUtil.isEmpty(this.settings.trojans[clientIndex].flow)) { - params.set("flow", this.settings.trojans[clientIndex].flow); - } } const link = `trojan://${settings.trojans[clientIndex].password}@${address}:${this.port}`; @@ -1738,10 +1735,9 @@ 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=RandomUtil.randomText(16,16)) { + constructor(password=RandomUtil.randomSeq(10), email=RandomUtil.randomText(), totalGB=0, expiryTime=0, enable=true, tgId='', subId=RandomUtil.randomText(16,16)) { super(); this.password = password; - this.flow = flow; this.email = email; this.totalGB = totalGB; this.expiryTime = expiryTime; @@ -1753,7 +1749,6 @@ Inbound.TrojanSettings.Trojan = class extends XrayCommonClass { toJson() { return { password: this.password, - flow: this.flow, email: this.email, totalGB: this.totalGB, expiryTime: this.expiryTime, @@ -1766,7 +1761,6 @@ Inbound.TrojanSettings.Trojan = class extends XrayCommonClass { static fromJson(json = {}) { return new Inbound.TrojanSettings.Trojan( json.password, - json.flow, json.email, json.totalGB, json.expiryTime,