昨天无意发现了Google APP Engine。
google后,发现可以用来做个人代理服务器。
具体步骤如下:
1. 下载安装python2.6+。
2. 下载安装google app engine 的sdk。
通过google的帐户,申请一个app engine的project,记住id,如我的是wwtyler。
3. 在google code上下载GAppProxy (源码)。
具体信息可以参考
http://code.google.com/p/gappproxy/
4. 修改GAppProxy下fetchserver中的app.yaml,将application改为你的app engine project的ID
application: wwtyler
version: 1
runtime: python
api_version: 1
handlers:
- url: /fetch.py
script: fetch.py
- url: /admin.py
script: admin.py
5. 在GAppProxy的根目录下执行:
appcfg.py update fetchserver/
6. 执行过程中会要求输入google帐户的用户名和密码。这样就可以把fetchserver上传并部署到app engine上了。
7. 修改localproxy目录下proxy.conf文件的内容,设置fetch_server属性为你的google app engine上
fechserver的路径:
# GAppProxy configuration
# local_proxy
#local_proxy = host:port
#
# If local proxy needs authentication:
#local_proxy = user:passwd@host:port
# fetch server
#fetch_server = http://127.0.0.1:8080/fetch.py
#fetch_server = http://your-fetch-server.appspot.com/fetch.py
fetch_server = http://wwtyler.appspot.com/fetch.py
#fetch_server = http://fetchserver-nolog.appspot.com/fetch.py
8. 执行localproxy目录下的proxy.py文件,运行情况如下:

9. 设置浏览器中的代理配置。firefox浏览器建议按照foxyproxy插件,可以根据模式自动匹配是否使用代理服务器。
代理服务的地址:127.0.0.1, 端口:8000
10. 设置好后就可以通过fetchserver来充当代理服务器了。你可以试试访问manning.com这个网站。默认情况下国内是无法访问的。用了代理服务器后,就可以正常打开了。通过proxy.py的执行窗口可以看到访问的日志。如下:













2 Responses
Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.
app engine在国内不知道什么会被墙了。其实,dreamhost也可以用来做代理服务器
@lyoe
有时觉得dreamhost的访问速度不是太快,特别是在家里上网的时候。我用代理来上dreamhost的,特别是博客编辑管理的时候,如果太慢,很恼人的。速度感觉快那么一点,可能是心理作用。再就是用代理上些被封的网,如manning。很多书的源码都不能直接从manning.com上下载的