Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib/mirrors.py
diff options
context:
space:
mode:
authorAnton Hvornum <anton@hvornum.se>2021-06-01 20:11:25 +0200
committerAnton Hvornum <anton@hvornum.se>2021-06-01 20:11:25 +0200
commit32dce852570c3e489f08549e8c0c453ce4184afe (patch)
tree8832d66015d9cfa4a224e32c8d0509d22281e9a2 /archinstall/lib/mirrors.py
parent615d0d38dd577a054151abcebf32b3a30b98e3fd (diff)
Introduces HTTP mirror selection
Diffstat (limited to 'archinstall/lib/mirrors.py')
-rw-r--r--archinstall/lib/mirrors.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/archinstall/lib/mirrors.py b/archinstall/lib/mirrors.py
index ccfc2808..fad3b129 100644
--- a/archinstall/lib/mirrors.py
+++ b/archinstall/lib/mirrors.py
@@ -16,7 +16,7 @@ def filter_mirrors_by_region(regions, destination='/etc/pacman.d/mirrorlist', *a
region_list = []
for region in regions.split(','):
region_list.append(f'country={region}')
- response = urllib.request.urlopen(urllib.request.Request(f"https://archlinux.org/mirrorlist/?{'&'.join(region_list)}&protocol=https&ip_version=4&ip_version=6&use_mirror_status=on'", headers={'User-Agent': 'ArchInstall'}))
+ response = urllib.request.urlopen(urllib.request.Request(f"https://archlinux.org/mirrorlist/?{'&'.join(region_list)}&protocol=https&protocol=http&ip_version=4&ip_version=6&use_mirror_status=on'", headers={'User-Agent': 'ArchInstall'}))
new_list = response.read().replace(b"#Server", b"Server")
with open(destination, "wb") as mirrorlist:
mirrorlist.write(new_list)
@@ -79,7 +79,7 @@ def re_rank_mirrors(top=10, *positionals, **kwargs):
def list_mirrors():
- url = "https://archlinux.org/mirrorlist/?protocol=https&ip_version=4&ip_version=6&use_mirror_status=on"
+ url = "https://archlinux.org/mirrorlist/?protocol=https&protocol=http&ip_version=4&ip_version=6&use_mirror_status=on"
regions = {}
try: