Files
interzone/internal/config/rust_test.go
T
vvvomitandClaude Opus 5.5 ae491ea858 Rust homeservers federate on 443; Tuwunel's own login
Conduit, Continuwuity and Tuwunel serve federation through the client
API router on 443: matrix_federation_public_port is 443 and their
separate federation router is off, so Traefik no longer opens 8448 and
the server check stops asking for it.

Tuwunel gets oidc_native_auth, its built-in OAuth login and sign-up page
(it needs the client well-known, so only with HTTPS). Continuwuity's
built-in OAuth is already on by default; Conduit has none.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 01:35:13 +03:30

28 lines
886 B
Go

package config
import (
"strings"
"testing"
)
func TestRustFederationOn443(t *testing.T) {
for _, hs := range []string{"conduit", "continuwuity", "tuwunel", "synapse"} {
c := Default()
c.Domain, c.Homeserver = "example.org", hs
y := c.VarsYAML("v1", "", "")
on := strings.Contains(y, "matrix_federation_public_port: 443\n") &&
strings.Contains(y, "matrix_"+hs+"_container_labels_public_federation_api_enabled: false\n")
if on == (hs == "synapse") {
t.Errorf("%s: 443 %v", hs, on)
}
if sso := strings.Contains(y, "TUWUNEL_OIDC_NATIVE_AUTH=true"); sso != (hs == "tuwunel") {
t.Errorf("%s: native login %v", hs, sso)
}
}
c := Default()
c.Domain, c.Homeserver, c.SSL.Mode = "example.org", "tuwunel", "none"
if strings.Contains(c.VarsYAML("v1", "", ""), "OIDC_NATIVE") {
t.Error("native login without HTTPS, where it has no well-known to work from")
}
}