Skip to content

Commit

Permalink
Fix getDomainExpireTime()
Browse files Browse the repository at this point in the history
  • Loading branch information
nomeguy committed Feb 10, 2024
1 parent 3ce436a commit 275148b
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions object/cert_whois.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import (
"strings"
"time"

"github.com/casbin/caswaf/proxy"
"github.com/likexian/whois"
whoisparser "github.com/likexian/whois-parser"
)
Expand All @@ -44,15 +43,16 @@ func getDomainExpireTime(domainName string) (string, error) {
server = "whois.nic.run"
} else {
server = "grs-whois.hichina.com" // com, net, cc, tv
//return "", fmt.Errorf("unsupported suffix for domain: %s", domainName)
}

client := whois.NewClient()
if server != "whois.cnnic.cn" && server != "grs-whois.hichina.com" {
dialer := proxy.GetProxyDialer()
if dialer != nil {
client.SetDialer(dialer)
}
}
//if server != "whois.cnnic.cn" && server != "grs-whois.hichina.com" {
// dialer := proxy.GetProxyDialer()
// if dialer != nil {
// client.SetDialer(dialer)
// }
//}

data, err := client.Whois(domainName, server)
if err != nil {
Expand Down

0 comments on commit 275148b

Please sign in to comment.