|
87 | 87 | # 引导 DNS 服务器,用于解析上述加密 DNS 服务器自身的域名。 |
88 | 88 | # bootstrap_dns = ["tls://223.5.5.5"] |
89 | 89 |
|
| 90 | +# [DNS IP Preference] |
| 91 | +# Controls how Snirect selects between IPv6 and IPv4 addresses when both are available. |
| 92 | +# Requires ipv6 = true to function (IPv6 must be enabled). |
| 93 | +# |
| 94 | +# DNS IP 优选策略 |
| 95 | +# 控制 Snirect 在有 IPv6 和 IPv4 地址时如何选择。 |
| 96 | +# 需要先开启 ipv6 = true 才会生效。 |
| 97 | +[preference] |
| 98 | +# Mode: standard, fastest, ipv6, ipv4 |
| 99 | +# standard - (Default) Prefer IPv6 if available, otherwise first available |
| 100 | +# fastest - Test connection latency to all IPs and use the fastest (cached) |
| 101 | +# ipv6 - Always prefer IPv6 when available (no testing) |
| 102 | +# ipv4 - Force IPv4 only |
| 103 | +# |
| 104 | +# 模式: standard (标准), fastest (最快), ipv6 (强制v6), ipv4 (强制v4) |
| 105 | +mode = "standard" |
| 106 | + |
| 107 | +# When mode="fastest", whether to actually test latency. |
| 108 | +# If false, behaves like "standard" (no testing overhead). |
| 109 | +# |
| 110 | +# 在 fastest 模式下是否实际进行延迟测试。 |
| 111 | +# 若为 false,则退化为 standard 模式(无测试开销)。 |
| 112 | +enable_testing = true |
| 113 | + |
| 114 | +# Timeout for each connection test in milliseconds. |
| 115 | +# Lower = faster fallback, higher = more accurate. |
| 116 | +# 每个连接测试的超时时间(毫秒)。 |
| 117 | +test_timeout_ms = 500 |
| 118 | + |
| 119 | +# Test multiple IPs in parallel (true) or sequentially (false). |
| 120 | +# Parallel is faster but uses more resources. |
| 121 | +# |
| 122 | +# 并行 (true) 或 顺序 (false) 测试多个 IP。 |
| 123 | +# 并行更快但占用更多资源。 |
| 124 | +test_parallel = true |
| 125 | + |
| 126 | +# Maximum number of IPs to test per query. |
| 127 | +# Set to conserve resources when many IPs are available (e.g., CDNs). |
| 128 | +# |
| 129 | +# 每次查询最多测试的 IP 数量。 |
| 130 | +# 当可用 IP 很多时(如 CDN)可限制资源消耗。 |
| 131 | +max_test_ips = 10 |
| 132 | + |
| 133 | +# Preference cache TTL in seconds. |
| 134 | +# 0 = automatically use half of the DNS record's TTL. |
| 135 | +# Shorter TTL = adapt to network changes faster. |
| 136 | +# |
| 137 | +# 优选结果缓存时间(秒)。 |
| 138 | +# 0 = 自动使用 DNS 记录 TTL 的一半。 |
| 139 | +# 较短的 TTL 能更快适应网络变化。 |
| 140 | +cache_ttl = 300 |
| 141 | + |
| 142 | +# Maximum entries in preference cache (0 = unlimited). |
| 143 | +# PrefCache is separate from DNS cache and usually much smaller. |
| 144 | +# |
| 145 | +# 优选缓存的最大条目数 (0 = 不限制)。 |
| 146 | +# 优选缓存独立于 DNS 缓存,通常小得多。 |
| 147 | +cache_size = 5000 |
| 148 | + |
90 | 149 | # [Timeout Settings] |
91 | 150 | # Timeouts in seconds. |
92 | 151 | # |
|
0 commit comments