Its quite often a necessity to proxy all outgoing requests when working for a corporation. Some of the organisations require to proxy https traffic as well as http. In this setup the company ends up as a man-in-the-middle generating certificates on the fly. In this blog post I’ve gathered most configurations and tweaks I’ve applied when working behind and untrusted proxy.

.gemrc

http_proxy: http://proxy:port
:ssl_verify_mode: 0

.npmrc

registry=http://registry.npmjs.org/
proxy=http://proxy:port/
https-proxy=http://proxy:port/
strict-ssl=false

.bowerrc

{
    "proxy": "http://proxy:port",
    "https-proxy": "http://proxy:port",
    "strict-ssl": false
}

.gitconfig

[http]
    proxy = http://proxy:port
[https]
    proxy = http://proxy:port

Gemfile

source "http://rubygems.org"

env system variables (windows)

setx /s HTTP_PROXY http://proxy:port/ /m
setx /s HTTPS_PROXY http://proxy:port/ /m
setx /s NO_PROXY .localhost,.domain.local /m

settings.json (visual studio code)

{
  "http.proxy": "http://proxy:port/",
  "http.proxyStrictSSL": false
}

add certificate to keychain (java)

keytool -importcert -file <cert file> -keystore <path to JRE installation>/lib/security/cacerts