Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormhsanaei <ho3ein.sanaei@gmail.com>2024-08-29 12:27:43 +0300
committermhsanaei <ho3ein.sanaei@gmail.com>2024-08-29 12:27:43 +0300
commitfa43248e3043932a31bc93ff86a2d4a3f1314491 (patch)
treeed9e83e4f352de96e50ebb1f98ec4b525d787307 /web/assets
parentcb3da25bc82b818018476d53fe534aba3a55e1aa (diff)
New - Noise
freedom
Diffstat (limited to 'web/assets')
-rw-r--r--web/assets/js/model/outbound.js28
-rw-r--r--web/assets/js/model/setting.js1
2 files changed, 28 insertions, 1 deletions
diff --git a/web/assets/js/model/outbound.js b/web/assets/js/model/outbound.js
index f1909552..59da542a 100644
--- a/web/assets/js/model/outbound.js
+++ b/web/assets/js/model/outbound.js
@@ -861,23 +861,34 @@ Outbound.Settings = class extends CommonClass {
}
};
Outbound.FreedomSettings = class extends CommonClass {
- constructor(domainStrategy = '', fragment = {}) {
+ constructor(
+ domainStrategy = '',
+ timeout = '',
+ fragment = {},
+ noise = {}
+ ) {
super();
this.domainStrategy = domainStrategy;
+ this.timeout = timeout;
this.fragment = fragment;
+ this.noise = noise;
}
static fromJson(json = {}) {
return new Outbound.FreedomSettings(
json.domainStrategy,
+ json.timeout,
json.fragment ? Outbound.FreedomSettings.Fragment.fromJson(json.fragment) : undefined,
+ json.noise ? Outbound.FreedomSettings.Noise.fromJson(json.noise) : undefined,
);
}
toJson() {
return {
domainStrategy: ObjectUtil.isEmpty(this.domainStrategy) ? undefined : this.domainStrategy,
+ timeout: this.timeout,
fragment: Object.keys(this.fragment).length === 0 ? undefined : this.fragment,
+ noise: Object.keys(this.noise).length === 0 ? undefined : this.noise,
};
}
};
@@ -897,6 +908,21 @@ Outbound.FreedomSettings.Fragment = class extends CommonClass {
);
}
};
+Outbound.FreedomSettings.Noise = class extends CommonClass {
+ constructor(packets = '', delay = '') {
+ super();
+ this.packets = packets;
+ this.delay = delay;
+ }
+
+ static fromJson(json = {}) {
+ return new Outbound.FreedomSettings.Noise(
+ json.packets,
+ json.delay,
+ );
+ }
+};
+
Outbound.BlackholeSettings = class extends CommonClass {
constructor(type) {
super();
diff --git a/web/assets/js/model/setting.js b/web/assets/js/model/setting.js
index 607fd069..2dea875b 100644
--- a/web/assets/js/model/setting.js
+++ b/web/assets/js/model/setting.js
@@ -38,6 +38,7 @@ class AllSetting {
this.subURI = "";
this.subJsonURI = "";
this.subJsonFragment = "";
+ this.subJsonNoise = "";
this.subJsonMux = "";
this.subJsonRules = "";