summary refs log tree commit diff
path: root/synapse/http/federation/matrix_federation_agent.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Share SSL contexts for non-federation requests (#7094)Richard van der Hoff2020-03-171-1/+1
| | | | | | | Extends #5794 etc to the SimpleHttpClient so that it also applies to non-federation requests. Fixes #7092.
* Fix well-known lookups with the federation certificate whitelist (#5997)Amber Brown2019-09-141-1/+1
|
* Fixup commentsErik Johnston2019-08-231-1/+9
|
* Fix logcontextsErik Johnston2019-08-231-4/+8
|
* Merge branch 'develop' of github.com:matrix-org/synapse into ↵Erik Johnston2019-08-221-12/+14
|\ | | | | | | erikj/reliable_lookups
| * Retry well known on fail.Erik Johnston2019-08-151-12/+14
| | | | | | | | | | | | If we have recently seen a valid well-known for a domain we want to retry on (non-final) errors a few times, to handle temporary blips in networking/etc.
* | Refactor MatrixFederationAgent to retry SRV.Erik Johnston2019-08-151-186/+170
|/ | | | | | | | This refactors MatrixFederationAgent to move the SRV lookup into the endpoint code, this has two benefits: 1. Its easier to retry different host/ports in the same way as HostnameEndpoint. 2. We avoid SRV lookups if we have a free connection in the pool
* Move well known lookup into a separate clasErik Johnston2019-08-071-153/+13
|
* Add a lower bound for TTL on well known results.Erik Johnston2019-08-061-0/+4
| | | | | | | It costs both us and the remote server for us to fetch the well known for every single request we send, so we add a minimum cache period. This is set to 5m so that we still honour the basic premise of "refetch frequently".
* Share SSL options for well-known requestsErik Johnston2019-07-311-11/+5
|
* Replace returnValue with return (#5736)Amber Brown2019-07-231-26/+20
|
* Move logging utilities out of the side drawer of util/ and into logging/ (#5606)Amber Brown2019-07-041-1/+1
|
* Run Black. (#5482)Amber Brown2019-06-201-43/+55
|
* Config option for verifying federation certificates (MSC 1711) (#4967)Andrew Morgan2019-04-251-1/+1
|
* Minor docstring fixes for MatrixFederationAgent (#4765)Andrew Morgan2019-02-281-1/+5
|
* Merge pull request #4544 from matrix-org/rav/skip_invalid_well_knownRichard van der Hoff2019-02-011-19/+6
|\ | | | | Treat an invalid .well-known the same as an absent one
| * Treat an invalid .well-known the same as an absent oneRichard van der Hoff2019-02-011-19/+6
| | | | | | | | ... basically, carry on and fall back to SRV etc.
* | Fix b'ab' noise in logsRichard van der Hoff2019-02-011-1/+1
|/
* Cache failures to parse .well-knownRichard van der Hoff2019-02-011-13/+43
| | | | Also add a Measure block around the .well-known fetch
* better logging for federation connectionsRichard van der Hoff2019-01-311-5/+16
|
* Update federation routing logic to check .well-known before SRVRichard van der Hoff2019-01-311-5/+5
|
* Merge pull request #4521 from matrix-org/rav/fed_routing/cleanupsRichard van der Hoff2019-01-301-9/+11
|\ | | | | Tiny .well-known fixes
| * fix exception textRichard van der Hoff2019-01-301-1/+1
| |
| * Also jitter the invalid cache periodRichard van der Hoff2019-01-301-9/+11
| |
* | Follow redirects on .well-known (#4520)Richard van der Hoff2019-01-301-2/+4
|/
* Add a caching layer to .well-known responses (#4516)Richard van der Hoff2019-01-301-2/+88
|
* Relax requirement for a content-type on .well-known (#4511)Richard van der Hoff2019-01-291-20/+13
|
* Implement MSC1708 (.well-known lookups for server routing) (#4489)Richard van der Hoff2019-01-291-4/+110
|
* docstrings for _RoutingResultRichard van der Hoff2019-01-281-0/+36
|
* Handle IP literals explicitlyRichard van der Hoff2019-01-281-0/+19
| | | | We don't want to be doing .well-known lookups on these guys.
* MatrixFederationAgent: factor out routing logicRichard van der Hoff2019-01-281-18/+62
| | | | This is going to get too big and unmanageable.
* Fix idna and ipv6 literal handling in MatrixFederationAgent (#4487)Richard van der Hoff2019-01-281-11/+12
| | | | | | | | | | | | | | | | Turns out that the library does a better job of parsing URIs than our reinvented wheel. Who knew. There are two things going on here. The first is that, unlike parse_server_name, URI.fromBytes will strip off square brackets from IPv6 literals, which means that it is valid input to ClientTLSOptionsFactory and HostnameEndpoint. The second is that we stay in `bytes` throughout (except for the argument to ClientTLSOptionsFactory), which avoids the weirdness of (sometimes) ending up with idna-encoded values being held in `unicode` variables. TBH it probably would have been ok but it made the tests fragile.
* Fix Host header sent by MatrixFederationAgent (#4468)Richard van der Hoff2019-01-251-0/+10
| | | | | | Move the Host header logic down here so that (a) it is used if we reuse the agent elsewhere, and (b) we can mess about with it with .well-known.
* Look up the right SRV recordRichard van der Hoff2019-01-241-1/+2
|
* put resolve_service in an objectRichard van der Hoff2019-01-221-3/+13
| | | | this makes it easier to stub things out for tests.
* MatrixFederationAgentRichard van der Hoff2019-01-221-0/+114
Pull the magic that is currently in matrix_federation_endpoint and friends into an agent-like thing