Skip to content

icann/pyresolver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pyresolver

pyresolver is a Python-based recursive resolver for DNS.

NOTE: This is the very beginning of public use of this tool. Please let me know of any problems by opening issues. You can also contact me at mailto:paul.hoffman@icann.org.

Design Goals

pyresolver is meant to show how recursive resolvers work; it is definitely not meant for operational use. In fact, it doesn't listen on port 53: you give pyresolver queries through config files or the command line. Eventually, it should have all the features that are defined in the many RFCs that define the DNS; certainly, some of these features will be configured in configuration options.

Python was chosen as the language for pyresolver because Python programs are relatively easy to read. The code is meant to be expressive and well-commented; hopefully that improves over time as well.

pyresolver is single-threaded and does no multi-tasking. Although this clearly makes it much slower, it also makes the debugging log much easier to read.

The current version of pyresolver has essentially only one feature beyond the minimum defined in RFC 1034/1035: support for DELEG. In fact, the pyresolver project started as a way of producing a DELEG-aware resolver to check whether the DELEG protocol was internally correct, and to help create public test cases for the protocol before it becomes an RFC.

Installation

Currently, the only reliable way to install pyresolver is by cloning this git repo. It might have better packaging in the future.

pyresolver relies on uv for loading non-native Python modules. See here for information on installing uv.

Configuration

The configuration file(s) for pyresolver are in TOML. See pyresolver.conf.example for an example of how the configuration file might look. Note that everything in that example file is commented out.

When pyresolver starts up, it has its own default configuration. It builds up the configuration by including options from ~/.config/pyresolver.conf, then from ./pyresolver.conf. Finally, if the --config_file option is given on the command line, it loads that file last.

Command Line

There are just two command line options. --config_file names a file that will be loaded after the other configuration files. --one lets you give a query to run from the command line; if given, this overrides any queries listed in the configuration.

Running pyresolver

After uv has been installed, you can run it from anywhere:

# /path/to/repo/pyresolver --one www.example.com/a/do

About

A non-production DNS resolver written in Python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages