{"id":13514348,"url":"https://github.com/zonedb/zonedb","last_synced_at":"2025-03-31T03:30:48.734Z","repository":{"id":29463971,"uuid":"33000490","full_name":"zonedb/zonedb","owner":"zonedb","description":"Public Zone Database","archived":false,"fork":false,"pushed_at":"2024-10-29T08:50:55.000Z","size":25770,"stargazers_count":239,"open_issues_count":15,"forks_count":35,"subscribers_count":10,"default_branch":"main","last_synced_at":"2024-10-29T09:58:29.315Z","etag":null,"topics":["dns","domain-name","go","golang","idn","whois"],"latest_commit_sha":null,"homepage":"http://zonedb.org","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zonedb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-03-27T17:43:05.000Z","updated_at":"2024-10-29T08:47:08.000Z","dependencies_parsed_at":"2023-10-14T10:46:33.250Z","dependency_job_id":"6439db07-611b-49d8-8e5c-07444cfe975f","html_url":"https://github.com/zonedb/zonedb","commit_stats":{"total_commits":3823,"total_committers":25,"mean_commits":152.92,"dds":"0.23018571802249543","last_synced_commit":"f6f878ea07684dd4dbe2351b7b5ba1a96a59149a"},"previous_names":[],"tags_count":2193,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zonedb%2Fzonedb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zonedb%2Fzonedb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zonedb%2Fzonedb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zonedb%2Fzonedb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zonedb","download_url":"https://codeload.github.com/zonedb/zonedb/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246413377,"owners_count":20773053,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dns","domain-name","go","golang","idn","whois"],"created_at":"2024-08-01T05:00:53.857Z","updated_at":"2025-03-31T03:30:43.723Z","avatar_url":"https://github.com/zonedb.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# Public Zone Database\n\n[![build status](https://img.shields.io/github/actions/workflow/status/zonedb/zonedb/go.yaml.svg)](https://github.com/zonedb/zonedb/actions)\n[![go.dev reference](https://img.shields.io/badge/go.dev-reference-blue.svg?logo=go\u0026logoColor=white)](https://pkg.go.dev/github.com/zonedb/zonedb)\n\n\nThe Public Zone Database (ZoneDB) is a [free, open-source database](http://opendatacommons.org/licenses/odbl/1.0/) containing a list and associated metadata of public [DNS zones](http://en.wikipedia.org/wiki/DNS_zone) (domain name extensions). It attempts to be exhaustive, including current, retired, and withdrawn top-level domains and subdomains.\n\nThe intended use case is programs that interface with the [public domain name system](http://en.wikipedia.org/wiki/Domain_Name_System), including registry and registrar services. The data overlaps with and shares test cases with the [Public Suffix List](http://publicsuffix.org/) maintained by the [Mozilla Foundation](https://mozilla.org/). The source data was originally derived from the internal zone database in use at [Domainr](https://domainr.com/).\n\n## Structure\n\nThe database consists of a list of zones (`zones.txt`) and associated metadata in JSON format.\n\n### CLI\n\nThe `zonedb` CLI is fully documented. Run `go run cmd/zonedb/main.go -h` to see its arguments.\n\n### zones.txt\n\nThe `zones.txt` file is a UTF-8 encoded text file containing a list of IDN \u0026 lower-case domain names, one per line, followed by a newline (`\\n`) character. The domain names in zones.txt are sorted according to the following rules:\n\n1. Number of labels (top-level domains, followed by second- and third-level domains)\n2. Parent domain (e.g. `uk`)\n3. Subdomain (e.g. `co.uk`)\n\n### Metadata\n\nEach domain with associated metadata will have a JSON file in the `metadata` directory.\n\n#### RDAP\n\nWhen adding an RDAP server URL, only the base URL is needed. e.g. `https://rdap.sidn.nl/`\n\n### Updates\n\nA [GitHub Actions workflow](https://github.com/zonedb/zonedb/blob/HEAD/.github/workflows/update.yaml) updates ZoneDB each night.\n\nIf a new SLD or third-level domain needs to be added to `zones.txt`, follow these steps locally:\n\n1. Add the new zone to the bottom of the `zones.txt` file.\n1. Run `make normalize` to normalize the data changes.\n1. Run `go run cmd/zonedb/main.go -update -w -zones {new zone}` to update its metadata.\n1. Create a pull request for the changes, and confirm the tests are passing.\n\n#### JSON files\n\nIf an update to one of the `{zone}.json` files is needed, do this locally:\n\n1. `make normalize` # tidies the json files, and runs `go generate`\n1. commit the changes\n\n## Implementations\n\n### Go\n\n`go get github.com/zonedb/zonedb`\n\nThis repository contains a reference implementation of the database written in [Go](https://go.dev/). Unlike the source data, which is in Unicode, the Go implementation represents domain names in ASCII [IDNA](http://en.wikipedia.org/wiki/Internationalized_domain_name#Internationalizing_Domain_Names_in_Applications) form for interop with [existing](https://godoc.org/net) [libraries](https://pkg.go.dev/golang.org/x/net/idna).\n\n#### Go Support\n\nZoneDB supports a minimum of 3 Go releases. As of October 2023, this includes Go 1.21, 1.20, and 1.19.\n\n## Contributing\n\nFork this repository, make changes, and send a pull request. Before submitting a PR, run `make normalize` to normalize any changes. The data is structured to minimize diff size.\n\n### zonedb build tool\n\nThis database is generated and validated using the `zonedb` tool in this directory. To install, make sure you have a working [Go](https://go.dev/) installation (1.4+) and run this command:\n\n```shell\ngo get -u github.com/zonedb/zonedb/cmd/zonedb\n```\n\nYou can also run the `zonedb` tool directly: `go run cmd/zonedb/main.go`\n\n### Example commands\n\nList all zones that have wildcarded DNS:\n\n```shell\nzonedb -list-wildcards\n```\n\nList all zones tagged `geo`:\n\n```shell\nzonedb -tags geo\n```\n\nList a given zone's tags:\n\n```shell\nzonedb -zones capetown -list-tags\n```\n\nAdd a tag to multiple zones (and write the output):\n\n```shell\nzonedb -zones capetown,durban,joburg -add-tags city -w\n```\n\nRemove a tag from a zone (and write the output):\n\n```shell\nzonedb -zones la -remove-tags generic -w\n```\n\nAdd a location to a zone (and write the output):\n\n```shell\nzonedb -zones alsace -add-locations fr-a -w\n```\n\nAdd `zh-Hans-HK` (Hong Kong Simplified Chinese) as a language (and write the output):\n\n```shell\nzonedb -zones 香港 -add-languages zh-Hans-HK -w\n```\n\nList all zones with only one language:\n\n```shell\nzonedb -grep '\"languages\"\\: \\[\\s+\\S+\\s+\\]'\n```\n\nList all zones  with the `geo` tag that support a Chinese language variant:\n\n```shell\nzonedb  -tags geo -grep zh-\n```\n\nList all IDN zones with the `geo` tag:\n\n```shell\nzonedb -grep '[^\\x{0000}-\\x{007F}]' -tags geo\n```\n\nOr, using the `-idn` tag, all IDN TLDs with the `geo` tag:\n\n```shell\nzonedb -tlds -idn -tags geo\n```\n\n## License\n\nThe ZoneDB database is licensed under the [Open Database License (ODbL) version 1.0](http://opendatacommons.org/licenses/odbl/1.0/). See [LICENSE-DATA.md](https://github.com/zonedb/zonedb/blob/HEAD/LICENSE-DATA.md) for more information.\n\nThe [Go](https://go.dev/) package derived from this database is licensed under the [MIT license](https://opensource.org/license/mit/). See [LICENSE](https://github.com/zonedb/zonedb/blob/HEAD/LICENSE) for more information.\n\nCopyright © the Public Zone Database authors.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzonedb%2Fzonedb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzonedb%2Fzonedb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzonedb%2Fzonedb/lists"}