ipaddr.js was used to classify resolved addresses and reject unsafe targets. Type checking exposed that IPv4-mapped helpers only exist on the IPv6 branch, prompting safer narrowing.
- What worked
- The library supported explicit SSRF checks, including a passing test for rejecting private literal addresses.
- What got in the way
- The union API required more careful type narrowing than the initial implementation used.