go.net/publicsuffix: update table to latest list from publicsuffix.org.

LGTM=dr.volker.dobler
R=dr.volker.dobler
CC=golang-codereviews
https://golang.org/cl/116080045
This commit is contained in:
Nigel Tao
2014-07-23 16:43:57 +10:00
parent bf13cf4eb0
commit 2d7673cde2
4 changed files with 7799 additions and 7366 deletions

View File

@@ -13,11 +13,10 @@ package main
// go run gen.go -version "xxx" -test >table_test.go
//
// The version is derived from information found at
// http://mxr.mozilla.org/mozilla-central/source/netwerk/dns/effective_tld_names.dat
// which is linked from http://publicsuffix.org/list/.
// https://hg.mozilla.org/mozilla-central/log/tip/netwerk/dns/effective_tld_names.dat
//
// To fetch a particular hg revision, such as 05b11a8d1ace, pass
// -url "http://hg.mozilla.org/mozilla-central/raw-file/05b11a8d1ace/netwerk/dns/effective_tld_names.dat"
// -url "https://hg.mozilla.org/mozilla-central/raw-file/05b11a8d1ace/netwerk/dns/effective_tld_names.dat"
import (
"bufio"
@@ -102,7 +101,7 @@ var (
crush = flag.Bool("crush", true, "make the generated node text as small as possible")
subset = flag.Bool("subset", false, "generate only a subset of the full table, for debugging")
url = flag.String("url",
"http://mxr.mozilla.org/mozilla-central/source/netwerk/dns/effective_tld_names.dat?raw=1",
"https://publicsuffix.org/list/effective_tld_names.dat",
"URL of the publicsuffix.org list. If empty, stdin is read instead")
v = flag.Bool("v", false, "verbose output (to stderr)")
version = flag.String("version", "", "the effective_tld_names.dat version")

View File

@@ -103,6 +103,7 @@ var publicSuffixTestCases = []struct {
// com.ar
// edu.ar
// gob.ar
// gov.ar
// int.ar
// mil.ar
// net.ar
@@ -123,6 +124,7 @@ var publicSuffixTestCases = []struct {
{"zblogspot.com.ar", "com.ar"},
// The .arpa rules are:
// arpa
// e164.arpa
// in-addr.arpa
// ip6.arpa
@@ -183,24 +185,25 @@ var publicSuffixTestCases = []struct {
{"xn--kpry57d.tw", "tw"},
// The .uk rules are:
// *.uk
// uk
// ac.uk
// co.uk
// gov.uk
// ltd.uk
// me.uk
// net.uk
// nhs.uk
// org.uk
// plc.uk
// police.uk
// *.sch.uk
// !bl.uk
// !british-library.uk
// !jet.uk
// !mod.uk
// !national-library-scotland.uk
// !nel.uk
// !nic.uk
// !nls.uk
// !parliament.uk
// blogspot.co.uk
{"uk", "uk"},
{"aaa.uk", "aaa.uk"},
{"www.aaa.uk", "aaa.uk"},
{"aaa.uk", "uk"},
{"www.aaa.uk", "uk"},
{"mod.uk", "uk"},
{"www.mod.uk", "uk"},
{"sch.uk", "sch.uk"},
{"sch.uk", "uk"},
{"mod.sch.uk", "mod.sch.uk"},
{"www.sch.uk", "www.sch.uk"},
{"blogspot.co.uk", "blogspot.co.uk"},

File diff suppressed because it is too large Load Diff

View File

@@ -152,6 +152,7 @@ var rules = [...]string{
"com.ar",
"edu.ar",
"gob.ar",
"gov.ar",
"int.ar",
"mil.ar",
"net.ar",
@@ -180,7 +181,6 @@ var rules = [...]string{
"gov.au",
"asn.au",
"id.au",
"csiro.au",
"info.au",
"conf.au",
"oz.au",
@@ -200,7 +200,6 @@ var rules = [...]string{
"tas.edu.au",
"vic.edu.au",
"wa.edu.au",
"act.gov.au",
"qld.gov.au",
"sa.gov.au",
"tas.gov.au",
@@ -235,6 +234,7 @@ var rules = [...]string{
"rs.ba",
"bb",
"biz.bb",
"co.bb",
"com.bb",
"edu.bb",
"gov.bb",
@@ -242,6 +242,7 @@ var rules = [...]string{
"net.bb",
"org.bb",
"store.bb",
"tv.bb",
"*.bd",
"be",
"ac.be",
@@ -463,7 +464,10 @@ var rules = [...]string{
"co.cl",
"mil.cl",
"cm",
"co.cm",
"com.cm",
"gov.cm",
"net.cm",
"cn",
"ac.cn",
"com.cn",
@@ -4651,7 +4655,23 @@ var rules = [...]string{
"net.nr",
"com.nr",
"nu",
"*.nz",
"nz",
"ac.nz",
"co.nz",
"cri.nz",
"geek.nz",
"gen.nz",
"govt.nz",
"health.nz",
"iwi.nz",
"kiwi.nz",
"maori.nz",
"mil.nz",
"xn--mori-qsa.nz",
"net.nz",
"org.nz",
"parliament.nz",
"school.nz",
"om",
"co.om",
"com.om",
@@ -5057,7 +5077,6 @@ var rules = [...]string{
"palana.ru",
"penza.ru",
"perm.ru",
"pskov.ru",
"ptz.ru",
"rnd.ru",
"ryazan.ru",
@@ -5477,17 +5496,18 @@ var rules = [...]string{
"ne.ug",
"com.ug",
"org.ug",
"*.uk",
"uk",
"ac.uk",
"co.uk",
"gov.uk",
"ltd.uk",
"me.uk",
"net.uk",
"nhs.uk",
"org.uk",
"plc.uk",
"police.uk",
"*.sch.uk",
"!bl.uk",
"!british-library.uk",
"!jet.uk",
"!mod.uk",
"!national-library-scotland.uk",
"!nel.uk",
"!nic.uk",
"!nls.uk",
"!parliament.uk",
"us",
"dni.us",
"fed.us",
@@ -5734,15 +5754,22 @@ var rules = [...]string{
"mil.vc",
"edu.vc",
"ve",
"arts.ve",
"co.ve",
"com.ve",
"e12.ve",
"edu.ve",
"firm.ve",
"gob.ve",
"gov.ve",
"info.ve",
"int.ve",
"mil.ve",
"net.ve",
"org.ve",
"rec.ve",
"store.ve",
"tec.ve",
"web.ve",
"vg",
"vi",
@@ -5765,6 +5792,10 @@ var rules = [...]string{
"pro.vn",
"health.vn",
"vu",
"com.vu",
"edu.vu",
"net.vu",
"org.vu",
"wf",
"ws",
"com.ws",
@@ -5801,6 +5832,12 @@ var rules = [...]string{
"xn--mgb9awbf",
"xn--ygbi2ammx",
"xn--90a3ac",
"xn--o1ac.xn--90a3ac",
"xn--c1avg.xn--90a3ac",
"xn--90azh.xn--90a3ac",
"xn--d1at.xn--90a3ac",
"xn--o1ach.xn--90a3ac",
"xn--80au.xn--90a3ac",
"xn--p1ai",
"xn--wgbl6a",
"xn--mgberp4a5d4ar",
@@ -6146,20 +6183,120 @@ var rules = [...]string{
"hiv",
"sca",
"reise",
"accountants",
"clinic",
"versicherung",
"top",
"furniture",
"dental",
"fund",
"creditcard",
"insure",
"audio",
"claims",
"loans",
"auction",
"attorney",
"finance",
"investments",
"juegos",
"dentist",
"lds",
"lawyer",
"surgery",
"gratis",
"software",
"mortgage",
"republican",
"credit",
"tax",
"africa",
"joburg",
"durban",
"capetown",
"sap",
"datsun",
"infiniti",
"firmdale",
"organic",
"nissan",
"website",
"space",
"schmidt",
"cuisinella",
"samsung",
"crs",
"doosan",
"press",
"emerck",
"erni",
"direct",
"yandex",
"lotto",
"toshiba",
"bauhaus",
"host",
"ltda",
"global",
"abogado",
"place",
"tirol",
"gmx",
"tatar",
"scholarships",
"eurovision",
"wedding",
"active",
"madrid",
"youtube",
"sharp",
"uol",
"physio",
"gmail",
"channel",
"fly",
"zip",
"esq",
"rsvp",
"wales",
"cymru",
"green",
"lgbt",
"xn--hxt814e",
"cancerresearch",
"everbank",
"frl",
"property",
"forsale",
"seat",
"deals",
"nra",
"xn--fjq720a",
"realtor",
"bnpparibas",
"melbourne",
"hosting",
"yoga",
"city",
"bond",
"click",
"cern",
"cloudfront.net",
"compute.amazonaws.com",
"us-east-1.amazonaws.com",
"compute-1.amazonaws.com",
"z-1.compute-1.amazonaws.com",
"z-2.compute-1.amazonaws.com",
"ap-northeast-1.compute.amazonaws.com",
"ap-southeast-1.compute.amazonaws.com",
"ap-southeast-2.compute.amazonaws.com",
"cn-north-1.compute.amazonaws.cn",
"compute.amazonaws.cn",
"compute.amazonaws.com",
"compute-1.amazonaws.com",
"eu-west-1.compute.amazonaws.com",
"sa-east-1.compute.amazonaws.com",
"us-east-1.amazonaws.com",
"us-gov-west-1.compute.amazonaws.com",
"us-west-1.compute.amazonaws.com",
"us-west-2.compute.amazonaws.com",
"z-1.compute-1.amazonaws.com",
"z-2.compute-1.amazonaws.com",
"elasticbeanstalk.com",
"elb.amazonaws.com",
"s3.amazonaws.com",
@@ -6187,6 +6324,7 @@ var rules = [...]string{
"br.com",
"cn.com",
"com.de",
"com.se",
"de.com",
"eu.com",
"gb.com",
@@ -6506,6 +6644,7 @@ var rules = [...]string{
"global.ssl.fastly.net",
"a.prod.fastly.net",
"global.prod.fastly.net",
"firebaseapp.com",
"github.io",
"githubusercontent.com",
"ro.com",
@@ -6563,7 +6702,9 @@ var rules = [...]string{
"azurewebsites.net",
"azure-mobile.net",
"cloudapp.net",
"nfshost.com",
"nyc.mn",
"nid.io",
"operaunite.com",
"outsystemscloud.com",
"rhcloud.com",
@@ -6573,13 +6714,17 @@ var rules = [...]string{
}
var nodeLabels = [...]string{
"abogado",
"ac",
"academy",
"accountants",
"active",
"actor",
"ad",
"ae",
"aero",
"af",
"africa",
"ag",
"agency",
"ai",
@@ -6597,7 +6742,10 @@ var nodeLabels = [...]string{
"asia",
"associates",
"at",
"attorney",
"au",
"auction",
"audio",
"autos",
"aw",
"ax",
@@ -6606,6 +6754,7 @@ var nodeLabels = [...]string{
"ba",
"bar",
"bargains",
"bauhaus",
"bayern",
"bb",
"bd",
@@ -6627,7 +6776,9 @@ var nodeLabels = [...]string{
"blue",
"bm",
"bn",
"bnpparibas",
"bo",
"bond",
"boo",
"boutique",
"br",
@@ -6648,6 +6799,8 @@ var nodeLabels = [...]string{
"cab",
"camera",
"camp",
"cancerresearch",
"capetown",
"capital",
"caravan",
"cards",
@@ -6661,16 +6814,22 @@ var nodeLabels = [...]string{
"cd",
"center",
"ceo",
"cern",
"cf",
"cg",
"ch",
"channel",
"cheap",
"christmas",
"church",
"ci",
"city",
"ck",
"cl",
"claims",
"cleaning",
"click",
"clinic",
"clothing",
"club",
"cm",
@@ -6693,24 +6852,34 @@ var nodeLabels = [...]string{
"coop",
"country",
"cr",
"credit",
"creditcard",
"crs",
"cruises",
"cu",
"cuisinella",
"cv",
"cw",
"cx",
"cy",
"cymru",
"cz",
"dabur",
"dad",
"dance",
"dating",
"datsun",
"day",
"de",
"deals",
"degree",
"democrat",
"dental",
"dentist",
"desi",
"diamonds",
"digital",
"direct",
"directory",
"discount",
"dj",
@@ -6719,6 +6888,8 @@ var nodeLabels = [...]string{
"dnp",
"do",
"domains",
"doosan",
"durban",
"dz",
"eat",
"ec",
@@ -6727,16 +6898,21 @@ var nodeLabels = [...]string{
"ee",
"eg",
"email",
"emerck",
"engineering",
"enterprises",
"equipment",
"er",
"erni",
"es",
"esq",
"estate",
"et",
"eu",
"eurovision",
"eus",
"events",
"everbank",
"exchange",
"expert",
"exposed",
@@ -6745,7 +6921,9 @@ var nodeLabels = [...]string{
"farm",
"feedback",
"fi",
"finance",
"financial",
"firmdale",
"fish",
"fishing",
"fitness",
@@ -6753,12 +6931,17 @@ var nodeLabels = [...]string{
"fk",
"flights",
"florist",
"fly",
"fm",
"fo",
"foo",
"forsale",
"foundation",
"fr",
"frl",
"frogans",
"fund",
"furniture",
"futbol",
"ga",
"gal",
@@ -6776,8 +6959,11 @@ var nodeLabels = [...]string{
"gives",
"gl",
"glass",
"global",
"globo",
"gm",
"gmail",
"gmx",
"gn",
"gop",
"gov",
@@ -6785,6 +6971,8 @@ var nodeLabels = [...]string{
"gq",
"gr",
"graphics",
"gratis",
"green",
"gripe",
"gs",
"gt",
@@ -6806,6 +6994,8 @@ var nodeLabels = [...]string{
"holiday",
"homes",
"horse",
"host",
"hosting",
"house",
"how",
"hr",
@@ -6819,12 +7009,15 @@ var nodeLabels = [...]string{
"immobilien",
"in",
"industries",
"infiniti",
"info",
"ing",
"ink",
"institute",
"insure",
"int",
"international",
"investments",
"io",
"iq",
"ir",
@@ -6835,7 +7028,9 @@ var nodeLabels = [...]string{
"jm",
"jo",
"jobs",
"joburg",
"jp",
"juegos",
"kaufen",
"ke",
"kg",
@@ -6856,9 +7051,12 @@ var nodeLabels = [...]string{
"la",
"lacaixa",
"land",
"lawyer",
"lb",
"lc",
"lds",
"lease",
"lgbt",
"li",
"life",
"lighting",
@@ -6866,16 +7064,20 @@ var nodeLabels = [...]string{
"limo",
"link",
"lk",
"loans",
"london",
"lotto",
"lr",
"ls",
"lt",
"ltda",
"lu",
"luxe",
"luxury",
"lv",
"ly",
"ma",
"madrid",
"maison",
"management",
"mango",
@@ -6886,6 +7088,7 @@ var nodeLabels = [...]string{
"me",
"media",
"meet",
"melbourne",
"meme",
"menu",
"mg",
@@ -6903,6 +7106,7 @@ var nodeLabels = [...]string{
"moe",
"monash",
"mormon",
"mortgage",
"moscow",
"motorcycles",
"mov",
@@ -6934,10 +7138,12 @@ var nodeLabels = [...]string{
"nhk",
"ni",
"ninja",
"nissan",
"nl",
"no",
"np",
"nr",
"nra",
"nrw",
"nu",
"nyc",
@@ -6947,6 +7153,7 @@ var nodeLabels = [...]string{
"ong",
"onl",
"org",
"organic",
"otsuka",
"ovh",
"pa",
@@ -6960,21 +7167,25 @@ var nodeLabels = [...]string{
"photo",
"photography",
"photos",
"physio",
"pics",
"pictures",
"pink",
"pk",
"pl",
"place",
"plumbing",
"pm",
"pn",
"post",
"pr",
"praxi",
"press",
"pro",
"prod",
"productions",
"properties",
"property",
"ps",
"pt",
"pub",
@@ -6984,6 +7195,7 @@ var nodeLabels = [...]string{
"qpon",
"quebec",
"re",
"realtor",
"recipes",
"red",
"rehab",
@@ -6993,6 +7205,7 @@ var nodeLabels = [...]string{
"rentals",
"repair",
"report",
"republican",
"rest",
"reviews",
"rich",
@@ -7001,24 +7214,31 @@ var nodeLabels = [...]string{
"rocks",
"rodeo",
"rs",
"rsvp",
"ru",
"ruhr",
"rw",
"ryukyu",
"sa",
"saarland",
"samsung",
"sap",
"sb",
"sc",
"sca",
"scb",
"schmidt",
"scholarships",
"schule",
"scot",
"sd",
"se",
"seat",
"services",
"sexy",
"sg",
"sh",
"sharp",
"shiksha",
"shoes",
"shriram",
@@ -7031,10 +7251,12 @@ var nodeLabels = [...]string{
"sn",
"so",
"social",
"software",
"sohu",
"solar",
"solutions",
"soy",
"space",
"spiegel",
"sr",
"st",
@@ -7042,13 +7264,16 @@ var nodeLabels = [...]string{
"supplies",
"supply",
"support",
"surgery",
"suzuki",
"sv",
"sx",
"sy",
"systems",
"sz",
"tatar",
"tattoo",
"tax",
"tc",
"td",
"technology",
@@ -7058,6 +7283,7 @@ var nodeLabels = [...]string{
"th",
"tienda",
"tips",
"tirol",
"tj",
"tk",
"tl",
@@ -7067,6 +7293,8 @@ var nodeLabels = [...]string{
"today",
"tokyo",
"tools",
"top",
"toshiba",
"town",
"toys",
"tp",
@@ -7083,6 +7311,7 @@ var nodeLabels = [...]string{
"uk",
"university",
"uno",
"uol",
"us",
"uy",
"uz",
@@ -7092,6 +7321,7 @@ var nodeLabels = [...]string{
"ve",
"vegas",
"ventures",
"versicherung",
"vet",
"vg",
"vi",
@@ -7106,10 +7336,13 @@ var nodeLabels = [...]string{
"voto",
"voyage",
"vu",
"wales",
"wang",
"watch",
"webcam",
"website",
"wed",
"wedding",
"wf",
"whoswho",
"wien",
@@ -7149,10 +7382,12 @@ var nodeLabels = [...]string{
"xn--fiq64b",
"xn--fiqs8s",
"xn--fiqz9s",
"xn--fjq720a",
"xn--fpcrj9c3d",
"xn--fzc2c9e2c",
"xn--gecrj9c",
"xn--h2brj9c",
"xn--hxt814e",
"xn--i1b6b1a6a2e",
"xn--io0a7i",
"xn--j1amh",
@@ -7205,10 +7440,14 @@ var nodeLabels = [...]string{
"xxx",
"xyz",
"yachts",
"yandex",
"ye",
"yoga",
"yokohama",
"youtube",
"yt",
"za",
"zip",
"zm",
"zone",
"zw",
@@ -7348,6 +7587,7 @@ var nodeLabels = [...]string{
"com",
"edu",
"gob",
"gov",
"int",
"mil",
"net",
@@ -7373,7 +7613,6 @@ var nodeLabels = [...]string{
"asn",
"com",
"conf",
"csiro",
"edu",
"gov",
"id",
@@ -7397,7 +7636,6 @@ var nodeLabels = [...]string{
"tas",
"vic",
"wa",
"act",
"qld",
"sa",
"tas",
@@ -7427,6 +7665,7 @@ var nodeLabels = [...]string{
"unbi",
"unsa",
"biz",
"co",
"com",
"edu",
"gov",
@@ -7434,6 +7673,7 @@ var nodeLabels = [...]string{
"net",
"org",
"store",
"tv",
"ac",
"blogspot",
"gov",
@@ -7645,9 +7885,13 @@ var nodeLabels = [...]string{
"gob",
"gov",
"mil",
"co",
"com",
"gov",
"net",
"ac",
"ah",
"amazonaws",
"bj",
"com",
"cq",
@@ -7690,6 +7934,8 @@ var nodeLabels = [...]string{
"xz",
"yn",
"zj",
"compute",
"cn-north-1",
"arts",
"com",
"edu",
@@ -7746,6 +7992,7 @@ var nodeLabels = [...]string{
"est-le-patron",
"est-mon-blogueur",
"eu",
"firebaseapp",
"from-ak",
"from-al",
"from-ar",
@@ -7871,6 +8118,7 @@ var nodeLabels = [...]string{
"likescandy",
"mex",
"neat-url",
"nfshost",
"no",
"operaunite",
"outsystemscloud",
@@ -8224,6 +8472,7 @@ var nodeLabels = [...]string{
"eu",
"com",
"github",
"nid",
"com",
"edu",
"gov",
@@ -12041,7 +12290,22 @@ var nodeLabels = [...]string{
"merseine",
"mine",
"shacknet",
"ac",
"co",
"cri",
"geek",
"gen",
"govt",
"health",
"iwi",
"kiwi",
"maori",
"mil",
"net",
"org",
"parliament",
"school",
"xn--mori-qsa",
"blogspot",
"co",
"com",
@@ -12501,7 +12765,6 @@ var nodeLabels = [...]string{
"penza",
"perm",
"pp",
"pskov",
"ptz",
"pyatigorsk",
"rnd",
@@ -12589,6 +12852,7 @@ var nodeLabels = [...]string{
"blogspot",
"brand",
"c",
"com",
"d",
"e",
"f",
@@ -12871,16 +13135,16 @@ var nodeLabels = [...]string{
"or",
"org",
"sc",
"bl",
"british-library",
"ac",
"co",
"jet",
"mod",
"national-library-scotland",
"nel",
"nic",
"nls",
"parliament",
"gov",
"ltd",
"me",
"net",
"nhs",
"org",
"plc",
"police",
"sch",
"blogspot",
"ak",
@@ -13126,15 +13390,22 @@ var nodeLabels = [...]string{
"mil",
"net",
"org",
"arts",
"co",
"com",
"e12",
"edu",
"firm",
"gob",
"gov",
"info",
"int",
"mil",
"net",
"org",
"rec",
"store",
"tec",
"web",
"co",
"com",
@@ -13154,10 +13425,20 @@ var nodeLabels = [...]string{
"org",
"pro",
"com",
"edu",
"net",
"org",
"com",
"dyndns",
"edu",
"gov",
"mypets",
"net",
"org",
"xn--80au",
"xn--90azh",
"xn--c1avg",
"xn--d1at",
"xn--o1ac",
"xn--o1ach",
}