Add Migadu domain admin with shared lists, compaction, and safer apply.

Build the Go API and React UI for managing domain denylist/allowlist/recipient
deny and spam settings, plus shared lists that import/apply across domains with
wildcard compaction, entry verification, and Migadu-friendly list encoding
(including per-domain recipient filtering and rejection bisect on apply).
This commit is contained in:
2026-07-26 21:50:26 +02:00
parent 930f1f7b69
commit a79cb61104
55 changed files with 7600 additions and 1 deletions
+25
View File
@@ -0,0 +1,25 @@
package config
import (
"net"
"testing"
)
func TestIsTrustedProxy(t *testing.T) {
cfg := &Config{}
networks, err := parseCIDRs("10.0.0.0/8,127.0.0.1")
if err != nil {
t.Fatal(err)
}
cfg.TrustedProxies = networks
if !cfg.IsTrustedProxy(net.ParseIP("10.1.2.3")) {
t.Fatal("expected 10.1.2.3 trusted")
}
if !cfg.IsTrustedProxy(net.ParseIP("127.0.0.1")) {
t.Fatal("expected 127.0.0.1 trusted")
}
if cfg.IsTrustedProxy(net.ParseIP("192.168.1.1")) {
t.Fatal("expected 192.168.1.1 untrusted")
}
}