Conversation
|
“直接转发给目标”的描述应改为“直接转发回客户端” 还有示例配置的 |
|
|
|
还是说 DNS 请求也有个 rcode?没研究过,我以为这东西意思是 error code,DNS 响应才有的 |
我看文档里"nonIPQuery": "skip"写的是转发给目标,这PR就是同样的功能 |
|
@RPRX 具体功能是 内置DNS服务器 IP查询 失败时根据指定的RCode,重新将IP查询转发给目标 |
|
现有命名确实太迷惑了,而且我还寻思 DNS 出站本来就没阻止发回 rcode 为啥还要 skip,你这个功能大概可以叫 fallback 什么的 |
|
connWriter是远程conn的writer |
其实我也觉得,不过有人 PR 且设计得当、可能能 cover 更多需求的话还好 |
就是为了这个,用了TProxy透明代理后我发现 使用smb访问电脑共享文件时 xray日志里有 .lan 后缀的查询 |
|
那正确的解决办法不应该是把localhost dns展开成一个复杂dns服务器配置然后让它匹配.lan域名吗 |
@RPRX @Fangliding 你们专业,你们决定命名再改吧。 |
|
i don't understand this PR. It's just enough to set: |
直接localhost就可以,但在Android 使用ndk编译的xray net.LookupIP()调用的内核查询?查询流量的gid是0,不是xray运行的gid,所以就搞了这个PR的功能 |
|
in android we can bypass an app from using VPN, |
Is the DNS query traffic in the Android system initiated by the kernel? Because the traffic has gid=0, I can only hijack port 53 with gid=0 |
I don't use v2rayNG. I use TProxy to implement transparent proxy. Some applications in China will detect VPNs. |
|
?? but we need root-access for transparent proxy on android, anyway I just knew about v2rayNG. |
|
related historical work: |
|
|
Use go-resolver instead of cgo-resolver: #4312 Just you to need to set |
|
Is the problem solved after using go-resolver? |
The following answer comes from gemini deep research:
|
|
No, in windows even if we set CGO_ENABLED=0, it still does not use go-resolver, i tested before. |
No, query traffic is still gid=0 |
so it seems this pr is the only way. |
|
非刚需功能,先关闭PR了,有人需要再开 |
控制内置DNS服务器 IP查询 失败返回的RCode,重新将IP查询转发给目标
https://xtls.github.io/config/outbounds/dns.html#outboundconfigurationobject
{ "outbounds": [ { "protocol": "dns", "settings": { "skipRcodes": [2] }, "tag": "dns-out" } ], "dns": { "hosts": { "domain:lan": "#2" } } }> nslookup pc.lan 192.168.0.1 Server: 192.168.0.1 Address: 192.168.0.1#53 Name: pc.lan Address: 192.168.0.99