ipaddr
ipaddr copied to clipboard
Add reserved? method to detect reserved IP addresses
This library already has private?, link_local?, loopback?, etc.
It would be useful to have a reserved? method:
https://en.wikipedia.org/wiki/Reserved_IP_addresses
One of the reasons would be to mitigate SSRF attacks in a simple way, by limiting connections to "normal" "external" IP addresses (!ipaddr.reserved?).
Elixir already has a module for this: https://hexdocs.pm/safeurl/SafeURL.html