remove trojan flow

This commit is contained in:
Alireza Ahmadi
2023-06-20 12:42:31 +02:00
parent fe29c48d89
commit ac58a65750
2 changed files with 1 additions and 11 deletions

View File

@@ -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)

View File

@@ -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,