Skip to content
Commit 6eb44978 authored by Alexis Deruelle's avatar Alexis Deruelle
Browse files

feat: implement proxy handling with urllib3

Since refactoring in !64, tokens are generated using 'urllib3' instead
of the 'requests' library.

However urllib3 does not honor proxy related environement variables which
breaks pipelines using Google Cloud authentication in runners behind a
proxy.

This commit implements proxy handling with urllib3:

- Check for https_proxy, HTTPS_PROXY, http_proxy or HTTP_PROXY
  environment variables (by order of precedence),
- parse proxy url from first detected variable,
- set authentication info if present,
- use urllib3.ProxyManager() if proxy is set,
- fallback to urllib3.PoolManager() otherwise.

fixes: 5d44387979f888ed2091b68429b2357c2f4025e0
parent b2b110b0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment