Laurence Withers 15b34b43ad | ||
---|---|---|
cmd/example | ||
.gitignore | ||
LICENSE | ||
README.md | ||
go.mod | ||
reverse.go | ||
reverse_test.go | ||
server.go | ||
xlist.go |
README.md
dnsxl
DNS xList (blocklist / allowlist / RBL) implementation for Go, based on RFC 5782.
Quick start:
import "src.lwithers.me.uk/go/dnsxl"
func main() {
xlist := dnsxl.New(nil)
xlist.AddServers("zen.spamhaus.org")
res, err := xlist.LookupIP(net.IP4(102, 158, 172, 138)
if err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
fmt.Printf("Weight: %d\n", res.Weight())
}
A slightly more fully-fledged example is found in cmd/example
.