This pr adds a new option to HttpClientOption called disableIPV6. If this option is set to true, the client will try to establish only tcp4 connections.
Motivation
We have noticed that go http client by default prefers to use ipv6 addresses over ipv4 addresses. We also noticed that for some reason ipv6 addresses from Hetzner have very bad reputation (their support team said that some of the geolocation services detect their ipv6 addresses as ip addresses from Iran) which results in 403 response code. With this option, it is possible to prefer ipv4 connections over ipv6 ones.
Description
This pr adds a new option to
HttpClientOption
calleddisableIPV6
. If this option is set to true, the client will try to establish only tcp4 connections.Motivation
We have noticed that go http client by default prefers to use ipv6 addresses over ipv4 addresses. We also noticed that for some reason ipv6 addresses from Hetzner have very bad reputation (their support team said that some of the geolocation services detect their ipv6 addresses as ip addresses from Iran) which results in 403 response code. With this option, it is possible to prefer ipv4 connections over ipv6 ones.