(proxy_url: &str)
| 6 | const LOCAL_NO_PROXY: &str = "127.0.0.1,localhost,::1"; |
| 7 | |
| 8 | pub fn proxy_env_vars(proxy_url: &str) -> [(&'static str, String); 9] { |
| 9 | [ |
| 10 | ("ALL_PROXY", proxy_url.to_owned()), |
| 11 | ("HTTP_PROXY", proxy_url.to_owned()), |
| 12 | ("HTTPS_PROXY", proxy_url.to_owned()), |
| 13 | ("NO_PROXY", LOCAL_NO_PROXY.to_owned()), |
| 14 | ("http_proxy", proxy_url.to_owned()), |
| 15 | ("https_proxy", proxy_url.to_owned()), |
| 16 | ("no_proxy", LOCAL_NO_PROXY.to_owned()), |
| 17 | ("grpc_proxy", proxy_url.to_owned()), |
| 18 | // Node.js only honors HTTP(S)_PROXY for built-in fetch/http clients when |
| 19 | // proxy support is explicitly enabled at process startup. |
| 20 | ("NODE_USE_ENV_PROXY", "1".to_owned()), |
| 21 | ] |
| 22 | } |
| 23 | |
| 24 | pub fn tls_env_vars( |
| 25 | ca_cert_path: &Path, |
no outgoing calls