Merge commit from fork

* Support configuring allow/deny networks

* Make the DNS cache aware of the allow/deny networks

* Allow all networks in CI

* Update GMSL

* Add missed file

---------

Co-authored-by: Till Faelligen <2353100+S7evinK@users.noreply.github.com>
This commit is contained in:
Travis Ralston 2025-01-16 11:35:50 -07:00 committed by GitHub
parent 4fb83354ca
commit e9cc37ac52
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 50 additions and 3 deletions

View file

@ -94,6 +94,8 @@ func main() {
dnsCache = fclient.NewDNSCache(
cfg.Global.DNSCache.CacheSize,
cfg.Global.DNSCache.CacheLifetime,
cfg.FederationAPI.AllowNetworkCIDRs,
cfg.FederationAPI.DenyNetworkCIDRs,
)
logrus.Infof(
"DNS cache enabled (size %d, lifetime %s)",

View file

@ -71,6 +71,10 @@ func main() {
cfg.ClientAPI.RateLimiting.Enabled = false
cfg.FederationAPI.DisableTLSValidation = false
cfg.FederationAPI.DisableHTTPKeepalives = true
// Allow allow networks when running in CI, as otherwise connections
// to other servers might be blocked when running Complement/Sytest.
cfg.FederationAPI.DenyNetworkCIDRs = []string{}
cfg.FederationAPI.AllowNetworkCIDRs = []string{}
// don't hit matrix.org when running tests!!!
cfg.FederationAPI.KeyPerspectives = config.KeyPerspectives{}
cfg.MediaAPI.BasePath = config.Path(filepath.Join(*dirPath, "media"))