You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have read all the comments in the issue template and ensured that this issue meet the requirements.
I confirm that I have read the documentation, understand the meaning of all the configuration items I wrote, and did not pile up seemingly useful options or default values.
I provided the complete config and logs, rather than just providing the truncated parts based on my own judgment.
I searched issues and did not find any similar issues.
The problem can be successfully reproduced in the latest Release
After PR #6287, WG outbound now ignores built-in DNS server completely, and uses hard coded CloudflareDNS for ALL domain based outbounds through WG, which is a contradiction to the documentation and a regression, because the code path right now does not respect DNS caching at all (it now uses a copied DNS resolver from upstream wireguard-go library which is very basic and feature poor) and requries for every new connection for TCP and every packet for UDP!
Activity
LagPixelLOL commentedon Aug 1, 2026
cc: @LjhAUMEM @bytecategory
bytecategory commentedon Aug 1, 2026
确实,硬编码1.1.1.1等cf dns地址,无视内置dns,没有缓存,每个请求都建新连接
问题存在,找他解决吧.
bytecategory commentedon Aug 1, 2026
#6287 (comment)
以及一个很有意思的评论 也就是说你的问题在他看来是预期行为
LjhAUMEM commentedon Aug 1, 2026
我很少使用到 core 里的 dns 模块,我自己私有项目也都是这么用,如果你们认为需要恢复到用内置 dns 解析可以讨论一下
因为如果不显示写 dns 模块,core 的行为应该是本地解析完成才会进行连接,则不会触发 remote 解析
Fangliding commentedon Aug 1, 2026
怎么能硬编码一个dns 不会是ai写的时候没看到吧
LagPixelLOL commentedon Aug 1, 2026
问题是现在DNS非常有问题, 第一无法配置DNS服务器, 第二完全没有缓存, 注意每个UDP包都会来一遍DNS...
Xray内置的DNS模块本身就可以走WireGuard, 完全没必要从wireguard-go里复制一个简易的DNS模块扔到Xray里, 现在Xray里相当于有两个DNS模块...
bytecategory commentedon Aug 1, 2026
不必讨论了,评论区现在四个人有三个认为需要
LjhAUMEM commentedon Aug 1, 2026
source https://github.com/ViRb3/wgcf/blob/b0ffa9659a06f5ddefc4660f61f7d2d6f4db3348/wireguard/profile.go#L14
而且之前 wg 完全是一锅粥,懒得写 infra 配置了暂时硬编码我觉得没有什么问题
LagPixelLOL commentedon Aug 1, 2026
???
那为啥不用Xray内置DNS???
LjhAUMEM commentedon Aug 1, 2026
因为需要 json 写 "dns": {}?上面说过了
按照现在的架构改回内置 dns 很容易,重构就是推翻重来,而且之前的 dns 写法真的有点 shit
LjhAUMEM commentedon Aug 1, 2026
我还是倾向改成可配置的
当然你要改回内置的我也没什么意见,把 resolveRemote 删了其他改成 resolveLocal 就可以了 @LagPixelLOL 你有空自己开个 pr 吧
LagPixelLOL commentedon Aug 1, 2026
现在不管写不写都不会经过Xray处理, 完全不会本地解析, 都是走你硬编码的 1.1.1.1
Xray如果没看到 "dns" 会插入一个类似于 "dns": {"servers": ["localhost"]} 的代码
你在Xray DNS里配置是完全一样的
给你点个赞
我开就我开吧, 反正丢给AI我也不考虑写对了没
LjhAUMEM commentedon Aug 1, 2026
除了出站就没法配置了?路由里没法解析后走出站?
LagPixelLOL commentedon Aug 1, 2026
路由还会把域名目标替换成IP???
LjhAUMEM commentedon Aug 1, 2026
我也希望,这样当时工作量就可以少点,实际情况是20$都充不起
我记得风扇说过可以,我很少用到内置解析,入站,路由,出站,三个阶段,如果只有出站才能走内置解析会很糟糕
11 remaining items
bytecategory commentedon Aug 4, 2026
都已经是协作者了, 何必感到被胁迫呢?
Raymond520888 commentedon Aug 4, 2026
@bytecategory 这个冷笑话不错👍
bytecategory commentedon Aug 4, 2026
肌肉被冻伤笑不出来了.
WireGuard outbound: Add `remoteDNS` & honor TTL (XTLS#6620)
Meo597 commentedon Sep 13, 2026
更新 domainStrategy/targetStrategy 文档的时候被 WG 给干宕机了
耦合在一起了
个人感觉 wg.ds 删了好,还干净点,内层用 ts 控制,服务器用 sockopt.ds 控制各干各的
wg 里的 dns 作为兜底,根据 wg.settings.address 来决定偏好,用户不可配置
如果想要偏好就自己配置 targetStrategy
LjhAUMEM commentedon Sep 13, 2026
等等,targetStrategy?所以是有办法控制内层解析的,那当初我加个 der local 啊
这样看来确实是可以删了,内外都有自己的 ds,
当初我辩论的时候怎么没人提醒我有 targetStrategy...LjhAUMEM commentedon Sep 13, 2026
真正该删的 resolveLocal,这两天会开 pr,
有人替我开了也行哦不对,如果是 multi peer 只有第一个 peer 会走 sockopt.ds,resolveLocal 还是需要
Meo597 commentedon Sep 13, 2026
偷看 sockopt.ds?反正 freedom 也这么干了LjhAUMEM commentedon Sep 13, 2026
也行,这样倒是可以把 ds 清了,两种 resolve 只能都先保留,remote 的 ds 改用 wg-go 的默认行为,如果要控制就配置 targetStrategy
当初就应该这样回复,damnMeo597 commentedon Sep 14, 2026
wg 文档重构了下,这样 ok 不
有亿点点复杂RPRX commentedon Sep 14, 2026
@Meo597 文档还是得写一下那个新参数吧,至少能控制远程解析的 DNS IP,远程解析也是这种出站的默认选择
LjhAUMEM commentedon Sep 14, 2026
要控制有更上层的选择,#6620 我会加 local 是因为之前不知道有 targetStrategy,local 将会被删掉
Meo597 commentedon Sep 14, 2026
计划等 @LjhAUMEM 解耦内外层解析策略之后加
不然文档还得改WireGuard outbound: Remove `remoteDNS`' "local" mode and `domainStrat…