README.md 1.84 KB
Newer Older
1 2
# Knot DNS Resolver

Marek Vavruša's avatar
Marek Vavruša committed
3
[![Build Status](https://travis-ci.org/CZNIC-Labs/knot-resolver.svg?branch=master)](https://travis-ci.org/CZNIC-Labs/knot-resolver)
4

Marek Vavruša's avatar
Marek Vavruša committed
5 6 7 8
The Knot DNS Resolver is a minimalistic caching resolver implementation. The project provides both a resolver
library and a small daemon. Modular architecture of the library keeps the core tiny and efficient, and provides
a state-machine like API for extensions. There are three built-in modules: *iterator*, *cache* and *stats*,
but each module can be flipped on and off.
9

Marek Vavruša's avatar
Marek Vavruša committed
10
### Try it out?
11

Marek Vavruša's avatar
Marek Vavruša committed
12 13 14 15 16
The Knot DNS Resolver is currently in an early development phase, you shouldn't put it in the production right away.

### Docker image

This is simple and doesn't require any dependencies or system modifications, just run:
17 18

```
Marek Vavruša's avatar
Marek Vavruša committed
19
$ docker run cznic/knot-resolver
20 21
```

Marek Vavruša's avatar
Marek Vavruša committed
22 23 24 25 26 27 28 29 30 31 32
See the build page https://registry.hub.docker.com/u/cznic/knot-resolver for more information and options.
You can hack on the container by changing the container entrypoint to shell like:

```
$ docker run -it --entrypoint=/bin/bash cznic/knot-resolver
```

### Building from sources 

The Knot DNS Resolver depends on the development version of the Knot DNS library, and a reasonably recent version of `libuv`.
Several dependencies may not be in the packages yet, the script pulls and installs all dependencies in a chroot.
33

34
```
Marek Vavruša's avatar
Marek Vavruša committed
35 36 37 38 39
$ FAKEROOT="/tmp/resolver-depends"
$ ./scripts/build-depends.sh ${FAKEROOT} 
$ export LDFLAGS="-L${FAKEROOT}/lib"
$ export PKG_CONFIG_PATH="${FAKEROOT}/lib/pkgconfig"
$ ./configure --enable-integration-tests
40 41
$ autoreconf -if
$ make
Marek Vavruša's avatar
Marek Vavruša committed
42
$ make check
43 44
```

Marek Vavruša's avatar
Marek Vavruša committed
45
### Running
46 47 48 49 50 51 52 53 54

There is a separate resolver library in the `lib` directory, and a minimalistic daemon in
the `daemon` directory. The daemon accepts a few CLI parameters, and there's no support for configuration
right now.

```
$ ./daemon/kresolved -h
$ ./daemon/kresolved -a 127.0.0.1#53
```