mirror of
https://github.com/LittleChest/Dohna-NS.git
synced 2026-05-06 22:44:50 +08:00
common: Update Anti-GFW & faster
This commit is contained in:
parent
6449b08064
commit
1b6191580d
@ -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")
|
||||||
) {
|
) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user