Sign inSign up

vlopatkin/go-dns-proxy

By vlopatkin

•Updated about 7 years ago

Image
0

1.0K

vlopatkin/go-dns-proxy repository overview

⁠DNS Proxy

A simple DNS proxy written in go based on github.com/miekg/dns⁠

CircleCI Docker Build

⁠How to use it

⁠Docker

$ docker run -p 53:53/udp vlopatkin/go-dns-proxy:latest -use-outbound -json-config='{
    "default_dns": "8.8.8.8:53",
    "servers": {
        "google.com" : "8.8.8.8:53"
    },
    "domains": {
        "**.test.com" : "127.0.0.1"
    }
}'

⁠Download executables

Download⁠

⁠Go get

$ go get github.com/vlopatkin/go-dns-proxy
$ go-dns-proxy -use-outbound -json-config='{
    "default_dns": "8.8.8.8:53",
    "servers": {
        "google.com" : "8.8.8.8:53"
    },
    "domains": {
        "**.test.com" : "127.0.0.1"
    }
}'

⁠Arguments

  -expiration int
    	cache expiration time in seconds (default -1)
  -file string
    	config filename (default "config.json")
  -json-config string
    	config in json format
  -log-level string
    	log level, accepts err, info, none (default "info")
  -port int
    	UDP port, use with use-outbound flag (default 53)
  -use-outbound
    	use outbound address of the host for incoming connections

⁠Config file format

{
    "host": "localhost:35353",
    "default_dns": "8.8.8.8:53",
    "servers": {
        "google.com" : "8.8.8.8:53"
    },
    "domains": {
        "**.test.com" : "127.0.0.1"
    }
}

Tag summary

Content type

Image

Digest

Size

6.8 MB

Last updated

about 7 years ago

docker pull vlopatkin/go-dns-proxy