Skip to content

Commit

Permalink
* whois: use the upstream server to resolve whois server hostname
Browse files Browse the repository at this point in the history
  • Loading branch information
szolin committed May 27, 2020
1 parent 8c5a3c5 commit dc38f66
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion home/whois.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package home

import (
"context"
"encoding/binary"
"fmt"
"io/ioutil"
Expand Down Expand Up @@ -120,7 +121,7 @@ func (w *Whois) query(target string, serverAddr string) (string, error) {
if addr == "whois.arin.net" {
target = "n + " + target
}
conn, err := net.DialTimeout("tcp", serverAddr, time.Duration(w.timeoutMsec)*time.Millisecond)
conn, err := customDialContext(context.TODO(), "tcp", serverAddr)
if err != nil {
return "", err
}
Expand Down

0 comments on commit dc38f66

Please sign in to comment.