From c4412e2993342211627ff87aac4cbebdba42d8c1 Mon Sep 17 00:00:00 2001 From: Star Brilliant Date: Thu, 30 Nov 2017 15:53:13 +0800 Subject: [PATCH] Enable Cookie, which might have better CDN cache performance --- doh-client/client.go | 1 + 1 file changed, 1 insertion(+) diff --git a/doh-client/client.go b/doh-client/client.go index 3ef2e7d..acaf442 100644 --- a/doh-client/client.go +++ b/doh-client/client.go @@ -101,6 +101,7 @@ func NewClient(addr, upstream string, bootstraps []string, timeout uint, noECS, DualStack: true, Resolver: bootResolver, }).DialContext + // Most CDNs require Cookie support to prevent DDoS attack cookieJar, err := cookiejar.New(nil) if err != nil { return nil, err } c.httpClient = &http.Client {