Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Add MSC4040 `matrix-fed` service lookups (#16137) | Travis Ralston | 2023-09-05 | 1 | -5/+24 |
| | |||||
* | Switch from `matrix://` to `matrix-federation://` scheme for internal ↵ | Eric Eastwood | 2023-06-20 | 1 | -6/+8 |
| | | | | | | | Synapse routing of outbound federation traffic (#15806) `matrix://` is a registered specced scheme nowadays and doesn't make sense for our internal to Synapse use case anymore. ([discussion] (https://github.com/matrix-org/synapse/pull/15773#discussion_r1227598679)) | ||||
* | Rename blacklist/whitelist internally. (#15620) | Patrick Cloke | 2023-05-19 | 1 | -12/+12 |
| | | | | Avoid renaming configuration settings for now and rename internal code to use blocklist and allowlist instead. | ||||
* | Handle `DNSNotImplementedError` in SRV resolver (#15523) | Zdziszek | 2023-05-05 | 1 | -1/+4 |
| | | | Signed-off-by: Zdzichu <zdzichu.rks@protonmail.com> | ||||
* | Pull in netaddr type hints. (#15231) | Patrick Cloke | 2023-03-09 | 1 | -1/+1 |
| | | | And fix any issues from having those type hints. | ||||
* | Remove redundant types from comments. (#14412) | Patrick Cloke | 2022-11-16 | 1 | -5/+4 |
| | | | | | | | Remove type hints from comments which have been added as Python type hints. This helps avoid drift between comments and reality, as well as removing redundant information. Also adds some missing type hints which were simple to fill in. | ||||
* | Reduce the number of "untyped defs" (#12716) | David Robertson | 2022-05-12 | 3 | -6/+6 |
| | |||||
* | Add missing type hints to `synapse.logging.context` (#11556) | Sean Quah | 2021-12-14 | 1 | -2/+5 |
| | |||||
* | Additional type hints for the proxy agent and SRV resolver modules. (#10608) | Dirk Klimpel | 2021-08-18 | 1 | -20/+25 |
| | |||||
* | support federation queries through http connect proxy (#10475) | Dirk Klimpel | 2021-08-11 | 1 | -13/+87 |
| | | | | | Signed-off-by: Marcus Hoffmann <bubu@bubu1.eu> Signed-off-by: Dirk Klimpel dirk@klimpel.org | ||||
* | Fix a handful of type annotations. (#10446) | Richard van der Hoff | 2021-07-22 | 1 | -2/+2 |
| | | | | | | | | | | * switch from `types.CoroutineType` to `typing.Coroutine` these should be identical semantically, and since `defer.ensureDeferred` is defined to take a `typing.Coroutine`, will keep mypy happy * Fix some annotations on inlineCallbacks functions * changelog | ||||
* | Use inline type hints in `http/federation/`, `storage/` and `util/` (#10381) | Jonathan de Jong | 2021-07-15 | 1 | -7/+6 |
| | |||||
* | Remove redundant "coding: utf-8" lines (#9786) | Jonathan de Jong | 2021-04-14 | 4 | -4/+0 |
| | | | | | | | Part of #9744 Removes all redundant `# -*- coding: utf-8 -*-` lines from files, as python 3 automatically reads source code as utf-8 now. `Signed-off-by: Jonathan de Jong <jonathan@automatia.nl>` | ||||
* | Add type hints to DictionaryCache and TTLCache. (#9442) | Patrick Cloke | 2021-03-29 | 1 | -4/+6 |
| | |||||
* | Fix additional type hints. (#9543) | Patrick Cloke | 2021-03-09 | 1 | -1/+2 |
| | | | Type hint fixes due to Twisted 21.2.0 adding type hints. | ||||
* | Create a SynapseReactor type which incorporates the necessary reactor ↵ | Patrick Cloke | 2021-03-08 | 1 | -1/+2 |
| | | | | | interfaces. (#9528) This helps fix some type hints when running with Twisted 21.2.0. | ||||
* | Fix additional type hints from Twisted upgrade. (#9518) | Patrick Cloke | 2021-03-03 | 1 | -9/+9 |
| | |||||
* | Update black, and run auto formatting over the codebase (#9381) | Eric Eastwood | 2021-02-16 | 2 | -6/+3 |
| | | | | | | | - Update black version to the latest - Run black auto formatting over the codebase - Run autoformatting according to [`docs/code_style.md `](https://github.com/matrix-org/synapse/blob/80d6dc9783aa80886a133756028984dbf8920168/docs/code_style.md) - Update `code_style.md` docs around installing black to use the correct version | ||||
* | Add debug logging to DNS SRV requests. (#9305) | Marcus | 2021-02-03 | 1 | -0/+7 |
| | |||||
* | Fix wrong arguments being passed to BlacklistingAgentWrapper (#9098) | Tim Leung | 2021-01-14 | 1 | -1/+0 |
| | | | | | | A reactor was being passed instead of a whitelist for the BlacklistingAgentWrapper used by the WellyKnownResolver. This coulld cause exceptions when attempting to connect to IP addresses that are blacklisted, but in reality this did not have any observable affect since this code is not used for IP literals. | ||||
* | Add a maximum size for well-known lookups. (#8950) | Patrick Cloke | 2020-12-16 | 1 | -2/+23 |
| | |||||
* | Apply an IP range blacklist to push and key revocation requests. (#8821) | Patrick Cloke | 2020-12-02 | 1 | -4/+12 |
| | | | | | | | | | | | | Replaces the `federation_ip_range_blacklist` configuration setting with an `ip_range_blacklist` setting with wider scope. It now applies to: * Federation * Identity servers * Push notifications * Checking key validitity for third-party invite events The old `federation_ip_range_blacklist` setting is still honored if present, but with reduced scope (it only applies to federation and identity servers). | ||||
* | Add type hints to matrix federation client / agent. (#8806) | Patrick Cloke | 2020-11-25 | 2 | -47/+69 |
| | |||||
* | Fix typos and spelling errors. (#8639) | Patrick Cloke | 2020-10-23 | 1 | -1/+1 |
| | |||||
* | Use slots in attrs classes where possible (#8296) | Patrick Cloke | 2020-09-14 | 1 | -1/+1 |
| | | | | | slots use less memory (and attribute access is faster) while slightly limiting the flexibility of the class attributes. This focuses on objects which are instantiated "often" and for short periods of time. | ||||
* | Stop sub-classing object (#8249) | Patrick Cloke | 2020-09-04 | 3 | -7/+7 |
| | |||||
* | Convert the well known resolver to async (#8214) | Patrick Cloke | 2020-09-01 | 2 | -28/+33 |
| | |||||
* | Be stricter about JSON that is accepted by Synapse (#8106) | Patrick Cloke | 2020-08-19 | 1 | -3/+2 |
| | |||||
* | Reduce INFO logging (#8050) | Erik Johnston | 2020-08-11 | 1 | -1/+1 |
| | | | | | | | | | | c.f. #8021 A lot of the code here is to change the `Completed 200 OK` logging to include the request URI so that we can drop the `Sending request...` log line. Some notes: 1. We won't log retries, which may be confusing considering the time taken log line includes retries and sleeps. 2. The `_send_request_with_optional_trailing_slash` will always be logged *without* the forward slash, even if it succeeded only with the forward slash. | ||||
* | Convert the federation agent and related code to async/await. (#7874) | Patrick Cloke | 2020-07-23 | 2 | -16/+10 |
| | |||||
* | Include a user agent in federation requests. (#7677) | Patrick Cloke | 2020-06-16 | 2 | -3/+24 |
| | |||||
* | Share SSL contexts for non-federation requests (#7094) | Richard van der Hoff | 2020-03-17 | 1 | -1/+1 |
| | | | | | | | Extends #5794 etc to the SimpleHttpClient so that it also applies to non-federation requests. Fixes #7092. | ||||
* | Remove usage of deprecated logger.warn method from codebase (#6271) | Andrew Morgan | 2019-10-31 | 1 | -1/+1 |
| | | | Replace every instance of `logger.warn` with `logger.warning` as the former is deprecated. | ||||
* | Fix well-known lookups with the federation certificate whitelist (#5997) | Amber Brown | 2019-09-14 | 1 | -1/+1 |
| | |||||
* | Remove unnecessary parentheses around return statements (#5931) | Andrew Morgan | 2019-08-30 | 1 | -1/+1 |
| | | | | | Python will return a tuple whether there are parentheses around the returned values or not. I'm just sick of my editor complaining about this all over the place :) | ||||
* | Fix off by one error in SRV result shuffling | Erik Johnston | 2019-08-27 | 1 | -8/+13 |
| | |||||
* | Fixup comments | Erik Johnston | 2019-08-23 | 1 | -1/+9 |
| | |||||
* | Fix logcontexts | Erik Johnston | 2019-08-23 | 1 | -4/+8 |
| | |||||
* | Merge branch 'develop' of github.com:matrix-org/synapse into ↵ | Erik Johnston | 2019-08-22 | 2 | -37/+115 |
|\ | | | | | | | erikj/reliable_lookups | ||||
| * | Change jitter to be a factor rather than absolute value | Erik Johnston | 2019-08-20 | 1 | -11/+12 |
| | | |||||
| * | Fixup changelog and remove debug logging | Erik Johnston | 2019-08-16 | 1 | -4/+1 |
| | | |||||
| * | Retry well known on fail. | Erik Johnston | 2019-08-15 | 2 | -34/+114 |
| | | | | | | | | | | | | 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. | ||||
* | | Remove now unused pick_server_from_list | Erik Johnston | 2019-08-20 | 1 | -30/+0 |
| | | |||||
* | | Fixup _sort_server_list to be slightly more efficient | Erik Johnston | 2019-08-20 | 1 | -2/+11 |
| | | | | | | | | | | Also document that we are using the algorithm described in RFC2782 and ensure we handle zero weight correctly. | ||||
* | | Refactor MatrixFederationAgent to retry SRV. | Erik Johnston | 2019-08-15 | 2 | -189/+202 |
|/ | | | | | | | | 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 | ||||
* | Retry well-known lookup before expiry. | Erik Johnston | 2019-08-13 | 1 | -22/+60 |
| | | | | | | | | | This gives a bit of a grace period where we can attempt to refetch a remote `well-known`, while still using the cached result if that fails. Hopefully this will make the well-known resolution a bit more torelant of failures, rather than it immediately treating failures as "no result" and caching that for an hour. | ||||
* | Make default well known cache global again. | Erik Johnston | 2019-08-13 | 1 | -1/+4 |
| | |||||
* | Move well known lookup into a separate clas | Erik Johnston | 2019-08-07 | 2 | -153/+197 |
| | |||||
* | Add a lower bound for TTL on well known results. | Erik Johnston | 2019-08-06 | 1 | -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 requests | Erik Johnston | 2019-07-31 | 1 | -11/+5 |
| | |||||
* | Replace returnValue with return (#5736) | Amber Brown | 2019-07-23 | 2 | -30/+24 |
| | |||||
* | Move logging utilities out of the side drawer of util/ and into logging/ (#5606) | Amber Brown | 2019-07-04 | 2 | -2/+2 |
| | |||||
* | Run Black. (#5482) | Amber Brown | 2019-06-20 | 2 | -60/+75 |
| | |||||
* | Config option for verifying federation certificates (MSC 1711) (#4967) | Andrew Morgan | 2019-04-25 | 1 | -1/+1 |
| | |||||
* | Minor docstring fixes for MatrixFederationAgent (#4765) | Andrew Morgan | 2019-02-28 | 1 | -1/+5 |
| | |||||
* | Merge pull request #4544 from matrix-org/rav/skip_invalid_well_known | Richard van der Hoff | 2019-02-01 | 1 | -19/+6 |
|\ | | | | | Treat an invalid .well-known the same as an absent one | ||||
| * | Treat an invalid .well-known the same as an absent one | Richard van der Hoff | 2019-02-01 | 1 | -19/+6 |
| | | | | | | | | ... basically, carry on and fall back to SRV etc. | ||||
* | | Fix b'ab' noise in logs | Richard van der Hoff | 2019-02-01 | 1 | -1/+1 |
|/ | |||||
* | Cache failures to parse .well-known | Richard van der Hoff | 2019-02-01 | 1 | -13/+43 |
| | | | | Also add a Measure block around the .well-known fetch | ||||
* | better logging for federation connections | Richard van der Hoff | 2019-01-31 | 1 | -5/+16 |
| | |||||
* | Update federation routing logic to check .well-known before SRV | Richard van der Hoff | 2019-01-31 | 1 | -5/+5 |
| | |||||
* | Merge pull request #4521 from matrix-org/rav/fed_routing/cleanups | Richard van der Hoff | 2019-01-30 | 1 | -9/+11 |
|\ | | | | | Tiny .well-known fixes | ||||
| * | fix exception text | Richard van der Hoff | 2019-01-30 | 1 | -1/+1 |
| | | |||||
| * | Also jitter the invalid cache period | Richard van der Hoff | 2019-01-30 | 1 | -9/+11 |
| | | |||||
* | | Follow redirects on .well-known (#4520) | Richard van der Hoff | 2019-01-30 | 1 | -2/+4 |
|/ | |||||
* | Add a caching layer to .well-known responses (#4516) | Richard van der Hoff | 2019-01-30 | 1 | -2/+88 |
| | |||||
* | Relax requirement for a content-type on .well-known (#4511) | Richard van der Hoff | 2019-01-29 | 1 | -20/+13 |
| | |||||
* | Implement MSC1708 (.well-known lookups for server routing) (#4489) | Richard van der Hoff | 2019-01-29 | 1 | -4/+110 |
| | |||||
* | docstrings for _RoutingResult | Richard van der Hoff | 2019-01-28 | 1 | -0/+36 |
| | |||||
* | Handle IP literals explicitly | Richard van der Hoff | 2019-01-28 | 1 | -0/+19 |
| | | | | We don't want to be doing .well-known lookups on these guys. | ||||
* | MatrixFederationAgent: factor out routing logic | Richard van der Hoff | 2019-01-28 | 1 | -18/+62 |
| | | | | This is going to get too big and unmanageable. | ||||
* | Fix idna and ipv6 literal handling in MatrixFederationAgent (#4487) | Richard van der Hoff | 2019-01-28 | 1 | -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 Hoff | 2019-01-25 | 1 | -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 record | Richard van der Hoff | 2019-01-24 | 1 | -1/+2 |
| | |||||
* | put resolve_service in an object | Richard van der Hoff | 2019-01-22 | 2 | -63/+86 |
| | | | | this makes it easier to stub things out for tests. | ||||
* | Require that service_name be a byte string | Richard van der Hoff | 2019-01-22 | 1 | -4/+4 |
| | | | | it is only ever a bytes now, so let's enforce that. | ||||
* | Kill off matrix_federation_endpoint | Richard van der Hoff | 2019-01-22 | 1 | -1/+0 |
| | | | | this thing is now redundant. | ||||
* | MatrixFederationAgent | Richard van der Hoff | 2019-01-22 | 2 | -0/+147 |
| | | | | | Pull the magic that is currently in matrix_federation_endpoint and friends into an agent-like thing | ||||
* | Refactor and bugfix for resove_service (#4427) | Richard van der Hoff | 2019-01-22 | 2 | -0/+138 |