Web应用程序客户端DNS服务器检测

发布于 2024-08-07 08:36:47 字数 133 浏览 1 评论 0原文

在 opendns.org 网站上,其内容会根据您是否使用其 DNS 服务器而变化。如果您不这样做,则会提示用户更改其 DNS 设置。如果您的计算机设置为使用其 DNS 服务器,则标注是用于管理您的设置的链接。他们如何检测客户端 DNS 服务器的设置?

On the opendns.org website, their content changes based on if you are using their DNS servers or not. If you are not, then there is a callout to the user to change their DNS settings. If your machine is setup to use their DNS servers then the callout is a link to manage your settings. How are they able to detect what the client's DNS servers are set to?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

丶视觉 2024-08-14 08:36:47

目前可在 https://gdns.re/edns-demo 获取方法和演示。

用我的话说:

  • 他们托管一个权威的 DNS 服务器
  • 他们让您的浏览器解析由他们的 DNS 服务器管理的新的唯一域名
  • DNS 服务器的 IP 相关联
  • 您的递归 DNS 服务器找到他们的 DNS 服务器,并将请求的域名与您浏览器的 连接到已解析的域,并告诉它主机标头中的唯一域名,
  • 它们检索与唯一域名关联的 IP,并做出适当的响应

A method and a demo are currently available at https://gdns.re/edns-demo.

In my words:

  • they host an authoritative DNS server
  • they make your browser resolve a new unique domain name managed by their DNS server
  • your recursive DNS server finds their DNS server, and they associate the requested domain name with the IP of your DNS server
  • your browser connects to the resolved domain, and tells it the unique domain name in the Host header
  • they retrieve the IP associated with the unique domain name, and respond appropriately
淑女气质 2024-08-14 08:36:47

没有办法专门找出客户端的 DNS 服务器。但是,您确实拥有客户端 IP。这样,您就可以检查它是否在您拥有的数据库中(正如 Brian 指出的那样),如果它不在数据库中,您仍然可以将 IP 解析为主机名,并查找该域的名称服务器。这是可以找出的两种方法 - 这与积极检测略有不同。

There isn't a way to find out the client's DNS server specifically. However, you do have the clients IP. With that you can check if it's in a database that you have - as Brian pointed out - and if it's not in there you could still resolve the IP to a host name and lookup what the name servers are for that domain. These are the two ways that it could be figured out - which is slightly different than positively detected.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文