Skip to content

Instantly share code, notes, and snippets.

@murillomr7
Created June 29, 2017 21:55
Show Gist options
  • Save murillomr7/0b54b3198f0a75eb2c40df93afe0e477 to your computer and use it in GitHub Desktop.
Save murillomr7/0b54b3198f0a75eb2c40df93afe0e477 to your computer and use it in GitHub Desktop.
## Para configurar o proxy via comando direto no bash(terminal) use 'export' ##
## caso sua senha possua caractéres especiais, substitua desssa forma: ##
! - %21
@ - %40
# - %23
$ - %24
export http_proxy="http://<user>:<pass>@<proxy>:<port>/"
export https_proxy="http://<user>:<pass>@<proxy>:<port>/"
export ftp_proxy="http://<user>:<pass>@<proxy>:<port>/"
## instale o vim, se ainda não tiver ##
apt-get install vim
## crie variáveis de ambiente (precisa duplicar ambas em upper e lower case pq alguns apps olham p/ um ou outra) ##
vim /etc/environment
http_proxy="http://<user>:<pass>@<proxy>:<port>/"
https_proxy="http://<user>:<pass>@<proxy>:<port>/"
ftp_proxy="http://<user>:<pass>@<proxy>:<port>/"
HTTP_PROXY="http://<user>:<pass>@<proxy>:<port>/"
HTTPS_PROXY="http://<user>:<pass>@<proxy>:<port>/"
FTP_PROXY="http://<user>:<pass>@<proxy>:<port>/"
NO_PROXY="localhost,127.0.0.1,localaddress,.localdomain.com"
## crie um arquivo para configurar o apt-get
vim /etc/apt/apt.conf.d/95proxies
Acquire::http::Proxy "http://<user>:<pass>@<proxy>:<port>/";
Acquire::https::Proxy "http://<user>:<pass>@<proxy>:<port>/";
Acquire::ftp::Proxy "ftp://<user>:<pass>@<proxy>:<port>/";
## creditos: https://askubuntu.com/questions/175172/how-do-i-configure-proxies-without-gui ##
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment