File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
localstack-core/localstack/packages Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 1313from ..constants import LOCALSTACK_VENV_FOLDER , MAVEN_REPO_URL
1414from ..utils .archives import download_and_extract
1515from ..utils .files import chmod_r , chown_r , mkdir , rm_rf
16- from ..utils .http import download
16+ from ..utils .http import download , get_proxies
1717from ..utils .run import is_root , run
1818from ..utils .venv import VirtualEnvironment
1919from .api import InstallTarget , PackageException , PackageInstaller
@@ -198,7 +198,7 @@ def _get_download_url(self) -> str:
198198 gh_token = os .environ .get ("GITHUB_API_TOKEN" )
199199 if gh_token :
200200 headers = {"authorization" : f"Bearer { gh_token } " }
201- response = requests .get (self .github_tag_url , headers = headers )
201+ response = requests .get (self .github_tag_url , headers = headers , proxies = get_proxies () )
202202 if not response .ok :
203203 raise PackageException (
204204 f"Could not get list of releases from { self .github_tag_url } : { response .text } "
Original file line number Diff line number Diff line change 88from localstack .packages import InstallTarget , Package
99from localstack .packages .core import ArchiveDownloadAndExtractInstaller
1010from localstack .utils .files import rm_rf
11+ from localstack .utils .http import get_proxies
1112from localstack .utils .platform import Arch , get_arch , is_linux , is_mac_os
1213from localstack .utils .run import run
1314
@@ -169,7 +170,9 @@ def _download_url_latest_release(self) -> str:
169170 f"os={ self .os_name } &architecture={ self .arch } &image_type=jdk"
170171 )
171172 # Override user-agent because Adoptium API denies service to `requests` library
172- response = requests .get (endpoint , headers = {"user-agent" : USER_AGENT_STRING }).json ()
173+ response = requests .get (
174+ endpoint , headers = {"user-agent" : USER_AGENT_STRING }, proxies = get_proxies ()
175+ ).json ()
173176 return response [0 ]["binary" ]["package" ]["link" ]
174177
175178 def _download_url_fallback (self ) -> str :
You can’t perform that action at this time.
0 commit comments