Giter VIP home page Giter VIP logo

penne's Introduction

Penne, darvaza's DNS Resolver

Go Reference Go Report Card

Penne is a config-driven pipeline oriented DNS resolver that allows complex workflows to be defined in a simple way. Penne is built using the darvaza sidecar engine and the darvaza resolver interface.

Horizons

Penne is designed upon the idea of split horizons, where DNS answers depend on the IP address of the client.

A Horizon is a named set of network patterns (aka CIDR) that can optionally choose a custom Resolver, and can annotate or filter requests before passing them to the next Horizon on a chain.

Resolvers

On the config file you define a series of resolvers in charge of handling DNS requests. Each Resolver has a unique name. Names are not case sensitive and allow unicode text.

Resolvers have three operation modes:

  • Iterative goes to the root servers and iterates through authoritative servers until the answer is found.
  • Forwarder connects to a specific server to get the answer, optionally allowing recursion to be performed remotely.
  • and Chained, where requests are passed to the Next resolver, optionally modified.

Resolvers act as middlewares, optionally restricted to specific domains (suffixes).

Resolvers can also be configured to discard various entries (like AAAA for example) and execute request rewrites.

Globing

We use globing instead of regular expressions for the name rewrites and suffix matching on Resolvers.

For this purpose we worked with pachyderm's Oh my glob! library, which in turn was derived from the excellent github.com/gobwas/glob with the following syntax.

pattern:
    { term }

term:
    `*`         matches any sequence of non-separator characters
    `**`        matches any sequence of characters
    `?`         matches any single non-separator character
    `[` [ `!` ] { character-range } `]`
                character class (must be non-empty)
    `{` pattern-list `}`
                pattern alternatives
    c           matches character c (c != `*`, `**`, `?`, `\`, `[`, `{`, `}`)
    `\` c       matches character c

character-range:
    c           matches character c (c != `\\`, `-`, `]`)
    `\` c       matches character c
    lo `-` hi   matches character c for lo <= c <= hi

pattern-list:
    pattern { `,` pattern }
                comma-separated (without spaces) patterns

capture:
    `(` { `|` pattern } `)`
    `@(` { `|` pattern } `)`
                match and capture one of pipe-separated sub-patterns
    `*(` { `|` pattern } `)`
                match and capture any number of the pipe-separated sub-patterns
    `+(` { `|` pattern } `)`
                match and capture one or more of the pipe-separated sub-patterns
    `?(` { `|` pattern } `)`
                match and capture zero or one of the pipe-separated sub-patterns
    `!(` { `|` pattern } `)`
                match and capture anything except one of the pipe-separated sub-patterns

And for replacements ${n} and $n to indicate the index on the capture slice inside a literal string.

Server

TBD ...

Installation

TBD ...

Configuration

TBD ...

Run as service

TBD ...

Web Interface

TBD ...

Frontend

TBD ...

See also

penne's People

Contributors

amery avatar karasz avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.