Skip to content

Commit

Permalink
Use the proxies in the updater.
Browse files Browse the repository at this point in the history
  • Loading branch information
renpytom committed Mar 9, 2024
1 parent 3d6c00d commit 784fbff
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions renpy/update/download.py
Expand Up @@ -22,6 +22,8 @@
from __future__ import division, absolute_import, with_statement, print_function, unicode_literals
from renpy.compat import PY2, basestring, bchr, bord, chr, open, pystr, range, round, str, tobytes, unicode # *

import renpy

import requests
import re
import os
Expand Down Expand Up @@ -131,7 +133,7 @@ def download_ranges(url, ranges, destination, progress_callback=None):
"Accept-Encoding": "identity",
}

r = requests.get(url, headers=headers, stream=True, timeout=10)
r = requests.get(url, headers=headers, stream=True, timeout=10, proxies=renpy.exports.proxies)
r.raise_for_status()

blocks = [ ]
Expand Down Expand Up @@ -210,7 +212,7 @@ def download(url, ranges, destination, progress_callback=None):
total_size = sum(i[1] for i in ranges)
downloaded = 0

r = requests.get(url, stream=True, headers={"Accept-Encoding": "identity"}, timeout=10)
r = requests.get(url, stream=True, headers={"Accept-Encoding": "identity"}, timeout=10, proxies=renpy.exports.proxies)
r.raise_for_status()

blocks = [ ]
Expand Down

0 comments on commit 784fbff

Please sign in to comment.