All Projects → tj → Sdns

tj / Sdns

Little nameserver resolving via arbitrary command(s).

Programming Languages

go
31211 projects - #10 most used programming language

sdns

GoDoc

Little nameserver resolving via arbitrary command(s).

Warning: This is a work-in-progress, you have been warned!

Installation

Via binary releases or:

$ go get github.com/tj/sdns/cmd/sdns

Usage

Run with config:

$ sdns < domains.yml

Configuration example:

bind: ":5000"
upstream:
  - 8.8.8.8
  - 8.8.4.4
domains:
  - name: foo
    command: |
      echo '[{ "type": "A", "value": "1.1.1.1", "ttl": 60 }, { "type": "A", "value": "1.1.1.4", "ttl": 60 }]'
  - name: bar
    command: |
      echo '[{ "type": "A", "value": "1.1.1.2", "ttl": 60 }]'
  - name: foo.bar
    command: |
      echo '[{ "type": "A", "value": "1.1.1.3", "ttl": 300 }]'
  - name: boom
    command: |
      echo 'something goes boom' && exit 1

Dig it:

$ dig @127.0.0.1 -p 5000 something.foo +short
1.1.1.1
1.1.1.4

$ dig @127.0.0.1 -p 5000 something.bar +short
1.1.1.2

$ dig @127.0.0.1 -p 5000 something.foo.bar +short
1.1.1.3

$ dig @127.0.0.1 -p 5000 segment.com +short
54.213.169.105

Resolvers

  • sdns-ec2: resolves AWS EC2 hosts via the Name tag

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].