From fa43248e3043932a31bc93ff86a2d4a3f1314491 Mon Sep 17 00:00:00 2001 From: mhsanaei Date: Thu, 29 Aug 2024 11:27:43 +0200 Subject: New - Noise freedom --- web/html/xui/form/outbound.html | 30 ++++++++++++++++------ web/html/xui/settings.html | 55 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 77 insertions(+), 8 deletions(-) (limited to 'web/html') diff --git a/web/html/xui/form/outbound.html b/web/html/xui/form/outbound.html index 61af06e0..a579b7a6 100644 --- a/web/html/xui/form/outbound.html +++ b/web/html/xui/form/outbound.html @@ -22,6 +22,9 @@ [[ s ]] + + + @@ -38,6 +41,17 @@ + + + + @@ -95,10 +109,10 @@ - + - + @@ -257,25 +271,25 @@ - + - + - + - + - + - + diff --git a/web/html/xui/settings.html b/web/html/xui/settings.html index f2379078..beab4df1 100644 --- a/web/html/xui/settings.html +++ b/web/html/xui/settings.html @@ -313,6 +313,24 @@ + + + + + + + + + + + + + + + + + + @@ -412,6 +430,17 @@ } } }, + defaultNoise: { + tag: "noise", + protocol: "freedom", + settings: { + domainStrategy: "AsIs", + noise: { + packets: "rand:5-10", + delay: "5-10", + } + }, + }, defaultMux: { enabled: true, concurrency: 8, @@ -611,6 +640,32 @@ } } }, + noise: { + get: function () { return this.allSetting?.subJsonNoise != ""; }, + set: function (v) { + this.allSetting.subJsonNoise = v ? JSON.stringify(this.defaultNoise) : ""; + } + }, + noisePackets: { + get: function () { return this.noise ? JSON.parse(this.allSetting.subJsonNoise).settings.noise.packets : ""; }, + set: function (v) { + if (v != "") { + newNoise = JSON.parse(this.allSetting.subJsonNoise); + newNoise.settings.noise.packets = v; + this.allSetting.subJsonNoise = JSON.stringify(newNoise); + } + } + }, + noiseDelay: { + get: function () { return this.noise ? JSON.parse(this.allSetting.subJsonNoise).settings.noise.delay : ""; }, + set: function (v) { + if (v != "") { + newNoise = JSON.parse(this.allSetting.subJsonNoise); + newNoise.settings.noise.delay = v; + this.allSetting.subJsonNoise = JSON.stringify(newNoise); + } + } + }, enableMux: { get: function () { return this.allSetting?.subJsonMux != ""; }, set: function (v) { -- cgit v1.2.3