From db835755e01b13dcb8d33a91f57ae8f20b931c57 Mon Sep 17 00:00:00 2001 From: Rory& Date: Sun, 9 Mar 2025 17:24:34 +0100 Subject: Well known resolver work, synapse admin work --- .../WellKnownResolverConfiguration.cs | 49 ++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 LibMatrix/Services/WellKnownResolver/WellKnownResolverConfiguration.cs (limited to 'LibMatrix/Services/WellKnownResolver/WellKnownResolverConfiguration.cs') diff --git a/LibMatrix/Services/WellKnownResolver/WellKnownResolverConfiguration.cs b/LibMatrix/Services/WellKnownResolver/WellKnownResolverConfiguration.cs new file mode 100644 index 0000000..26a4c43 --- /dev/null +++ b/LibMatrix/Services/WellKnownResolver/WellKnownResolverConfiguration.cs @@ -0,0 +1,49 @@ +using System.Text.Json.Serialization; + +namespace LibMatrix.Services.WellKnownResolver; + +public class WellKnownResolverConfiguration { + /// + /// Allow transparent downgrades to plaintext HTTP if HTTPS fails + /// Enabling this is unsafe! + /// + [JsonPropertyName("allow_http")] + public bool AllowHttp { get; set; } = false; + + /// + /// Use DNS resolution if available, for resolving SRV records + /// + [JsonPropertyName("allow_dns")] + public bool AllowDns { get; set; } = true; + + /// + /// Use system resolver(s) if empty + /// + [JsonPropertyName("dns_servers")] + public List DnsServers { get; set; } = new(); + + /// + /// Same as AllowDns, but for DNS over HTTPS - useful in browser contexts + /// + [JsonPropertyName("allow_doh")] + public bool AllowDoh { get; set; } = true; + + /// + /// Use DNS over HTTPS - useful in browser contexts + /// Disabled if empty + /// + [JsonPropertyName("doh_servers")] + public List DohServers { get; set; } = new(); + + /// + /// Whether to allow fallback subdomain lookups + /// + [JsonPropertyName("allow_fallback_subdomains")] + public bool AllowFallbackSubdomains { get; set; } = true; + + /// + /// Fallback subdomains to try if the homeserver is not found + /// + [JsonPropertyName("fallback_subdomains")] + public List FallbackSubdomains { get; set; } = ["matrix", "chat", "im"]; +} \ No newline at end of file -- cgit 1.5.1