Created
November 8, 2015 12:40
-
-
Save jctosta/b2bf40aa962aadcaef33 to your computer and use it in GitHub Desktop.
Script para configuração automática de proxy em sistemas Linux
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Terminal Settings (WGET, Apt e etc.) | |
export http_proxy=http://localhost:3128 | |
export https_proxy=$http_proxy | |
export ftp_proxy=$http_proxy | |
export rsync_proxy=$http_proxy | |
export no_proxy=localhost,127.0.0.1,localaddress,.localdomain.com,10.* | |
# Configurações para proxy automático em ambientes Gnome | |
if hash gsettings 2>/dev/null; then | |
gsettings set org.gnome.system.proxy autoconfig-url '<pac_file_location>' | |
gsettings set org.gnome.system.proxy mode 'auto' | |
fi | |
# Git | |
if hash git 2>/dev/null; then | |
git config --global http.proxy $http_proxy | |
git config --global https.proxy $http_proxy | |
git config --global url."https://".insteadOf git:// | |
fi | |
# Configurações de Proxy do NPM | |
if hash npm 2>/dev/null; then | |
npm config set https-proxy $http_proxy | |
npm config set http-proxy $http_proxy | |
fi | |
# Configurações de Proxy do Editor ATOM | |
if hash apm 2>/dev/null; then | |
apm config set https-proxy $http_proxy | |
apm config set http-proxy $http_proxy | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment