common: Update Anti-GFW

* Adapt to new changes in GFW
This commit is contained in:
LittleChest 2025-07-22 17:23:11 +08:00
parent 86fa917b6a
commit 05a6acb27a

View File

@ -9,9 +9,14 @@ export default async function handler(
// Anti-GFW // Anti-GFW
if ( if (
headers.get("user-agent") === "Go-http-client/1.1" && method === "POST" &&
pathname === "/dns-query" && pathname === "/dns-query" &&
method === "POST" headers.get("content-type") === "application/dns-message" &&
headers.get("accept") === "application/dns-message" &&
headers.get("accept-encoding") === "gzip, br" &&
headers.get("content-length") === "29" &&
(headers.get("user-agent") === "Go-http-client/1.1" ||
headers.get("user-agent") === "Go-http-client/2.0")
) { ) {
return new Response(null, { status: 403 }); return new Response(null, { status: 403 });
} }