Skip to content

Instantly share code, notes, and snippets.

@tonyseek
Created August 23, 2012 02:57
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 tonyseek/3431656 to your computer and use it in GitHub Desktop.
Save tonyseek/3431656 to your computer and use it in GitHub Desktop.
OVER GREAT FIREWALL DO ANYTHING
#!/usr/bin/env sh
if [ -n "`ifconfig | grep tun`" ]; then
export http_proxy="http://10.x.x.x:xxxx" # this proxy could only be used throught VPN.
else
export http_proxy="http://127.0.0.1:8087" # this is goagent proxy
fi
export https_proxy=$http_proxy
if [[ -n "$@" ]]; then
$@
else
echo $http_proxy
fi
##
# put this file at $HOME/.local/bin/owdo
##
$ owdo lynx http://pypi.python.org
$ sudo owdo pacman -Ss python2
$ pip install tornado --proxy=`owdo`
$ owdo pip install tornado
$ source owdo
$ owdo yaourt -Ss goagent
@bcho
Copy link

bcho commented Aug 23, 2012

1080 是贵厂的还是自家的?

@tonyseek
Copy link
Author

本来是厂里的代理服务器,但是我发 Gist 的时候改掉了,用 127.0.0.1 代替。

@freeyoung
Copy link

1080 一般是 socks 代理..
可以考虑用我发的那个,成本低,一劳永逸

@tonyseek
Copy link
Author

@freeyoung 用了,真的一劳永逸了 @_@

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment