-
-
Notifications
You must be signed in to change notification settings - Fork 10
Description
In Node 17+, making requests to *.meh domains from within Node (e.g. via built-in fetch) is failing with Error: connect ECONNREFUSED ::1:443.
Turns out that Node 17 changes the default sorting order for DNS records so that IPv4 records are no longer sorted ahead of IPv6 by default: nodejs/node#39987
So instead of using 127.0.0.1, requests now resolve to ::1 as the default behaviour.
The cause of the failed requests (at least on MacOS) seems to be this line in meh.firewall.plist: if I change 127.0.0.1 to ::1 it appears to all go back to a working state, however, I'm not smart enough to understand why, so I'm hesitant to make a PR suggesting a change! But it looks to be something with the firewall rule not forwarding traffic in an IPv6 friendly way.
Hope that's useful! 🙂