From 2950ce0c176872e69dc9190fd7ae02e39b1ca02f Mon Sep 17 00:00:00 2001 From: mhsanaei Date: Thu, 17 Oct 2024 10:36:05 +0200 Subject: [PATCH] freedom - default settings --- sub/default.json | 4 +++- web/assets/js/model/dbinbound.js | 6 +++--- web/assets/js/model/outbound.js | 6 +++++- web/assets/js/model/xray.js | 12 +++++++----- web/service/config.json | 4 +++- 5 files changed, 21 insertions(+), 11 deletions(-) diff --git a/sub/default.json b/sub/default.json index 32948c77ae..931259ecc4 100644 --- a/sub/default.json +++ b/sub/default.json @@ -47,7 +47,9 @@ "tag": "direct", "protocol": "freedom", "settings": { - "domainStrategy": "UseIP" + "domainStrategy": "UseIP", + "redirect": "", + "noises": [] } }, { diff --git a/web/assets/js/model/dbinbound.js b/web/assets/js/model/dbinbound.js index 9f6f04c66d..aeae1a75a7 100644 --- a/web/assets/js/model/dbinbound.js +++ b/web/assets/js/model/dbinbound.js @@ -140,9 +140,9 @@ class DBInbound { return false; } } - - genInboundLinks(remarkModel) { + + genInboundLinks(remarkModel) { const inbound = this.toInbound(); - return inbound.genInboundLinks(this.remark,remarkModel); + return inbound.genInboundLinks(this.remark, remarkModel); } } \ No newline at end of file diff --git a/web/assets/js/model/outbound.js b/web/assets/js/model/outbound.js index 71c07713ed..4f8a82739b 100644 --- a/web/assets/js/model/outbound.js +++ b/web/assets/js/model/outbound.js @@ -890,7 +890,11 @@ Outbound.FreedomSettings = class extends CommonClass { }; Outbound.FreedomSettings.Fragment = class extends CommonClass { - constructor(packets = '1-3', length = '', interval = '') { + constructor( + packets = '1-3', + length = '', + interval = '' + ) { super(); this.packets = packets; this.length = length; diff --git a/web/assets/js/model/xray.js b/web/assets/js/model/xray.js index 9b731a7fe1..ead8f7d218 100644 --- a/web/assets/js/model/xray.js +++ b/web/assets/js/model/xray.js @@ -529,7 +529,7 @@ class SplitHTTPStreamSettings extends XrayCommonClass { scMinPostsIntervalMs = "10-50", noSSEHeader = false, xPaddingBytes = "100-1000", - xmux = { + xmux = { maxConcurrency: 0, maxConnections: 0, cMaxReuseTimes: 0, @@ -545,7 +545,7 @@ class SplitHTTPStreamSettings extends XrayCommonClass { this.scMinPostsIntervalMs = scMinPostsIntervalMs; this.noSSEHeader = noSSEHeader; this.xPaddingBytes = xPaddingBytes; - this.xmux = xmux; + this.xmux = xmux; } addHeader(name, value) { @@ -909,7 +909,7 @@ class RealityStreamSettings extends XrayCommonClass { this.minClient = minClient; this.maxClient = maxClient; this.maxTimediff = maxTimediff; - this.shortIds = Array.isArray(shortIds) ? shortIds.join(",") : shortIds; + this.shortIds = Array.isArray(shortIds) ? shortIds.join(",") : shortIds; this.settings = settings; } @@ -920,7 +920,9 @@ class RealityStreamSettings extends XrayCommonClass { json.settings.publicKey, json.settings.fingerprint, json.settings.serverName, - json.settings.spiderX);} + json.settings.spiderX + ); + } return new RealityStreamSettings( json.show, json.xver, @@ -2598,7 +2600,7 @@ Inbound.SocksSettings.SocksAccount = class extends XrayCommonClass { Inbound.HttpSettings = class extends Inbound.Settings { constructor( - protocol, + protocol, accounts = [new Inbound.HttpSettings.HttpAccount()], allowTransparent = false, ) { diff --git a/web/service/config.json b/web/service/config.json index 122963fe3d..ea650f7bdd 100644 --- a/web/service/config.json +++ b/web/service/config.json @@ -30,7 +30,9 @@ "tag": "direct", "protocol": "freedom", "settings": { - "domainStrategy": "UseIP" + "domainStrategy": "UseIP", + "redirect": "", + "noises": [] } }, {