mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-06 12:45:03 -04:00
Default to blacklisting reserved IP ranges and add a whitelist. (#8870)
This defaults `ip_range_blacklist` to reserved IP ranges and also adds an `ip_range_whitelist` setting to override it.
This commit is contained in:
parent
6ff34e00d9
commit
344ab0b53a
10 changed files with 172 additions and 89 deletions
|
@ -370,10 +370,11 @@ class HomeServer(metaclass=abc.ABCMeta):
|
|||
def get_proxied_blacklisted_http_client(self) -> SimpleHttpClient:
|
||||
"""
|
||||
An HTTP client that uses configured HTTP(S) proxies and blacklists IPs
|
||||
based on the IP range blacklist.
|
||||
based on the IP range blacklist/whitelist.
|
||||
"""
|
||||
return SimpleHttpClient(
|
||||
self,
|
||||
ip_whitelist=self.config.ip_range_whitelist,
|
||||
ip_blacklist=self.config.ip_range_blacklist,
|
||||
http_proxy=os.getenvb(b"http_proxy"),
|
||||
https_proxy=os.getenvb(b"HTTPS_PROXY"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue