mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-04 04:44:53 -04:00
Use direct references for configuration variables (part 6). (#10916)
This commit is contained in:
parent
8cef1ab2ac
commit
94b620a5ed
54 changed files with 141 additions and 132 deletions
|
@ -327,23 +327,23 @@ class MatrixFederationHttpClient:
|
|||
self.reactor = hs.get_reactor()
|
||||
|
||||
user_agent = hs.version_string
|
||||
if hs.config.user_agent_suffix:
|
||||
user_agent = "%s %s" % (user_agent, hs.config.user_agent_suffix)
|
||||
if hs.config.server.user_agent_suffix:
|
||||
user_agent = "%s %s" % (user_agent, hs.config.server.user_agent_suffix)
|
||||
user_agent = user_agent.encode("ascii")
|
||||
|
||||
federation_agent = MatrixFederationAgent(
|
||||
self.reactor,
|
||||
tls_client_options_factory,
|
||||
user_agent,
|
||||
hs.config.federation_ip_range_whitelist,
|
||||
hs.config.federation_ip_range_blacklist,
|
||||
hs.config.server.federation_ip_range_whitelist,
|
||||
hs.config.server.federation_ip_range_blacklist,
|
||||
)
|
||||
|
||||
# Use a BlacklistingAgentWrapper to prevent circumventing the IP
|
||||
# blacklist via IP literals in server names
|
||||
self.agent = BlacklistingAgentWrapper(
|
||||
federation_agent,
|
||||
ip_blacklist=hs.config.federation_ip_range_blacklist,
|
||||
ip_blacklist=hs.config.server.federation_ip_range_blacklist,
|
||||
)
|
||||
|
||||
self.clock = hs.get_clock()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue