-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat: add queryStrategy option for DNS #794
Conversation
根据 #749 的建议,重新实现。复原了 V2Ray 原本的接口。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! This is what I think is the best way to make sure that unseen codes won't break because of the modification of API. Unlike gRPC API, changing interface in Go is usually breaking, which should be avoid whenever possible.
@yuhan6665 @CalmLong 能否帮忙测试一下这个 PR 在 Android 上使用 FakeDNS 有没有 bug?我身边没有 Android 机 😂 |
@Loyalsoldier seems ok. |
我还没研究过FakeDNS😓主要是用不到。。 |
你测试了吗?我主要是不确定在 Android 手机上 FakeDNS 能不能跟 #696 保持一致,忽略 freedom outbound 和路由。 |
这条 commit 貌似会导致 fakedns 失效,无论我是否设置 queryStrategy 及设置 "UseIP" 、 "UseIPv4" ,fakedns 都无法对匹配的域名给出解析。 配置如下{
"log": {
"loglevel": "warning"
},
"dns": {
"disableCache": true,
"servers": [
"fakedns"
]
},
"inbounds": [
{
"listen": "0.0.0.0",
"port": 60080,
"protocol": "dokodemo-door",
"settings": {
"address": "",
"followRedirect": true,
"network": "tcp,udp",
"port": 0,
"timeout": 0
},
"sniffing": {
"destOverride": [
"fakedns"
],
"enabled": true,
"metadataOnly": true
},
"streamSettings": {
"sockopt": {
"tproxy": "tproxy"
}
},
"tag": "tproxy_IN"
}
],
"outbounds": [
{
"protocol": "vless",
"sendThrough": "0.0.0.0",
"settings": {
"vnext": [
{
"address": "",
"port": 443,
"users": [
{
"encryption": "none",
"id": ""
}
]
}
]
},
"streamSettings": {
"network": "ws",
"security": "tls",
"tlsSettings": {
"serverName": ""
},
"wsSettings": {
"headers": {
"Host": ""
},
"path": ""
}
},
"tag": "proxy"
},
{
"protocol": "freedom",
"tag": "DIRECT"
},
{
"protocol": "blackhole",
"tag": "BLACKHOLE"
},
{
"protocol": "dns",
"tag": "dns-out"
}
],
"routing": {
"domainMatcher": "mph",
"domainStrategy": "AsIs",
"rules": [
{
"inboundTag": [
"tproxy_IN"
],
"outboundTag": "dns-out",
"port": "53",
"type": "field"
},
{
"ip": [
"geoip:private"
],
"outboundTag": "DIRECT",
"type": "field"
},
{
"domain": [
"geosite:category-ads-all"
],
"outboundTag": "BLACKHOLE",
"type": "field"
},
{
"ip": [
"geoip:cn"
],
"outboundTag": "DIRECT",
"type": "field"
},
{
"domain": [
"geosite:cn"
],
"outboundTag": "DIRECT",
"type": "field"
}
]
}
} |
@sixg0000d 提 issue |
系统 win10,具有v4,v6 双地址。 系统 ping google.com 时,会显示 v2 dns设置 |
Fixes #482
Fixes #297