diff --git a/cmd/hydroxide/main.go b/cmd/hydroxide/main.go index 3f74404..9cd9030 100644 --- a/cmd/hydroxide/main.go +++ b/cmd/hydroxide/main.go @@ -32,7 +32,7 @@ import ( smtpbackend "github.com/emersion/hydroxide/smtp" ) -const defaultAPIEndpoint = "https://mail.protonmail.com/api" +const defaultAPIEndpoint = "https://mail.proton.me/api" var ( debug bool @@ -42,7 +42,7 @@ var ( func newClient() *protonmail.Client { return &protonmail.Client{ RootURL: apiEndpoint, - AppVersion: "web-mail@4.20.8", + AppVersion: "web-mail@5.0.2.3", Debug: debug, } } diff --git a/protonmail/protonmail.go b/protonmail/protonmail.go index 775bff9..8093fb3 100644 --- a/protonmail/protonmail.go +++ b/protonmail/protonmail.go @@ -119,6 +119,8 @@ func (c *Client) newJSONRequest(method, path string, body interface{}) (*http.Re } func (c *Client) do(req *http.Request) (*http.Response, error) { + req.Header.Set("User-Agent", "Mozilla/5.0 (X11; Linux x86_64; rv:101.0) Gecko/20100101 Firefox/101.0") + httpClient := c.HTTPClient if httpClient == nil { httpClient = http.DefaultClient