Compare commits
No commits in common. "2167651569eda6168f262ea762de7526c4c153df" and "03ccb0c08c6b3b2b127ef39d0cff6c33c94aa7f3" have entirely different histories.
2167651569
...
03ccb0c08c
File diff suppressed because it is too large
Load Diff
|
|
@ -20,11 +20,10 @@ func (dm *DomainManager) ServeDNS(w dns.ResponseWriter, r *dns.Msg) {
|
||||||
start := time.Now()
|
start := time.Now()
|
||||||
q := r.Question[0]
|
q := r.Question[0]
|
||||||
responseMessage := new(dns.Msg)
|
responseMessage := new(dns.Msg)
|
||||||
|
|
||||||
ql := QueryLog{
|
ql := QueryLog{
|
||||||
Started: start.UTC(),
|
Started: start.UTC(),
|
||||||
Protocol: w.RemoteAddr().Network(),
|
Protocol: w.RemoteAddr().Network(),
|
||||||
ClientIP: w.RemoteAddr().String()[:strings.LastIndex(w.RemoteAddr().String(), ":")],
|
ClientIP: strings.Split(w.RemoteAddr().String(), ":")[0],
|
||||||
Domain: q.Name,
|
Domain: q.Name,
|
||||||
Status: NoAnswer,
|
Status: NoAnswer,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
3
main.go
3
main.go
|
|
@ -16,7 +16,6 @@ var (
|
||||||
dbPath = flag.String("db-path", ".", "Directory to write database files to")
|
dbPath = flag.String("db-path", ".", "Directory to write database files to")
|
||||||
httpAddr = flag.String("http-address", ":80", "Bind address for http server")
|
httpAddr = flag.String("http-address", ":80", "Bind address for http server")
|
||||||
dnsAddr = flag.String("dns-address", ":53", "Bind address for dns 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() {
|
func main() {
|
||||||
|
|
@ -58,7 +57,7 @@ func main() {
|
||||||
Storage: store,
|
Storage: store,
|
||||||
RuleEvaluator: re,
|
RuleEvaluator: re,
|
||||||
Recursors: internal.Recursor{
|
Recursors: internal.Recursor{
|
||||||
Upstreams: []string{*defaultUpstream},
|
Upstreams: []string{"1.1.1.1:53"},
|
||||||
Client: dnsClient,
|
Client: dnsClient,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue