Improved private IPv4 and IPv6 detection

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| Tests pass?   | no
| Related tickets | #3
| License       | MIT