gpt4 book ai didi

android - 如何在 Android 浏览器地址栏中启用 mDNS 支持

转载 作者:塔克拉玛干 更新时间:2023-11-01 21:47:02 30 4
gpt4 key购买 nike

如何在 Android Chrome 浏览器地址栏中获取 mDNS 名称 (test.local) 解析为 ip 地址?

在 Windows 中安装 Bonjour 服务后,它可以在 Chrome 浏览器中运行。有没有类似的服务可以在Android中激活。

在像 (zeroConfig) 这样的 Android 应用程序中,mDNS 解析是可能的。我读到可以使用 NSD 服务编写应用程序。但是安卓的Chrome浏览器好像没有这种支持。

我正在开发一个 Iot(物联网)Web 应用程序,mDNS 服务将使我的工作和其他像我一样的人更加轻松。

最佳答案

在这里查看答案:https://android.stackexchange.com/questions/49188/how-to-get-mdns-working-for-chrome-on-android

natevw 的回答:

I don't think so.

The system DNS resolver in Apple's platforms has in-built support for mDNS, so that pretty much any app eventually winds up using the core getaddrinfo function and supporting mDNS in URLs and hostnames and whatnot.

On Android and other platforms, even if there is a Multicast DNS daemon running and libraries available for using it, "typical" DNS lookups do not. So while recent Android releases do give developers some mDNS features as part of the platform, most do not go out of their way (as they would need to do) to use them.

It's a bummer, but AFAIK there's nothing short of rolling your own custom Android build (or convincing Google to change it) that could really solve this.

关于android - 如何在 Android 浏览器地址栏中启用 mDNS 支持,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30449988/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com