Skip to content

Instantly share code, notes, and snippets.

@jmurowaniecki
Last active March 17, 2016 13:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jmurowaniecki/29e0452a918ce1371acd to your computer and use it in GitHub Desktop.
Save jmurowaniecki/29e0452a918ce1371acd to your computer and use it in GitHub Desktop.
Configura proxy no trampo
#!/bin/bash
echo "Preparando para restringir acessos pelo proxy do trampo.."
ONEPROXYTOBLOCKTHEMALL=192.168.200.250:3128
if [ "`cat ~/.bashrc|grep http_proxy`" == "" ]; then
echo "
export https_proxy=https://${ONEPROXYTOBLOCKTHEMALL}
export http_proxy=http://${ONEPROXYTOBLOCKTHEMALL}
export ftp_proxy=http://${ONEPROXYTOBLOCKTHEMALL}
export HTTPS_PROXY=https://${ONEPROXYTOBLOCKTHEMALL}
export HTTP_PROXY=http://${ONEPROXYTOBLOCKTHEMALL}
export FTP_PROXY=http://${ONEPROXYTOBLOCKTHEMALL}
" >> ~/.bashrc
echo "O proxy já está configurado. Reinicie sua sessão para que faça efeito."
else
echo "O proxy já estava configurado."
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment