# `Attesto.IPAddress`
[🔗](https://github.com/XukuLLC/attesto/blob/v2.5.0/lib/attesto/ip_address.ex#L1)

Address policy for outbound server-side fetches.

`public_fetch_destination?/1` accepts valid IP tuples that are suitable for
fetching an Internet resource and fails closed for malformed input. The
policy follows the IANA IPv4 and IPv6 Special-Purpose Address Registries:
non-global, scoped, multicast, documentation, benchmarking, and reserved
destinations are refused, while the registries' more-specific globally
reachable allocations remain usable.

IPv4-compatible, IPv4-mapped, NAT64, and 6to4 forms are checked against the
embedded IPv4 destination so an alternate representation cannot bypass the
IPv4 policy.

See:

  * https://www.iana.org/assignments/iana-ipv4-special-registry/
  * https://www.iana.org/assignments/iana-ipv6-special-registry/

# `ip_address`

```elixir
@type ip_address() :: :inet.ip_address()
```

# `public_fetch_destination?`

```elixir
@spec public_fetch_destination?(term()) :: boolean()
```

Returns whether an IP tuple is a public destination for a server-side fetch.

Invalid tuple sizes, non-integer components, and out-of-range components are
rejected. Hostname resolution and DNS-rebinding protection remain the
caller's responsibility.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
