diff options
Diffstat (limited to 'web/html/xui/settings.html')
| -rw-r--r-- | web/html/xui/settings.html | 55 |
1 files changed, 55 insertions, 0 deletions
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 @@ -316,6 +316,24 @@ <a-list-item style="padding: 20px"> <a-row> <a-col :lg="24" :xl="12"> + <a-list-item-meta title='Noise'> + <template slot="description">{{ i18n "pages.settings.noiseDesc"}}</template> + </a-list-item-meta> + </a-col> + <a-col :lg="24" :xl="12"> + <a-switch v-model="noise"></a-switch> + </a-col> + </a-row> + <a-collapse v-if="noise" style="margin-top: 14px;"> + <a-collapse-panel header='{{ i18n "pages.settings.noiseSett"}}' v-if="noise"> + <setting-list-item style="padding: 10px 20px" type="text" title='Packets' v-model="noisePackets" placeholder="rand:5-10"></setting-list-item> + <setting-list-item style="padding: 10px 20px" type="text" title='Delay' v-model="noiseDelay" placeholder="5-10"></setting-list-item> + </a-collapse-panel> + </a-collapse> + </a-list-item> + <a-list-item style="padding: 20px"> + <a-row> + <a-col :lg="24" :xl="12"> <a-list-item-meta title='{{ i18n "pages.settings.mux"}}'> <template slot="description">{{ i18n "pages.settings.muxDesc"}}</template> </a-list-item-meta> @@ -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) { |
