DEV Community

Coles C
Coles C

Posted on

CONFIGURAR UN PROXY CORPORATIVO

Cuando la aplicación de consola se utiliza en una empresa, probablemente necesitará configurar todas las herramientas para salir a internet por el proxy corporativo.

Suponiendo que el proxy tiene los siguientes elementos

  • username
  • password
  • host
  • port

Da como resultado la siguiente configuracion http://username:password@host:port

Git proxy

use los siguientes comandos

git config --global http.proxy http://username:password@host:port git config --global https.proxy http://username:password@host:port 
Enter fullscreen mode Exit fullscreen mode

o editando directamente el archivo ~/.gitconfig

[http] proxy = http://username:password@host:port [https] proxy = http://username:password@host:port 
Enter fullscreen mode Exit fullscreen mode

NPM proxy

npm config set proxy http://username:password@host:port npm config set https-proxy http://username:password@host:port 
Enter fullscreen mode Exit fullscreen mode

o editando directamente el archivo ~/.npmrc

proxy=http://username:password@host:port https-proxy=http://username:password@host:port https_proxy=http://username:password@host:port 
Enter fullscreen mode Exit fullscreen mode

IONIC proxy

ionic config set -g proxy http://username:password@host:port ionic config set -g https-proxy http://username:password@host:port 
Enter fullscreen mode Exit fullscreen mode

Yarn proxy

yarn config set proxy http://username:password@host:port yarn config set https-proxy http://username:password@host:port 
Enter fullscreen mode Exit fullscreen mode

Top comments (0)