Looking at what is labeled "ISSUE 3" in the specification it does seem reasonable to assume that once a connection is established there is IP address information, but currently that happens in https://fetch.spec.whatwg.org/#concept-http-network-fetch whereas some of the IP address checks in your algorithms seem to be placed elsewhere.
Looking at what is labeled "ISSUE 3" in the specification it does seem reasonable to assume that once a connection is established there is IP address information, but currently that happens in https://fetch.spec.whatwg.org/#concept-http-network-fetch whereas some of the IP address checks in your algorithms seem to be placed elsewhere.