首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 编程 >

ubuntu停翻墙GAE

2013-09-17 
ubuntu下翻墙GAE确保系统装有Python 下载goagent:http://code.google.com/p/goagent/ 下载SwitchyOption.b

ubuntu下翻墙GAE


  • 确保系统装有Python 
  • 下载goagent:http://code.google.com/p/goagent/ 
  • 下载SwitchyOption.bak: https://code.google.com/p/goagent/downloads/list (Chrome代理需要)
  • 修改local/proxy.ini中appid为你申请的id,最多可以申请10个,可以申请多个,一个一天限量1G,足够用了,例如我申请两个visayafan,visayafan1
  • 命令行下$python server/uploader.zip(你的这个文件所在的位置),依次输入visayafan,email和password(是Application密码,而非邮箱密码,如果没有,申请:https://www.google.com/accounts/IssuedAuthSubTokens, 用邮箱密码登陆后会给你的手机发送verify code短信,接着generator一个),需要输入两次。成功后接着输入第2个ID:visayafan1,依此类推。
    如果这里出现问题,类似:
    server$ python uploader.zip APPID:visayafanApplication: visayafanHost: appengine.google.comINFO - - [Sep  8 08:32:21] Server: appengine.google.comRolling back the update.Email: visayafan@gmail.comPassword for visayafan@gmail.com: Traceback (most recent call last):  File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main    "__main__", fname, loader, pkg_name)  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code    exec code in run_globals  File "uploader.zip/__main__.py", line 10, in <module>  File "uploader.zip/__main__.py", line 6, in main  File "uploader.zip/appcfg.py", line 206, in main  File "uploader.zip/appcfg.py", line 197, in upload  File "uploader.zip/google/appengine/tools/appcfg.py", line 3873, in main  File "uploader.zip/google/appengine/tools/appcfg.py", line 2443, in Run  File "uploader.zip/google/appengine/tools/appcfg.py", line 3638, in __call__  File "uploader.zip/google/appengine/tools/appcfg.py", line 3141, in Rollback  File "uploader.zip/google/appengine/tools/appcfg.py", line 3158, in _Rollback  File "uploader.zip/google/appengine/tools/appcfg.py", line 2018, in Rollback  File "uploader.zip/google/appengine/tools/appcfg.py", line 1698, in Send  File "uploader.zip/google/appengine/tools/appengine_rpc.py", line 378, in Send  File "uploader.zip/google/appengine/tools/appengine_rpc.py", line 436, in _Authenticate  File "uploader.zip/google/appengine/tools/appengine_rpc.py", line 280, in _Authenticate  File "uploader.zip/google/appengine/tools/appengine_rpc.py", line 219, in _GetAuthToken  File "/usr/lib/python2.7/urllib2.py", line 391, in open    response = self._open(req, data)  File "/usr/lib/python2.7/urllib2.py", line 409, in _open    '_open', req)  File "/usr/lib/python2.7/urllib2.py", line 369, in _call_chain    result = func(*args)  File "/usr/lib/python2.7/urllib2.py", line 1193, in https_open    return self.do_open(httplib.HTTPSConnection, req)  File "uploader.zip/fancy_urllib/__init__.py", line 367, in do_open    urllib2.URLError: <urlopen error [Errno 32] Broken pipe>

    解决办法:

    1. Unzip uploader.zip   $ unzip uploader.zip2. Edit appcfg.py, comment out this line from   fancy_urllib._create_connection = socket_create_connection   to   #fancy_urllib._create_connection = socket_create_connection3. Run   $ (export uploaddir=python; python __main__.py )
    • Chrome安装插件 Proxy SwitchySharp,插件的options->improt/export->restore from file选中下载的SwitchyOption.bak
    • 切换Proxy SwitchySharp为Auto Switch Mode
    • 终端运行命令:$sudo python /media/软件/goagent-goagent-v3.0.1-55-g259441f/goagent-goagent-259441f/local/proxy.py(你的这个文件所在的位置)
    • 配置成功
    • 访问twitter和G+的时候遇到证书不信任问题:
      $certutil -d sql:$HOME/.pki/nssdb -A -t "C,," -n GoAgent -i ~/goagent/local/CA.crt

热点排行