proxy: use wherever http.Client is, update mautrix

Added a new common.ConfigurableTransport interface which mediabrowser,
ombi, jellyseer, discord, telegram and matrix (i.e.
ThirdPartService/ContactMethodLinker) now all implement. proxies are
bound to them in main.go, Email is still a special case (but from the
previous commit, mailgun does use the proxy).

mautrix/go has been updated, and context.TODO()s stuck everywhere since
I still don't really comprehend why I should use them (FIXME literally).
This commit is contained in:
Harvey Tindall
2024-08-09 21:42:16 +01:00
parent a52dd26ec6
commit 86c7551ff8
15 changed files with 281 additions and 263 deletions
+5
View File
@@ -46,6 +46,11 @@ func NewOmbi(server, key string, timeoutHandler co.TimeoutHandler) *Ombi {
}
}
// SetTransport sets the http.Transport to use for requests. Can be used to set a proxy.
func (ombi *Ombi) SetTransport(t *http.Transport) {
ombi.httpClient.Transport = t
}
// does a GET and returns the response as a string.
func (ombi *Ombi) getJSON(url string, params map[string]string) (string, int, error) {
if ombi.key == "" {