| 1 | package config |
| 2 | |
| 3 | // DNS specifies DNS resolution rules using custom resolvers. |
| 4 | type DNS struct { |
| 5 | // Resolvers is a map of FQDNs to URLs for custom DNS resolution. |
| 6 | // URLs starting with `https://` indicate DoH endpoints. |
| 7 | // Support for other resolver types can be added in the future. |
| 8 | // https://en.wikipedia.org/wiki/Fully_qualified_domain_name |
| 9 | // https://en.wikipedia.org/wiki/DNS_over_HTTPS |
| 10 | // |
| 11 | // Example: |
| 12 | // - Custom resolver for ENS: `eth.` → `https://dns.eth.limo/dns-query` |
| 13 | // - Override the default OS resolver: `.` → `https://1.1.1.1/dns-query` |
| 14 | Resolvers map[string]string |
| 15 | // MaxCacheTTL is the maximum duration DNS entries are valid in the cache. |
| 16 | MaxCacheTTL *OptionalDuration `json:",omitempty"` |
| 17 | } |