Skip to content

Golang DNS nameserver supports IP health check and foreign upstream

License

Notifications You must be signed in to change notification settings

io-developer/go-nameserver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-nameserver

Golang DNS nameserver supporting hostname health check and foreign DNS upstream

Docker Automated build

Docker

Docker Hub repository

iodeveloper/go-nameserver:latest

Example docker-compose.yml

version: '3.4'

services:
  local:
    image: iodeveloper/go-nameserver:latest
    restart: always
    command: ["--upstream", "tun:53", "--verbose"]
    ports:
       - '1053:53/udp'
    volumes:
       - ./records-local.json:/records.json

  tun:
    image: iodeveloper/go-nameserver:latest
    restart: always
    command: ["--upstream", "1.1.1.1:53", "--verbose"]
    ports:
       - '1054:53/udp'
    volumes:
       - ./records-tun.json:/records.json

Example local run

Run server:

go run main.go --listen '0.0.0.0:1053' --records './records.json' --upstream '8.8.8.8:53' --verbose

And get dns in other cli:

dig node2.local @127.0.0.1 -p 1053

In server logs: image

DIG response: image

About

Golang DNS nameserver supports IP health check and foreign upstream

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published