Coder Social home page Coder Social logo

eon's Introduction

Effects-based OCaml Nameserver (EON)

EON is an authoritative nameserver for the Domain Name System (DNS) using the functionally pure Mirage OCaml-DNS libraries and Effects-Based Parallel IO for multicore OCaml, along with some experimental uses of the DNS.

Quick start

$ nix shell github:RyanGibb/eon
$ sudo eon --zonefile <filepath>

Or follow the instructions to manually build from source.

For help:

$ eon --help

Building

Nix can be used to build the project with:

$ git clone [email protected]:RyanGibb/eon.git
$ cd eon
$ nix build .

The binary can then be found at result/bin/eon.

Note that this is using Nix flakes.

Alternatively, opam and dune tooling can be used:

$ opam install .
$ dune build

The binary can then be found at _build/default/src/eon.exe.

Running

Once built, to run the project use:

$ ./eon --zonefile <filepath>

For example:

$ ./eon --zonefile examples/example.com

The zonefile format is defined in RFC1035 Section 5.1, but a minimal example is provided in example.org.

Note root access may be required to bind to port 53.

You can then query your nameserver using the BIND dig utility:

$ dig example.org @localhost +short
203.0.113.0

The command line argument --log-level can be used to specify a log verbosity e.g.:

$ ./eon --zonefile examples/example.com --log-level 2

To operate as a recursive resolver:

$ ./eon --zonefile examples/example.com --resolver

Which will additionally recursively look up records for domains it is not authoritative over. Be careful of DNS amplification attacks.

Deployment

A NixOS module is provided that describes a systemd service and some configuration options. See here for an example of adding a module from another flake to your NixOS configuration.

It's also possible to simply run this as a binary.

You'll need to configure your zonefile with an NS record, and set up a glue record with your registrar to point this domain to the IP that your nameserver is hosted on. See example.org for an example NS record.

Development

While it's possible to continuously rebuild the Nix derivation during development, this is quite slow due to isolated builds. A nice compromise is to use Nix to provide the dependencies but to use an un-sandboxed dune to build the project benefiting from caches and incremental builds.

To do this, use:

nix develop . -c dune build

Development packages https://github.com/ocaml/ocaml-lsp are also provided, so one can launch an editor with:

nix develop . -c <your-favourite-editor>

Alternatively, opam tooling can be used to provide the development dependencies.

Documentation

See ./docs/.

eon's People

Contributors

avsm avatar dinosaure avatar hannesm avatar mmaker avatar panglesd avatar reynir avatar robur-team avatar ryangibb avatar vbaluch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

magnuss panglesd

eon's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.