ndfred / unifi-pi-hole

A Pi-hole equivalent for the Unifi Security Gateway
31 stars 1 forks source link

Handle domain extensions correctly #10

Closed ndfred closed 5 years ago

ndfred commented 5 years ago

The logic to determine whether a host is a domain is pretty crude, and doesn't consider domains like .co.uk (see the test_is_domain failure) Maybe we could use the tldextract module or import some of the code: https://github.com/john-kurkowski/tldextract