feat: Trace #162

Merged
sam merged 8 commits from trace into master 2022-12-10 17:51:50 +00:00
Showing only changes of commit 9bd06d0509 - Show all commits

View file

@ -98,7 +98,11 @@ func run(args []string) (opts *util.Options, code int, err error) {
https://pkg.go.dev/github.com/miekg/dns@v1.1.50
*/
_ = resp.DNS.Answer[r.Intn(len(resp.DNS.Answer))]
if opts.Request.Name == "." {
opts.Request.Server = resp.DNS.Answer[r.Intn(len(resp.DNS.Answer))].Header().Name
} else {
opts.Request.Server = resp.DNS.Answer[r.Intn(len(resp.DNS.Ns))].Header().Name
}
opts.TLS = false
opts.HTTPS = false