Skip to content

Commit

Permalink
Bug fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
bia-pain-bache committed Sep 13, 2024
1 parent fa09108 commit 98fba75
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions _worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,7 @@ async function handleTCPOutBound(

vlessResponseHeader
? vlessRemoteSocketToWS(tcpSocket, webSocket, vlessResponseHeader, null, log)
: trojanRemoteSocketToWS(tcpSocket2, webSocket, null, log);
: trojanRemoteSocketToWS(tcpSocket, webSocket, null, log);
}

const tcpSocket = await connectAndWrite(addressRemote, portRemote);
Expand Down Expand Up @@ -3335,7 +3335,7 @@ async function buildWorkerLessConfig(env, client) {
fakeOutbound.streamSettings.wsSettings.path = '/';

let fragConfig = structuredClone(xrayConfigTemp);
fragConfig.remarks = '💦 BPB Frag - WorkerLess ⭐'
fragConfig.remarks = '💦 BPB F - WorkerLess ⭐'
fragConfig.dns = await buildXrayDNSObject('https://cloudflare-dns.com/dns-query', localDNS, blockAds, bypassIran, bypassChina, blockPorn, true);
fragConfig.outbounds[0].settings.domainStrategy = 'UseIP';
fragConfig.outbounds[0].settings.fragment.length = `${lengthMin}-${lengthMax}`;
Expand Down Expand Up @@ -3538,7 +3538,7 @@ async function getFragmentConfigs(env, hostName, client) {
}

let bestPing = structuredClone(xrayConfigTemp);
bestPing.remarks = '💦 BPB Frag - Best Ping 💥';
bestPing.remarks = '💦 BPB F - Best Ping 💥';
bestPing.dns = await buildXrayDNSObject(remoteDNS, localDNS, blockAds, bypassIran, bypassChina, blockPorn, false);
bestPing.outbounds[0].settings.fragment.length = `${lengthMin}-${lengthMax}`;
bestPing.outbounds[0].settings.fragment.interval = `${intervalMin}-${intervalMax}`;
Expand All @@ -3560,7 +3560,7 @@ async function getFragmentConfigs(env, hostName, client) {
}

let bestFragment = structuredClone(xrayConfigTemp);
bestFragment.remarks = '💦 BPB Frag - Best Fragment 😎';
bestFragment.remarks = '💦 BPB F - Best Fragment 😎';
bestFragment.dns = await buildXrayDNSObject(remoteDNS, localDNS, blockAds, bypassIran, bypassChina, blockPorn, false);
bestFragment.outbounds.splice(0,1);
bestFragValues.forEach( (fragLength, index) => {
Expand Down

0 comments on commit 98fba75

Please sign in to comment.