mirror of
https://github.com/m13253/dns-over-https.git
synced 2026-05-25 20:44:17 +00:00
Allow multiple bootstrap servers
This commit is contained in:
+6
-1
@@ -21,6 +21,7 @@ package main
|
||||
import (
|
||||
"flag"
|
||||
"log"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func main() {
|
||||
@@ -32,7 +33,11 @@ func main() {
|
||||
verbose := flag.Bool("verbose", false, "Enable logging")
|
||||
flag.Parse()
|
||||
|
||||
client, err := NewClient(*addr, *upstream, *bootstrap, *timeout, *noECS, *verbose)
|
||||
bootstraps := []string {}
|
||||
if *bootstrap != "" {
|
||||
bootstraps = strings.Split(*bootstrap, ",")
|
||||
}
|
||||
client, err := NewClient(*addr, *upstream, bootstraps, *timeout, *noECS, *verbose)
|
||||
if err != nil { log.Fatalln(err) }
|
||||
_ = client.Start()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user