Add no_cookies option, update documentation for more instructions on privacy

This commit is contained in:
Star Brilliant
2018-04-01 23:28:31 +08:00
parent 8b45c99dfc
commit 36da908686
3 changed files with 35 additions and 4 deletions
+5 -3
View File
@@ -102,9 +102,11 @@ func NewClient(conf *config) (c *Client, err error) {
// Most CDNs require Cookie support to prevent DDoS attack.
// Disabling Cookie does not effectively prevent tracking,
// so I will leave it on to make anti-DDoS services happy.
c.cookieJar, err = cookiejar.New(nil)
if err != nil {
return nil, err
if !c.conf.NoCookies {
c.cookieJar, err = cookiejar.New(nil)
if err != nil {
return nil, err
}
}
c.httpClientMux = new(sync.RWMutex)
err = c.newHTTPClient()