Skip to content

dns ​

在 UDP/TCP 上回答 mayami DNS 规则生成的响应。

yaml
inbounds:
  resolver:
    type: dns
    listen: 127.0.0.1:5353

dns:
  servers:
    default: {type: udp, address: 127.0.0.1:53}
  final: default

字段 ​

type ​

  • 类型:字符串。
  • 必填:是,第一项。
  • 取值:dns。

listen ​

  • 类型:SocketAddr。
  • 必填:是。
  • 取值:IP:port。

公共监听字段 interface、TCP keepalive、MPTCP、拥塞控制和 proxy_protocol 可用,见 入站总览。network、udp_timeout、full_cone 对 DNS 不生效并会被拒绝。transport 和 fallback 也没有意义。

说明 ​

这个入站只负责“问到路由器的 DNS”。系统 DNS 服务器、规则、FakeIP 和上游仍在顶层 dns 配置中。DNS 同时处理 UDP 与 TCP;其他协议的包不会交给它。

相关 ​

页面历史

开发者设计、代码地图和验证记录保留在仓库 manual/。