feat: Trace #162
1 changed files with 5 additions and 1 deletions
6
main.go
6
main.go
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue