From fb5d504883589a0b653e7c287b68825977c4f323 Mon Sep 17 00:00:00 2001 From: bia-pain-bache Date: Mon, 10 Feb 2025 19:53:04 +0330 Subject: [PATCH] Added hex noise to Xray freedom. --- src/cores-configs/sing-box.js | 3 ++- src/cores-configs/xray.js | 3 +-- src/pages/home.js | 12 ++++++++---- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/cores-configs/sing-box.js b/src/cores-configs/sing-box.js index 1b92f1fc9..6566cc097 100644 --- a/src/cores-configs/sing-box.js +++ b/src/cores-configs/sing-box.js @@ -496,7 +496,8 @@ function buildSingBoxWarpOutbound (proxySettings, warpConfigs, remark, endpoint, allowed_ips: [ "0.0.0.0/0", "::/0" - ] + ], + persistent_keepalive_interval: 5 } ], private_key: privateKey, diff --git a/src/cores-configs/xray.js b/src/cores-configs/xray.js index 16146c65e..1321409b3 100644 --- a/src/cores-configs/xray.js +++ b/src/cores-configs/xray.js @@ -399,8 +399,7 @@ function buildXrayWarpOutbound (proxySettings, warpConfigs, endpoint, chain, cli }, streamSettings: { sockopt: { - dialerProxy: chain, - domainStrategy: warpEnableIPv6 ? "UseIPv4v6" : "UseIPv4", + dialerProxy: chain } }, tag: isWoW ? "chain" : "proxy" diff --git a/src/pages/home.js b/src/pages/home.js index 511ec1f12..eac290d35 100644 --- a/src/pages/home.js +++ b/src/pages/home.js @@ -77,6 +77,7 @@ export async function renderHomePage (proxySettings, isPassSet) { + @@ -1265,10 +1266,6 @@ export async function renderHomePage (proxySettings, isPassSet) { const customCdnSni = document.getElementById('customCdnSni').value; const isCustomCdn = customCdnAddrs.length || customCdnHost !== '' || customCdnSni !== ''; const warpEndpoints = document.getElementById('warpEndpoints').value?.replaceAll(' ', '').split(','); - // const xrayNoiseMode = document.getElementById('udpXrayNoiseMode').value; - // const xrayNoisePacket = document.getElementById('udpXrayNoisePacket').value; - // const xrayNoiseDelayMin = getValue('udpXrayNoiseDelayMin'); - // const xrayNoiseDelayMax = getValue('udpXrayNoiseDelayMax'); const noiseCountMin = getValue('noiseCountMin'); const noiseCountMax = getValue('noiseCountMax'); const noiseSizeMin = getValue('noiseSizeMin'); @@ -1375,6 +1372,13 @@ export async function renderHomePage (proxySettings, isPassSet) { submisionError = true; } break; + + case 'hex': + if (!(/^[0-9A-Fa-f]+$/.test(udpNoisePackets[index]))) { + alert('⛔ The Hex noise packet is not a valid hex value! 🫤'); + submisionError = true; + } + break; } } if (submisionError) return false;