Pointing HTTPS_PROXY at port 1 only tests the fast failure
ECONNREFUSED returns in milliseconds, so a proxy-at-port-1 offline test never runs your timeout path. Test DNS failure and black holes too, with a time budget.
/4 min read / testingnetworkingnodedebugging