diff --git a/README.md b/README.md index 8c08974..d1ddd10 100644 --- a/README.md +++ b/README.md @@ -173,7 +173,7 @@ zagent248.hola.org,165.22.65.3,22222,22223,22224,22225,22226,digitalocean | resolver | String | DNS/DoH/DoT resolver to workaround Hola blocked hosts. See https://github.com/ameshkov/dnslookup/ for upstream DNS URL format. (default "https://cloudflare-dns.com/dns-query") | | rotate | Duration | rotate user ID once per given period (default 1h0m0s) | | timeout | Duration | timeout for network operations (default 35s) | -| user-agent | String | value of User-Agent header in requests (default "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36") | +| user-agent | String | value of User-Agent header in requests (default "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36") | | verbosity | Number | logging verbosity (10 - debug, 20 - info, 30 - warning, 40 - error, 50 - critical) (default 20) | ## See also diff --git a/holaapi.go b/holaapi.go index 656611b..96ed98d 100644 --- a/holaapi.go +++ b/holaapi.go @@ -40,7 +40,7 @@ var TemporaryBanError = errors.New("temporary ban detected") var PermanentBanError = errors.New("permanent ban detected") var EmptyResponseError = errors.New("empty response") -var userAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36" +var userAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36" func SetUserAgent(ua string) { userAgent = ua