diff --git a/common.js b/common.js index 0ee3e4d..b0609a6 100644 --- a/common.js +++ b/common.js @@ -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 }); }