Skip to content

Commit

Permalink
Added hex noise to Xray freedom.
Browse files Browse the repository at this point in the history
  • Loading branch information
bia-pain-bache committed Feb 10, 2025
1 parent 1a9f63c commit fb5d504
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
3 changes: 2 additions & 1 deletion src/cores-configs/sing-box.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 1 addition & 2 deletions src/cores-configs/xray.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
12 changes: 8 additions & 4 deletions src/pages/home.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ export async function renderHomePage (proxySettings, isPassSet) {
<option value="base64" ${noise.type === 'base64' ? 'selected' : ''}>Base64</option>
<option value="rand" ${noise.type === 'rand' ? 'selected' : ''}>Random</option>
<option value="str" ${noise.type === 'str' ? 'selected' : ''}>String</option>
<option value="hex" ${noise.type === 'hex' ? 'selected' : ''}>Hex</option>
</select>
</div>
</div>
Expand Down Expand Up @@ -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');
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit fb5d504

Please sign in to comment.