Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update user agent, reformat code, regenerate statics #1429

Merged
merged 3 commits into from
Dec 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions internal/model/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ const (
HTTPHeaderAcceptLanguage = "en-US,en;q=0.9"

// HTTPHeaderUserAgent is the User-Agent header used for measuring. The current header
// is 20.2% of the browser population as of 2023-10-04 according to the
// https://techblog.willshouse.com/2012/01/03/most-common-user-agents/ webpage.
HTTPHeaderUserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36"
// is 17.34% of the browser population as of 2023-12-13 according to the
// https://www.useragents.me/ webpage.
HTTPHeaderUserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.3"
)

// Additional strings used to report HTTP errors. They're currently only used by
Expand Down
197 changes: 140 additions & 57 deletions internal/netxlite/certifi.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/netxlite/errno.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/netxlite/errno_darwin.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/netxlite/errno_darwin_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/netxlite/errno_freebsd.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/netxlite/errno_freebsd_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/netxlite/errno_linux.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/netxlite/errno_linux_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/netxlite/errno_openbsd.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/netxlite/errno_openbsd_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/netxlite/errno_windows.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/netxlite/errno_windows_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/testingsocks5/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func (s *Server) handleConnect(ctx context.Context, cconn net.Conn, req *request
sconn, err := dialer.DialContext(ctx, "tcp", endpoint)
if err != nil {
// Note: the original go-socks5 selects the proper error but it does not
// matter for our purposes, so we always return hostUnreachable.
// matter for our purposes, so we always return hostUnreachable.
return sendReply(cconn, hostUnreachable, &net.TCPAddr{})
}
defer sconn.Close()
Expand Down