blob: 26a4c439399fc8c88617893db93e0694f7a6025d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
using System.Text.Json.Serialization;
namespace LibMatrix.Services.WellKnownResolver;
public class WellKnownResolverConfiguration {
/// <summary>
/// Allow transparent downgrades to plaintext HTTP if HTTPS fails
/// Enabling this is unsafe!
/// </summary>
[JsonPropertyName("allow_http")]
public bool AllowHttp { get; set; } = false;
/// <summary>
/// Use DNS resolution if available, for resolving SRV records
/// </summary>
[JsonPropertyName("allow_dns")]
public bool AllowDns { get; set; } = true;
/// <summary>
/// Use system resolver(s) if empty
/// </summary>
[JsonPropertyName("dns_servers")]
public List<string> DnsServers { get; set; } = new();
/// <summary>
/// Same as AllowDns, but for DNS over HTTPS - useful in browser contexts
/// </summary>
[JsonPropertyName("allow_doh")]
public bool AllowDoh { get; set; } = true;
/// <summary>
/// Use DNS over HTTPS - useful in browser contexts
/// Disabled if empty
/// </summary>
[JsonPropertyName("doh_servers")]
public List<string> DohServers { get; set; } = new();
/// <summary>
/// Whether to allow fallback subdomain lookups
/// </summary>
[JsonPropertyName("allow_fallback_subdomains")]
public bool AllowFallbackSubdomains { get; set; } = true;
/// <summary>
/// Fallback subdomains to try if the homeserver is not found
/// </summary>
[JsonPropertyName("fallback_subdomains")]
public List<string> FallbackSubdomains { get; set; } = ["matrix", "chat", "im"];
}
|