Rollback useless utls feature

This commit is contained in:
Alireza Ahmadi
2023-02-28 10:25:27 +01:00
parent e1428ff0dc
commit 9a0055d5d5
3 changed files with 17 additions and 32 deletions

View File

@@ -1412,12 +1412,12 @@ Inbound.VLESSSettings = class extends Inbound.Settings {
}
// decryption should be set to static value
static fromJson({clients, decryption, fallbacks}={}) {
static fromJson(json={}) {
return new Inbound.VLESSSettings(
Protocols.VLESS,
clients.map(client => Inbound.VLESSSettings.VLESS.fromJson(client)),
json.clients.map(client => Inbound.VLESSSettings.VLESS.fromJson(client)),
'none',
Inbound.VLESSSettings.Fallback.fromJson(fallbacks),
Inbound.VLESSSettings.Fallback.fromJson(json.fallbacks),
);
}
@@ -1432,25 +1432,23 @@ Inbound.VLESSSettings = class extends Inbound.Settings {
};
Inbound.VLESSSettings.VLESS = class extends XrayCommonClass {
constructor(id=RandomUtil.randomUUID(), flow='', email=RandomUtil.randomText(), totalGB=0, fingerprint = UTLS_FINGERPRINT.UTLS_CHROME, expiryTime='') {
constructor(id=RandomUtil.randomUUID(), flow='', email=RandomUtil.randomText(), totalGB=0, expiryTime='') {
super();
this.id = id;
this.flow = flow;
this.email = email;
this.totalGB = totalGB;
this.fingerprint = fingerprint;
this.expiryTime = expiryTime;
}
static fromJson({id, flow, email, totalGB, fingerprint, expiryTime} = {}) {
static fromJson(json={}) {
return new Inbound.VLESSSettings.VLESS(
id,
flow,
email,
totalGB,
fingerprint,
expiryTime
json.id,
json.flow,
json.email,
json.totalGB,
json.expiryTime,
);
}
@@ -1547,13 +1545,12 @@ Inbound.TrojanSettings = class extends Inbound.Settings {
}
};
Inbound.TrojanSettings.Trojan = class extends XrayCommonClass {
constructor(password=RandomUtil.randomSeq(10), flow='', email=RandomUtil.randomText(), totalGB=0, fingerprint = UTLS_FINGERPRINT.UTLS_CHROME, expiryTime='') {
constructor(password=RandomUtil.randomSeq(10), flow='', email=RandomUtil.randomText(), totalGB=0, expiryTime='') {
super();
this.password = password;
this.flow = flow;
this.email = email;
this.totalGB = totalGB;
this.fingerprint = fingerprint;
this.expiryTime = expiryTime;
}
@@ -1563,19 +1560,17 @@ Inbound.TrojanSettings.Trojan = class extends XrayCommonClass {
flow: this.flow,
email: this.email,
totalGB: this.totalGB,
fingerprint: this.fingerprint,
expiryTime: this.expiryTime,
};
}
static fromJson({password, flow, email, totalGB, fingerprint, expiryTime} = {}) {
static fromJson(json = {}) {
return new Inbound.TrojanSettings.Trojan(
password,
flow,
email,
totalGB,
fingerprint,
expiryTime,
json.password,
json.flow,
json.email,
json.totalGB,
json.expiryTime,
);
}

View File

@@ -21,11 +21,6 @@
<a-form-item label="id" v-if="inbound.protocol === Protocols.VMESS || inbound.protocol === Protocols.VLESS">
<a-input v-model.trim="client.id"></a-input>
</a-form-item>
<a-form-item v-if="inbound.tls" label="utls" layout="inline">
<a-select v-model="client.fingerprint" label="utls" style="width: 150px">
<a-select-option v-for="key in UTLS_FINGERPRINT" :value="key">[[ key ]]</a-select-option>
</a-select>
</a-form-item>
<a-form-item label='{{ i18n "additional" }} ID' v-if="inbound.protocol === Protocols.VMESS">
<a-input type="number" v-model.number="client.alterId"></a-input>
</a-form-item>

View File

@@ -31,11 +31,6 @@
<a-select-option v-for="key in TLS_FLOW_CONTROL" :value="key">[[ key ]]</a-select-option>
</a-select>
</a-form-item>
<a-form-item v-if="inbound.tls" label="utls" layout="inline">
<a-select v-model="inbound.settings.vlesses[index].fingerprint" label="utls" style="width: 150px">
<a-select-option v-for="key in UTLS_FINGERPRINT" :value="key">[[ key ]]</a-select-option>
</a-select>
</a-form-item>
<a-form-item>
<span slot="label">
<span >{{ i18n "pages.inbounds.totalFlow" }}</span>(GB)