Mozilla 的公共后缀——它是否包含_所有_当前可用的 LTD?
Mozilla's publicsuffix -- does it contains _all_ currently available LTD's?
有一个 Mozilla 的项目“https://publicsuffix.org/”。我认为它会对我想要验证 URI 的图书馆派上用场,尤其是 ltd 部分。 publicsuffix 是否包含 word 中所有可能的 ltd,这些 ltd 当前可在 Internet 上找到并且始终是最新的?可以用于生产吗?
请注意,我的问题不是关于向我推荐用于验证 URI 的库或服务。
请注意您刚刚链接到的站点上的文档中的这一部分:
Some people use the PSL to determine what is a valid domain name and
what isn't. This is dangerous, particularly in these days where new
gTLDs are arriving at a rapid pace, if your software does not
regularly receive PSL updates, because it will erroneously think new
gTLDs are not valid. The DNS is the proper source for this
information. If you must use it for this purpose, please do not bake
static copies of the PSL into your software with no update mechanism.
你的问题几乎是 "no",或者至少是 "maybe, if you're really careful"。
如果您想要所有当前 TLD 的列表,https://data.iana.org/TLD/tlds-alpha-by-domain.txt 有一个权威列表(它与根区域一起更新)。
有一个 Mozilla 的项目“https://publicsuffix.org/”。我认为它会对我想要验证 URI 的图书馆派上用场,尤其是 ltd 部分。 publicsuffix 是否包含 word 中所有可能的 ltd,这些 ltd 当前可在 Internet 上找到并且始终是最新的?可以用于生产吗?
请注意,我的问题不是关于向我推荐用于验证 URI 的库或服务。
请注意您刚刚链接到的站点上的文档中的这一部分:
Some people use the PSL to determine what is a valid domain name and what isn't. This is dangerous, particularly in these days where new gTLDs are arriving at a rapid pace, if your software does not regularly receive PSL updates, because it will erroneously think new gTLDs are not valid. The DNS is the proper source for this information. If you must use it for this purpose, please do not bake static copies of the PSL into your software with no update mechanism.
你的问题几乎是 "no",或者至少是 "maybe, if you're really careful"。
如果您想要所有当前 TLD 的列表,https://data.iana.org/TLD/tlds-alpha-by-domain.txt 有一个权威列表(它与根区域一起更新)。