diff --git a/main.go b/main.go index 60ed973..58587a5 100644 --- a/main.go +++ b/main.go @@ -39,8 +39,14 @@ func main() { staticDir := pflag.String("static-dir", "./static", "Static files directory") proxy := pflag.String("proxy", "", "Proxy URL, with no scheme http is assumed") userAgent := pflag.String("user-agent", "", "User-Agent header to use") + tor := pflag.BoolP("tor", "T", false, "Use Tor Browser's User-Agent string") pflag.Parse() + if *tor { + // https://tor.stackexchange.com/questions/4890/tor-browser-user-agent-strings/4892#4892 + *userAgent = "Mozilla/5.0 (Windows NT 10.0; rv:68.0) Gecko/20100101 Firefox/68.0" + } + var proxyUrl *url.URL if *proxy != "" { u, err := url.Parse(*proxy)