Skip to content

Commit

Permalink
Revised sockopt and chain.
Browse files Browse the repository at this point in the history
  • Loading branch information
bia-pain-bache committed Jun 20, 2024
1 parent dcd904e commit f16185c
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions _worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -968,8 +968,8 @@ const buildWorkerLessConfig = async (env, client) => {
fragConfig.outbounds[0].settings.fragment.interval = `${intervalMin}-${intervalMax}`;
fragConfig.outbounds = [
{...fragConfig.outbounds[0]},
{...fragConfig.outbounds[1]},
{...fakeOutbound},
{...fragConfig.outbounds[1]},
{...fragConfig.outbounds[2]},
{...fragConfig.outbounds[3]}
];
Expand Down Expand Up @@ -1139,7 +1139,7 @@ const getFragmentConfigs = async (env, hostName, client) => {
}
},
proxySettings: {
tag: "proxy"
tag: proxyOutbound ? "out" : "proxy"
}
});
});
Expand All @@ -1149,9 +1149,10 @@ const getFragmentConfigs = async (env, hostName, client) => {
outbounds[1].tag = 'proxy';

if (proxyOutbound) {
delete outbounds[0].streamSettings.sockopt.dialerProxy;
delete outbounds[1].streamSettings.sockopt;
outbounds[1].proxySettings = {tag: "out"};
// delete outbounds[0].streamSettings.sockopt.dialerProxy;
outbounds[0].streamSettings.sockopt.dialerProxy = 'proxy';
delete outbounds[1].streamSettings.sockopt.dialerProxy;
// outbounds[1].proxySettings = {tag: "out"};
bestFragment.outbounds = [outbounds[0], outbounds[1], ...bestFragment.outbounds];
bestFragment.routing.rules = buildRoutingRules(localDNS, blockAds, bypassIran, blockPorn, bypassLAN, true, true);
} else {
Expand Down

0 comments on commit f16185c

Please sign in to comment.