Skip to content

Instantly share code, notes, and snippets.

@kenoir
Created September 4, 2012 08:37
Show Gist options
  • Save kenoir/3618577 to your computer and use it in GitHub Desktop.
Save kenoir/3618577 to your computer and use it in GitHub Desktop.
Proxy stuff for reith
> cat ~/proxies_off
#!/bin/sh
echo "Proxies OFF"
unset HTTP_PROXY
unset ALL_PROXY
unset http_proxy
unset HTTPS_PROXY
unset https_proxy
git config --global http.proxy ""
mv ~/.ssh/config ~/.ssh/config.off
> cat ~/proxies_on
#!/bin/sh
echo "Proxies ON"
export HTTP_PROXY=http://www-cache.reith.bbc.co.uk:80
export ALL_PROXY=http://www-cache.reith.bbc.co.uk:80
export http_proxy=http://www-cache.reith.bbc.co.uk:80
export HTTPS_PROXY=http://www-cache.reith.bbc.co.uk:80
export https_proxy=http://www-cache.reith.bbc.co.uk:80
git config --global http.proxy http://www-cache.reith.bbc.co.uk:80
mv ~/.ssh/config.off ~/.ssh/config
> cat ~/.ssh/config
Host *
ProxyCommand nc -x socks-gw.reith.bbc.co.uk:1085 %h %p
> cat ~/.bash_profile
alias on_reith=". proxies_on"
alias off_reith=". proxies_off"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment