-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(proxies): use pypac to use PAC file (#560)
Introduce support for PAC file for proxy definition. QDT will first try to use `QDT_PROXY_HTTP` environment variable then new environment variable `QDT_PAC_FILE` for custom PAC file then system PAC if available.
- Loading branch information
Showing
9 changed files
with
214 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
from pathlib import Path | ||
|
||
from qgis_deployment_toolbelt.utils.file_downloader import download_remote_file_to_local | ||
|
||
# Should not use proxy | ||
remote_url_to_download: str = ( | ||
"https://sigweb-rec.grandlyon.fr/qgis/plugins/dtdict.0.1.zip" | ||
|
||
) | ||
|
||
local_file_path: Path = Path("tests/fixtures/tmp/").joinpath( | ||
remote_url_to_download.split("/")[-1] | ||
) | ||
local_file_path.parent.mkdir(parents=True, exist_ok=True) | ||
|
||
# Should use proxy | ||
remote_url_to_download: str = ( | ||
"https://plugins.qgis.org/plugins/french_locator_filter/version/1.1.1/download/" | ||
) | ||
|
||
local_file_path: Path = Path("tests/fixtures/tmp/french_locator_filter.zip") | ||
local_file_path.parent.mkdir(parents=True, exist_ok=True) | ||
|
||
|
||
download_remote_file_to_local(remote_url_to_download=remote_url_to_download, | ||
local_file_path=local_file_path) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters