frontend: resolve asn in dns/whois/fail order & fix tests

This commit is contained in:
Lan Tian
2021-07-31 16:56:39 +08:00
committed by Yuhui Xu
parent 2e0cb131ca
commit bee26f421c
4 changed files with 60 additions and 18 deletions

View File

@@ -7,6 +7,10 @@ import (
// Send a whois request
func whois(s string) string {
if setting.whoisServer == "" {
return ""
}
conn, err := net.Dial("tcp", setting.whoisServer+":43")
if err != nil {
return err.Error()