Closed mutability closed 2 years ago
The amount of code seems disproportionate to the task at hand.
Some searching seems to indicate that forcing IPv4 only is much easier with urllib3 ( https://stackoverflow.com/questions/33046733/force-requests-to-use-ipv4-ipv6 ), maybe it would make sense to limit IPv4 only mode to cases where urllib3 is in use.
Oh yeah, it'd be way cleaner to use that. Let me poke at that approach a bit.
Closing in favour of #14
This is a bit ugly but I'm not aware of a cleaner way to make urllib do ipv4 only.
The background here is that we mirror from an IPv6-connected system that prefers v6 over v4, but the v6 connectivity specifically to archive.raspbian.org and some/all of the v6 mirrordirector mirrors is not good (<<1Mbps) because wider internet IPv6 interconnectivity is still trash, and so the mirror has trouble staying up to date.