Skip to content

Commit 101ad42

Browse files
Fixes and Improvements.
1 parent ca5ce8d commit 101ad42

File tree

4 files changed

+3
-9
lines changed

4 files changed

+3
-9
lines changed

docs/configuration_fa.md

-1
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,6 @@
177177

178178
>[Proxy IP](https://www.nslookup.io/domains/bpb.yousef.isegaro.com/dns-records/)
179179
180-
یا میتونید از [این آموزش](https://github.com/bia-pain-bache/BPB-Worker-Panel/blob/main/docs/proxy-ip-scanner.md) برای خودتون اسکن کنید. البته در حال حاضر ممکنه اسکنر خوب جواب نده، میتونید امتحان کنید.
181180

182181
> [!TIP]
183182
> اگر خواستید چند Proxy IP داشته باشید میتونید با ویرگول وارد کنید، مثل `151.213.181.145`,`5.163.51.41`,`bpb.yousef.isegaro.com`

src/cores-configs/sing-box.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,6 @@ export async function getSingBoxWarpConfig (request, env) {
591591
const {rules, rule_set} = buildSingBoxRoutingRules(proxySettings);
592592
config.dns.servers = dnsObject.servers;
593593
config.dns.rules = dnsObject.rules;
594-
config.dns.strategy = proxySettings.warpEnableIPv6 ? "prefer_ipv4" : "ipv4_only";
595594
if (dnsObject.fakeip) config.dns.fakeip = dnsObject.fakeip;
596595
config.route.rules = rules;
597596
config.route.rule_set = rule_set;
@@ -671,7 +670,6 @@ export async function getSingBoxCustomConfig(request, env) {
671670
config.dns.servers = dnsObject.servers;
672671
config.dns.rules = dnsObject.rules;
673672
if (dnsObject.fakeip) config.dns.fakeip = dnsObject.fakeip;
674-
config.dns.strategy = enableIPv6 ? "prefer_ipv4" : "ipv4_only";
675673
config.route.rules = rules;
676674
config.route.rule_set = rule_set;
677675
const selector = config.outbounds[0];
@@ -755,6 +753,7 @@ const singboxConfigTemp = {
755753
dns: {
756754
servers: [],
757755
rules: [],
756+
strategy: "ipv4_only",
758757
independent_cache: true
759758
},
760759
inbounds: [

src/cores-configs/xray.js

+2-5
Original file line numberDiff line numberDiff line change
@@ -183,22 +183,19 @@ function buildXrayRoutingRules (proxySettings, outboundAddrs, isChain, isBalance
183183
];
184184

185185
if (!isWorkerLess) {
186-
const port = isWarp ? "53" : "443";
187186
const ipDomain = isRemoteDnsDomain ? "domain" : "ip";
188187
const outboundType = isBalancer ? "balancerTag" : "outboundTag";
189188
const tag = isBalancer ? "all" : finallOutboundTag;
190189
rules.push({
190+
inboundTag: ["dns"],
191191
[ipDomain]: remoteDNSHosts,
192-
port: port,
193192
[outboundType]: tag,
194193
type: "field"
195194
});
196195
}
197196

198197
if (!isWorkerLess && (isDomainRule || isBypass)) rules.push({
199-
ip: [localDNS],
200-
port: "53",
201-
network: "udp",
198+
inboundTag: ["dns"],
202199
outboundTag: "direct",
203200
type: "field"
204201
});

src/helpers/helpers.js

-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ export async function handlePanel(request, env) {
5858

5959
export async function fallback(request) {
6060
const url = new URL(request.url);
61-
if (url.pathname !== '/') return new Response('Invalid path', {status: 400});
6261
url.hostname = globalThis.fallbackDomain;
6362
url.protocol = 'https:';
6463
const newRequest = new Request(url.toString(), {

0 commit comments

Comments
 (0)