common: Update Anti-GFW & faster

This commit is contained in:
LittleChest 2026-02-12 17:39:19 +08:00
parent 6449b08064
commit 1b6191580d

View File

@ -122,19 +122,16 @@ export default async function handler(
} }
// POST // POST
if ( if (method === "POST") {
method === "POST" &&
headers.get("content-type") === "application/dns-message"
) {
const requestBody = await request.arrayBuffer(); const requestBody = await request.arrayBuffer();
// Anti-GFW // Anti-GFW
if ( if (
isIPv4(ip) &&
headers.get("accept") === "application/dns-message" &&
headers.get("content-length") === "29" && headers.get("content-length") === "29" &&
(headers.get("user-agent") === "Go-http-client/1.1" || (headers.get("user-agent") === "Go-http-client/1.1" ||
headers.get("user-agent") === "Go-http-client/2.0") && headers.get("user-agent") === "Go-http-client/2.0") &&
headers.get("accept") === "application/dns-message" &&
headers.get("content-type") === "application/dns-message" &&
(headers.get("accept-encoding") === "gzip, br" || (headers.get("accept-encoding") === "gzip, br" ||
headers.get("accept-encoding") === "gzip") headers.get("accept-encoding") === "gzip")
) { ) {