feat: add upstream default upstream dns server as CLI flag
parent
9320c2675a
commit
4b0589ddb0
9
main.go
9
main.go
|
|
@ -13,9 +13,10 @@ import (
|
|||
)
|
||||
|
||||
var (
|
||||
dbPath = flag.String("db-path", ".", "Directory to write database files to")
|
||||
httpAddr = flag.String("http-address", ":80", "Bind address for http server")
|
||||
dnsAddr = flag.String("dns-address", ":53", "Bind address for dns server")
|
||||
dbPath = flag.String("db-path", ".", "Directory to write database files to")
|
||||
httpAddr = flag.String("http-address", ":80", "Bind address for http server")
|
||||
dnsAddr = flag.String("dns-address", ":53", "Bind address for dns server")
|
||||
defaultUpstream = flag.String("upstream", "1.1.1.1:53", "default upstream DNS server when no others are specified")
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
@ -57,7 +58,7 @@ func main() {
|
|||
Storage: store,
|
||||
RuleEvaluator: re,
|
||||
Recursors: internal.Recursor{
|
||||
Upstreams: []string{"1.1.1.1:53"},
|
||||
Upstreams: []string{*defaultUpstream},
|
||||
Client: dnsClient,
|
||||
},
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue