Return environment variables that route HTTPS traffic through the CONNECT proxy.
(self)
| 142 | return self._proxy_url |
| 143 | |
| 144 | def get_proxy_env(self) -> dict[str, str]: |
| 145 | """Return environment variables that route HTTPS traffic through the CONNECT proxy.""" |
| 146 | if not self._connect_proxy_url or not self._ca_file_path: |
| 147 | return {} |
| 148 | |
| 149 | no_proxy = "127.0.0.1,localhost,::1" |
| 150 | return { |
| 151 | "HTTP_PROXY": self._connect_proxy_url, |
| 152 | "HTTPS_PROXY": self._connect_proxy_url, |
| 153 | "http_proxy": self._connect_proxy_url, |
| 154 | "https_proxy": self._connect_proxy_url, |
| 155 | "NO_PROXY": no_proxy, |
| 156 | "no_proxy": no_proxy, |
| 157 | "NODE_EXTRA_CA_CERTS": self._ca_file_path, |
| 158 | "SSL_CERT_FILE": self._ca_file_path, |
| 159 | "REQUESTS_CA_BUNDLE": self._ca_file_path, |
| 160 | "CURL_CA_BUNDLE": self._ca_file_path, |
| 161 | "GIT_SSL_CAINFO": self._ca_file_path, |
| 162 | "GH_TOKEN": "", |
| 163 | "GITHUB_TOKEN": "", |
| 164 | "GH_ENTERPRISE_TOKEN": "", |
| 165 | "GITHUB_ENTERPRISE_TOKEN": "", |
| 166 | } |