diff options
| author | MHSanaei <ho3ein.sanaei@gmail.com> | 2026-04-21 21:02:39 +0300 |
|---|---|---|
| committer | MHSanaei <ho3ein.sanaei@gmail.com> | 2026-04-21 21:02:39 +0300 |
| commit | 0fd0389d5c4bb616bbea2558bbb7de4ae0d3bf51 (patch) | |
| tree | 519ce238a94011538e76d73a6b7102e383b05e3b /web/html | |
| parent | 2983ac3f8eb40499a5dbb8c0fd450fdc8a43ee08 (diff) | |
sub json fix fragment noises effect
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
Diffstat (limited to 'web/html')
| -rw-r--r-- | web/html/settings.html | 57 |
1 files changed, 17 insertions, 40 deletions
diff --git a/web/html/settings.html b/web/html/settings.html index 441e62de..769fbd37 100644 --- a/web/html/settings.html +++ b/web/html/settings.html @@ -129,35 +129,14 @@ datepickerList: [{ name: 'Gregorian (Standard)', value: 'gregorian' }, { name: 'Jalalian (شمسی)', value: 'jalalian' }], remarkSample: '', defaultFragment: { - tag: "fragment", - protocol: "freedom", - settings: { - domainStrategy: "AsIs", - fragment: { - packets: "tlshello", - length: "100-200", - interval: "10-20", - maxSplit: "300-400" - } - }, - streamSettings: { - sockopt: { - tcpKeepAliveIdle: 100, - tcpMptcp: true, - penetrate: true - } - } - }, - defaultNoises: { - tag: "noises", - protocol: "freedom", - settings: { - domainStrategy: "AsIs", - noises: [ - { type: "rand", packet: "10-20", delay: "10-16", applyTo: "ip" }, - ], - }, + packets: "tlshello", + length: "100-200", + interval: "10-20", + maxSplit: "300-400" }, + defaultNoises: [ + { type: "rand", packet: "10-20", delay: "10-16", applyTo: "ip" } + ], defaultMux: { enabled: true, concurrency: 8, @@ -451,41 +430,41 @@ } }, fragmentPackets: { - get: function () { return this.fragment ? JSON.parse(this.allSetting.subJsonFragment).settings.fragment.packets : ""; }, + get: function () { return this.fragment ? JSON.parse(this.allSetting.subJsonFragment).packets : ""; }, set: function (v) { if (v != "") { newFragment = JSON.parse(this.allSetting.subJsonFragment); - newFragment.settings.fragment.packets = v; + newFragment.packets = v; this.allSetting.subJsonFragment = JSON.stringify(newFragment); } } }, fragmentLength: { - get: function () { return this.fragment ? JSON.parse(this.allSetting.subJsonFragment).settings.fragment.length : ""; }, + get: function () { return this.fragment ? JSON.parse(this.allSetting.subJsonFragment).length : ""; }, set: function (v) { if (v != "") { newFragment = JSON.parse(this.allSetting.subJsonFragment); - newFragment.settings.fragment.length = v; + newFragment.length = v; this.allSetting.subJsonFragment = JSON.stringify(newFragment); } } }, fragmentInterval: { - get: function () { return this.fragment ? JSON.parse(this.allSetting.subJsonFragment).settings.fragment.interval : ""; }, + get: function () { return this.fragment ? JSON.parse(this.allSetting.subJsonFragment).interval : ""; }, set: function (v) { if (v != "") { newFragment = JSON.parse(this.allSetting.subJsonFragment); - newFragment.settings.fragment.interval = v; + newFragment.interval = v; this.allSetting.subJsonFragment = JSON.stringify(newFragment); } } }, fragmentMaxSplit: { - get: function () { return this.fragment ? JSON.parse(this.allSetting.subJsonFragment).settings.fragment.maxSplit : ""; }, + get: function () { return this.fragment ? JSON.parse(this.allSetting.subJsonFragment).maxSplit : ""; }, set: function (v) { if (v != "") { newFragment = JSON.parse(this.allSetting.subJsonFragment); - newFragment.settings.fragment.maxSplit = v; + newFragment.maxSplit = v; this.allSetting.subJsonFragment = JSON.stringify(newFragment); } } @@ -504,13 +483,11 @@ }, noisesArray: { get() { - return this.noises ? JSON.parse(this.allSetting.subJsonNoises).settings.noises : []; + return this.noises ? JSON.parse(this.allSetting.subJsonNoises) : []; }, set(value) { if (this.noises) { - const newNoises = JSON.parse(this.allSetting.subJsonNoises); - newNoises.settings.noises = value; - this.allSetting.subJsonNoises = JSON.stringify(newNoises); + this.allSetting.subJsonNoises = JSON.stringify(value); } } }, |
