mirror of
https://github.com/LittleChest/Dohna-NS.git
synced 2026-05-06 22:44:50 +08:00
common: Update Anti-GFW
* Adapt to new changes in GFW
This commit is contained in:
parent
86fa917b6a
commit
05a6acb27a
@ -9,9 +9,14 @@ export default async function handler(
|
||||
|
||||
// Anti-GFW
|
||||
if (
|
||||
headers.get("user-agent") === "Go-http-client/1.1" &&
|
||||
method === "POST" &&
|
||||
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 });
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user