0d4323ae66
* chore: update dependencies * chore: update user agent for measurements * chore: we're now at v3.6.0 * chore: update assets * chore: update bundled CA * fix: address some goreportcard.com warnings * fix(debian/changelog): zap release that breaks out build scripts We're forcing the content of changelog with `dch`, so it's fine to not have any specific new release in there. * fix: make sure tests are passing locally Notably, I removed a chunk of code where we were checking for network activity. Now we don't fetch the databases and it's not important. Before, it was important because the databases are ~large. * fix: temporarily comment out riseupvn integration tests See https://github.com/ooni/probe/issues/1354 for work aimed at reducing the rate of false positives (thanks @cyBerta!)
17 lines
634 B
Go
17 lines
634 B
Go
// Package httpheader contains code to set common HTTP headers.
|
|
package httpheader
|
|
|
|
// UserAgent returns the User-Agent header used for measuring.
|
|
func UserAgent() string {
|
|
// 8.0% as of Mar 3, 2021 according to https://techblog.willshouse.com/2012/01/03/most-common-user-agents/
|
|
const ua = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36"
|
|
return ua
|
|
}
|
|
|
|
// CLIUserAgent returns the User-Agent used when we want to
|
|
// pretent to be a command line HTTP client.
|
|
func CLIUserAgent() string {
|
|
// here we always put the latest version of cURL.
|
|
return "curl/7.73.0"
|
|
}
|