a simple Go WHOIS Client API. It supports custom proxy.Dialer
for Socks5.
Query(ctx context.Context, domain string) (Response, error)
go get github.com/twiny/whois/v2
package main
import (
"context"
"fmt"
"github.com/twiny/whois/v2"
)
func main() {
client, err := whois.NewClient(nil)
if err != nil {
fmt.Printf("err: %s\n", err)
}
resp, err := client.Query(context.TODO(), "google.com")
if err != nil {
fmt.Printf("err: %s\n", err)
}
// Print the response
fmt.Printf("Domain: %+v\n", resp)
}
-
If you wish to add more WHOIS Server please create a PR.
-
If you find any issues please create a new issue.