aboutsummaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorTravis Ralston <travisr@matrix.org>2025-01-16 11:35:50 -0700
committerGitHub <noreply@github.com>2025-01-16 19:35:50 +0100
commite9cc37ac52ff1611ddf055a95e65869806041038 (patch)
tree34026f77a95248d3cd8f920426f6855d44e35c06 /cmd
parent4fb83354ca37c53e33b58dc5aa318a996cf8bd61 (diff)
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>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/dendrite/main.go2
-rw-r--r--cmd/generate-config/main.go4
2 files changed, 6 insertions, 0 deletions
diff --git a/cmd/dendrite/main.go b/cmd/dendrite/main.go
index da43432f..5badbda2 100644
--- a/cmd/dendrite/main.go
+++ b/cmd/dendrite/main.go
@@ -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)",
diff --git a/cmd/generate-config/main.go b/cmd/generate-config/main.go
index c6399ec5..63e1dde7 100644
--- a/cmd/generate-config/main.go
+++ b/cmd/generate-config/main.go
@@ -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"))