在 URI 语法中支持 Zeroconf 的最佳方式?

发布于 2024-08-07 20:48:44 字数 202 浏览 6 评论 0原文

在 URI 设计的位置段中支持 Zeroconf 名称的最佳方式是什么?

RFC 3986(统一资源标识符(URI):通用语法)没有提到 Zeroconf,我担心 URI 语法的设计不能超越 DNS 解析。

理想的答案语法将:

  1. 符合通用 URI 语法
  2. 处理具有多字节字符的 Zeroconf 名称

what is the best way to support zeroconf names in the location segment of a URI design?

RFC 3986 (Uniform Resource Identifier (URI): Generic Syntax) makes no mention of zeroconf and i fear the URI syntax is not designed to work beyond DNS resolution.

the ideal answer syntax will:

  1. conform to the generic URI syntax
  2. handle zeroconf names with multi-byte characters

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

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

发布评论

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

评论(3

梦醒时光 2024-08-14 20:48:44

以下是一些选项:

dnssd://local/_printer._tcp/Fancy printer/
dnssd://Fancy printer._printer._tcp.local

这些字符串是 IRI,而不是 URI,以解决 i18n 问题。

Here are some options:

dnssd://local/_printer._tcp/Fancy printer/
dnssd://Fancy printer._printer._tcp.local

These strings are IRIs, not URIs, in order to address i18n issues.

冰雪之触 2024-08-14 20:48:44

嵌套 URI 是另一种向后兼容的方法。嵌套 URI 定义与 Zeroconf 等发现协议一起使用的位置。

请参阅“嵌套统一资源标识符”manuel urena 和 david larrabeiti,

但是我没有发现这种方法被广泛使用的证据。

a nested URI is another approach that is backward compatible. a nested URI defines the location for use with discovery protocols like zeroconf.

see 'nested uniform resource identifiers' manuel urena and david larrabeiti

however i dont find evidence this approach in is wide use.

是伱的 2024-08-14 20:48:44

通用资源标识符是定位资源的通用方法。对于国际化,您可能需要检查 IRI,它几乎相同,但允许完全兼容 Unicode。它没有提到 Zeroconf 的原因是 URI 是一个通用协议。 Zeroconf 可以使用 URI 作为其协议的一部分进行发现,但 URI 永远不会在其协议中使用特定的实现(您也不会在那里找到 ftp:、https:、mailto:、skype: 等)

Zeroconf 是一种自动协议配置您的网络并发现可用的服务。它由三部分组成,地址选择(IPv4/6的一部分)、名称解析(mDNS)和服务发现(UPnP(微软)、DNS-SD(苹果))。现代操作系统开箱即用地支持所有这些。

如果我们采用 UPnP,则发现是基于 URI iirc 完成的。返回的信息以 XML 形式给出。 XML 可以是任何 Unicode 编码。如果您是设备驱动程序制造商,则可以在其中放置任何字符。最后阶段可能是演示,它是一个 URL,但它是可选的。

URI / URL 都支持国际化字符,但仅转义,不在域名部分。

——阿贝尔——

A universal resource identifier is a generic way to locate a resource. For internationalization, you may want to check on IRI, which is almost the same, but allows for full Unicode compatibility. The reason that it doesn't mention Zeroconf is that URI is a generalized protocol. Zeroconf may use URIs are part of its protocol for discovery, but URI will never use specific implementation in its protocol (you won't find ftp:, https:, mailto:, skype: etc in there either)

Zeroconf is a protocol to automatically configure your network and discover available services. It consists of three parts, address selection (part of IPv4/6), name resolution (mDNS) and service discovery (UPnP (Microsoft), DNS-SD (Apple)). Modern operating systems support all of this out of the box.

If we take UPnP, the discovery is done based on a URI, iirc. The returned information is given in XML. XML can be any Unicode encoding. If you're a device driver manufacturer, you can place any character in there. The final phase may be presentation, which is a URL but that's optional.

A URI / URL both support internationalized characters, but only escaped and not in the domain name part.

-- Abel --

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