publicsuffix: regenerate table

Updated to revision 2c960dac3d39ba521eb5db9da192968f5be0aded
(2025-03-18T07:22:13Z).
Last updated on 2023-08

xn--czrw28b.tw / 商業.tw was removed in https://github.com/publicsuffix/list/pull/2289
blogspot ccTLDs were removed in https://github.com/publicsuffix/list/pull/2327

Change-Id: I749d014ab667502d9a112e0be645413ec6a7a66e
Reviewed-on: https://go-review.googlesource.com/c/net/+/659276
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This commit is contained in:
Sean Liao
2025-03-20 00:07:43 +00:00
parent 12150816f7
commit 1f1fa29e0a
8 changed files with 3258 additions and 1856 deletions

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

View File

@@ -42,7 +42,6 @@ func ExamplePublicSuffix_manager() {
"foo.org",
"foo.co.uk",
"foo.dyndns.org",
"foo.blogspot.co.uk",
"cromulent",
}
@@ -88,6 +87,5 @@ func ExamplePublicSuffix_manager() {
// > foo.org org is ICANN Managed
// > foo.co.uk co.uk is ICANN Managed
// > foo.dyndns.org dyndns.org is Privately Managed
// > foo.blogspot.co.uk blogspot.co.uk is Privately Managed
// > cromulent cromulent is Unmanaged
}

View File

@@ -77,7 +77,7 @@ func (list) String() string {
// privately managed domain (and in practice, not a top level domain) or an
// unmanaged top level domain (and not explicitly mentioned in the
// publicsuffix.org list). For example, "foo.org" and "foo.co.uk" are ICANN
// domains, "foo.dyndns.org" and "foo.blogspot.co.uk" are private domains and
// domains, "foo.dyndns.org" is a private domain and
// "cromulent" is an unmanaged top level domain.
//
// Use cases for distinguishing ICANN domains like "foo.com" from private

View File

@@ -63,12 +63,11 @@ func TestFind(t *testing.T) {
func TestICANN(t *testing.T) {
testCases := map[string]bool{
"foo.org": true,
"foo.co.uk": true,
"foo.dyndns.org": false,
"foo.go.dyndns.org": false,
"foo.blogspot.co.uk": false,
"foo.intranet": false,
"foo.org": true,
"foo.co.uk": true,
"foo.dyndns.org": false,
"foo.go.dyndns.org": false,
"foo.intranet": false,
}
for domain, want := range testCases {
_, got := PublicSuffix(domain)
@@ -111,16 +110,12 @@ var publicSuffixTestCases = []struct {
// net.ar
// org.ar
// tur.ar
// blogspot.com.ar (in the PRIVATE DOMAIN section).
{"ar", "ar", true},
{"www.ar", "ar", true},
{"nic.ar", "ar", true},
{"www.nic.ar", "ar", true},
{"com.ar", "com.ar", true},
{"www.com.ar", "com.ar", true},
{"blogspot.com.ar", "blogspot.com.ar", false}, // PRIVATE DOMAIN.
{"www.blogspot.com.ar", "blogspot.com.ar", false}, // PRIVATE DOMAIN.
{"www.xxx.yyy.zzz.blogspot.com.ar", "blogspot.com.ar", false}, // PRIVATE DOMAIN.
{"logspot.com.ar", "com.ar", true},
{"zlogspot.com.ar", "com.ar", true},
{"zblogspot.com.ar", "com.ar", true},
@@ -170,20 +165,13 @@ var publicSuffixTestCases = []struct {
// game.tw
// ebiz.tw
// club.tw
// 網路.tw (xn--zf0ao64a.tw)
// 組織.tw (xn--uc0atv.tw)
// 商業.tw (xn--czrw28b.tw)
// blogspot.tw
// 台灣.tw (xn--kpry57d.tw)
{"tw", "tw", true},
{"aaa.tw", "tw", true},
{"www.aaa.tw", "tw", true},
{"xn--czrw28b.aaa.tw", "tw", true},
{"edu.tw", "edu.tw", true},
{"www.edu.tw", "edu.tw", true},
{"xn--czrw28b.edu.tw", "edu.tw", true},
{"xn--czrw28b.tw", "xn--czrw28b.tw", true},
{"www.xn--czrw28b.tw", "xn--czrw28b.tw", true},
{"xn--uc0atv.xn--czrw28b.tw", "xn--czrw28b.tw", true},
{"xn--kpry57d.tw", "tw", true},
// The .uk rules are:
@@ -199,7 +187,6 @@ var publicSuffixTestCases = []struct {
// plc.uk
// police.uk
// *.sch.uk
// blogspot.co.uk (in the PRIVATE DOMAIN section).
{"uk", "uk", true},
{"aaa.uk", "uk", true},
{"www.aaa.uk", "uk", true},
@@ -210,9 +197,6 @@ var publicSuffixTestCases = []struct {
{"www.sch.uk", "www.sch.uk", true},
{"co.uk", "co.uk", true},
{"www.co.uk", "co.uk", true},
{"blogspot.co.uk", "blogspot.co.uk", false}, // PRIVATE DOMAIN.
{"blogspot.nic.uk", "uk", true},
{"blogspot.sch.uk", "blogspot.sch.uk", true},
// The .рф rules are
// рф (xn--p1ai)
@@ -322,10 +306,10 @@ func TestNumICANNRules(t *testing.T) {
// Check the last ICANN and first Private rules. If the underlying public
// suffix list changes, we may need to update these hard-coded checks.
if got, want := rules[numICANNRules-1], "zuerich"; got != want {
t.Errorf("last ICANN rule: got %q, wawnt %q", got, want)
t.Errorf("last ICANN rule: got %q, want %q", got, want)
}
if got, want := rules[numICANNRules], "cc.ua"; got != want {
t.Errorf("first Private rule: got %q, wawnt %q", got, want)
if got, want := rules[numICANNRules], "co.krd"; got != want {
t.Errorf("first Private rule: got %q, want %q", got, want)
}
}

View File

@@ -4,7 +4,7 @@ package publicsuffix
import _ "embed"
const version = "publicsuffix.org's public_suffix_list.dat, git revision 63cbc63d470d7b52c35266aa96c4c98c96ec499c (2023-08-03T10:01:25Z)"
const version = "publicsuffix.org's public_suffix_list.dat, git revision 2c960dac3d39ba521eb5db9da192968f5be0aded (2025-03-18T07:22:13Z)"
const (
nodesBits = 40
@@ -26,7 +26,7 @@ const (
)
// numTLD is the number of top level domains.
const numTLD = 1474
const numTLD = 1454
// text is the combined text of all labels.
//
@@ -63,8 +63,8 @@ var nodes uint40String
//go:embed data/children
var children uint32String
// max children 743 (capacity 1023)
// max text offset 30876 (capacity 65535)
// max children 870 (capacity 1023)
// max text offset 31785 (capacity 65535)
// max text length 31 (capacity 63)
// max hi 9322 (capacity 16383)
// max lo 9317 (capacity 16383)
// max hi 10100 (capacity 16383)
// max lo 10095 (capacity 16383)

File diff suppressed because it is too large Load Diff