关于dns配置的改进建议
#5260
Replies: 1 comment 4 replies
-
最新v6.46已经把 |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
在sing-box DNS设置里导入默认配置时在每一个server里有“ipv4_only“的strategy,但是在v2rayN生成的配置文件里VPS地址的解析却没继承”local“的策略,默认是udp且是ipv4和ipv6双栈,这就造成不使用ipv6的vps会解析出ipv6地址,可能造成outbound优先连接ipv6影响使用,我就因为没有使用ipv6,看到log里解析出了双栈ip,这样只有自己修改dns配置,将stategy作为全局策略来屏蔽ipv6的解析,但其他跟我类似的朋友有可能没注意此点,可能会影响实际体验,我改动后系统生成的配置如下:
"dns": {
"servers": [
{
"tag": "local_local",
"address": "223.5.5.5",
"detour": "direct"
},
{
"tag": "remote",
"address": "tls://149.112.112.112",
"detour": "proxy"
},
{
"tag": "local",
"address": "tls://223.5.5.5",
"detour": "direct"
},
{
"tag": "block",
"address": "rcode://success"
}
],
"rules": [
{
"server": "local_local",
"domain": [
"VPS域名"
]
},
{
"server": "block",
"rule_set": [
"geosite-category-ads-all"
]
},
{
"server": "remote",
"rule_set": [
"geosite-geolocation-!cn"
]
},
{
"server": "local",
"rule_set": [
"geosite-cn",
"geosite-geolocation-cn"
]
}
],
"final": "remote",
"strategy": "ipv4_only"
},
第一个”local_local“server是系统生成的,可以看见它没有跟下面”local“的server保持一致。我只有通过全局设置保持所有的server解析都是ipv4_only。
Beta Was this translation helpful? Give feedback.
All reactions