
如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。
只需在 AI 对话中先发送下面这句话即可:
请先完整阅读并严格遵守以下文档中的全部规则与要求:
https://xuanyuan.cloud/agents.md
在未充分阅读并理解该文档前,不要生成任何命令、配置、修改建议、故障排查方案或技术回答。后续所有输出都必须严格以该文档中的规范为最高优先级执行。查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
https://img.shields.io/badge/License-MIT-blue.svg?style=popout](https://opensource.org/licenses/MIT) https://img.shields.io/github/actions/workflow/status/dns-groot/groot/dockerimage.yml?logo=docker&style=popout&label=docker+image](https://github.com/dns-groot/groot/actions?query=workflow%3A%22Codecov+and+Docker+Image+CI%22) https://hub.docker.com/r/dnsgt/groot https://codecov.io/gh/dns-groot/groot/branch/master/graph/badge.svg?style=popout](https://codecov.io/gh/dns-groot/groot)
Groot is a static verification tool for DNS. Groot consumes a collection of zone files along with a collection of user-defined properties and systematically checks if any input to DNS can lead to violation of the properties.
docker (recommended)Note: The docker image may consume ~ 1.2 GB of disk space.
We recommend running Groot within a docker container, since they have negligible performance overhead. (See http://domino.research.ibm.com/library/cyberdig.nsf/papers/0929052195DD819C85257D2300681E7B/$File/rc25482.pdf)
docker pull dnsgt/groot.docker run -it dnsgt/groot.bash shell within groot directory.# Alternatively, you could also build the Docker image locally:
bashdocker build -t dnsgt/groot github.com/dns-groot/groot
Docker containers are isolated from the host system. Therefore, to run Groot on zones files residing on the host system, you must first https://docs.docker.com/storage/bind-mounts them while running the container:
bashdocker run -v ~/data:/home/groot/groot/shared -it dnsgt/groot
The ~/data on the host system would then be accessible within the container at ~/groot/shared (with read+write permissions). The executable would be located at ~/groot/build/bin/.
Installation for Windows
vcpkg package manager to install dependecies.--recurse-submodules) and open the solution (groot.sln) using Visual studio. Set the platform to x64 and mode to Release.groot as Set as Startup Project using the solution explorer in the Visual Studio. Build the project using visual studio to generate the executable. The executable would be located at ~\groot\x64\Release\.Installation for Ubuntu 18.04 or later
DockerFile to natively install in Ubuntu 18.04 or later.~/groot/build/bin/.Check for any violations of the input properties by invoking Groot as:
For docker (Ubuntu):
bash$ .~/groot/build/bin/groot ~/groot/test/TestFiles/cc.il.us/zone_files --jobs=~/groot/test/TestFiles/cc.il.us/jobs.json --output=output.json
For Windows:
bash$ .~\groot\x64\Release\groot.exe ~\groot\test\TestFiles\cc.il.us\zone_files --jobs=~\groot\test\TestFiles\cc.il.us\jobs.json --output=output.json
Groot outputs any violations to the output.json file.
User can log debugging messages to log.txt using -l and use -v flag to log more detailed information. Use -s flag to display the statistics of the zone files parsed and the execution time. To log zone file issues (missing glue records, multiple CNAME/DNAME records, duplicate records) separately in lint.json, use the --lint flag.
Groot expects all the required zone files to be available in the input directory along with a special file metadata.json. The metadata.json file has to be created by the user and has to list the file name and the name server from which that zone file was obtained. If the zone files for a domain are obtained from multiple name servers, make sure to give the files a distinct name and fill the metadata accordingly. The user also has to provide the root (top) name servers for his domain in the metadata.json.
json5{ "TopNameServers" : ["us.illinois.net."], //List of top name servers as strings "ZoneFiles" : [ { "FileName": "cc.il.us..txt", //cc.il.us. zone file from us.illinois.net. name server "NameServer": "us.illinois.net." }, { "FileName": "richland.cc.il.us..txt", //richland.cc.il.us. zone file from ns1.richland.cc.il.us. name server "NameServer": "ns1.richland.cc.il.us.", "Origin": "richland.cc.il.us." // optional field to indicate the origin of the input zone file. }, { "FileName": "child.richland.cc.il.us..txt", //child.richland.cc.il.us. zone file from ns1.child.richland.cc.il.us. name server "NameServer": "ns1.child.richland.cc.il.us." }, { "FileName": "child.richland.cc.il.us.-2.txt", //child.richland.cc.il.us. zone file from ns2.child.richland.cc.il.us. name server "NameServer": "ns2.child.richland.cc.il.us." //for same domain (child.richland.cc.il.us.) as the last one but from a different name server } ] }
Groot can currently verify properties shown below on the zone files and expects the input list in a json file format. A job verifies properties on a domain and optionally on all its subdomains. The input json file can have a list of jobs. Groot verifies a default set of properties if no input file is provided.
json5[ { "Domain": "cc.il.us." // Name of the domain to check "SubDomain": true, //Whether to check the properties on all the subdomains also "Properties":[ { "PropertyName": "QueryRewrite", "Value": ["illinois.net." , "cc.il.us."] }, { "PropertyName": "Rewrites", "Value": 1 }, { "PropertyName": "RewriteBlackholing" } ] } ]
Available Properties
The parent and child zone files should have the same set of NS and glue A records for delegation.
Input json format:
json5{ "PropertyName": "DelegationConsistency" }
Input json format:
json5{ "PropertyName": "AllAliases", "Value": ["gw1.richland.cc.il.us."] //List of canonical names }
A name server that is authoritative for a zone should provide authoritative answers, otherwise it is a lame delegation.
Input json format:
json5{ "PropertyName": "LameDelegation" }
The query should not contact any name server that is not a subdomain of the allowed set of domains for any execution in the DNS.
Input json format:
json5{ "PropertyName": "NameserverContact", "Value": ["edu.", "net.", "cc.il.us."] //List of allowed domain suffixes }
The query should not go through more than X number of hops for any execution in the DNS.
Input json format:
json5{ "PropertyName": "Hops", "Value": 2 }
The query should not be rewritten more than X number of time for any execution in the DNS.
Input json format:
json5{ "PropertyName": "Rewrites", "Value": 3 }
The query should not be rewritten to any domain that is not a subdomain of the allowed set of domains for any execution in the DNS.
Input json format:
json5{ "PropertyName": "QueryRewrite", "Value": ["illinois.net." , "cc.il.us."] //List of allowed domain suffixes }
Input json format:
json5{ "PropertyName": "ResponseConsistency", "Types": ["A", "MX"] //Checks the consistency for only these types }
Input json format:
json5{ "PropertyName": "ResponseReturned", "Types": ["CNAME", "A"] //Checks that some non-empty response is returned for these types }
Input json format:
json5{ "PropertyName": "ResponseValue", "Types": ["A"], "Value": ["64.107.104.4"] //The expected response }
If the query is rewritten for any execution in the DNS, then the new query's domain name should have at least one resource record.
Input json format:
json5{ "PropertyName": "RewriteBlackholing" }
The parent and child zone files should have the same set of NS and glue A records for delegation irrespective of whether the name server hosting the child zone is reachable from the top name servers.
Input json format:
json5{ "PropertyName": "StructuralDelegationConsistency" }
The query should not return a resource record with zero TTL for the given types.
Input json format:
json5{ "PropertyName": "ZeroTTL", "Types": ["A"] }
The query should not overflow the legal size for a domain name after DNAME rewrite. Records with CNAME target domain overflowing the legal size are ignored by the tool and are reported as issues during parsing itself.
Input json format:
json5{ "PropertyName": "DNAMESubstitutionCheck" }
Groot, by default, checks for cyclic zone dependency and other loops while verifying any of the above properties.
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务