Skip to content

WireGuard outbound: Add remoteDNS & honor TTL - #6620

Merged
RPRX merged 3 commits into
XTLS:mainfrom
LjhAUMEM:wg-dns
Aug 25, 2026
Merged

RPRX merged 3 commits into
XTLS:mainfrom
LjhAUMEM:wg-dns

Conversation

@LjhAUMEM

Copy link
Copy Markdown
Contributor

本来还在犹豫要不要加 local mode,但是翻了一下好像除了 sniff 客户端确实就没有其他办法控制内层解析,那还是加吧

  • add remoteDNS
  • honor TTL

@LjhAUMEM

Copy link
Copy Markdown
Contributor Author

以防有人拿这点攻击,先打个评论

没有在 tnet 设置 cache 而给全局设置是故意的,一来是简洁,二来是如果之后实现 dns client 复用,则 tnet dns 部分可以删除
不显示指定 local 情况下唯一会用 local 的地方就只有 peer endpoint 上,这也符合代理出站只有自身连接目标才走 local 情况
再具体点就是只有 engage.cloudflareclient.com 这类可能会撞 cache,而如果 peer ep 填的 ip 则可忽略

@ranthe21

Copy link
Copy Markdown
Contributor

This is much needed for WireGuard outbound to work properly with a domain endpoint and private DNS addresses like famous VPN providers set.

@RPRX RPRX changed the title wireguard: add remoteDNS & honor TTL WireGuard outbound: Add remoteDNS & honor TTL Aug 25, 2026
@RPRX
RPRX merged commit c7e569b into XTLS:main Aug 25, 2026
40 checks passed
@LjhAUMEM LjhAUMEM mentioned this pull request Sep 14, 2026
5 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants