2009年10月4日星期日

[GFW BLOG] UBUNTU下架设及使用GAPPProxy

作者:令狐葱   来源:令狐葱@关注互联网

一、服务器的架设


1. 必须要有个Google帐号并申请了Google app engine,地址为http://appengine.google.com/(注:申请要手机号的)
2. 下载并安装Python,可以使用新立得。
3. 下载并解压安装Google App Engine 的开发包,地址为http://code.google.com/appengine/downloads.html(我安装在/home/dennis/google_appengine)。
4. 去http://code.google.com/p/gappproxy/ 中下载fetchserver-1.0.0beta-fix.tar.gz这个文件,并解压到Google App Engine SDK安装目录里(即/home/dennis/google_appengine)。
5. 把fetchserver中的app.yaml用编辑器打开,修改内容如下:
第一行的部分填你的application帐号,比如你的AppEngine地址是aaa.appspot.com,那就是application帐号就是aaa
6. 终端运行下面的命令,上传文件。输入:appcfg.py update fetchserver
然后它会提示你输入google帐户和密码
dennis@dennis-laptop:~$ cd google_appengine/
dennis@dennis-laptop:~/google_appengine$ python appcfg.py update fetchserver
appcfg.py:41: DeprecationWarning: the sha module is deprecated; use the hashlib module instead
  os.path.join(DIR_PATH, 'lib', 'antlr3'),
Scanning files on local disk.
Initiating update.
Email: jiguofei@gmail.com
Password for jiguofei@gmail.com:
Cloning 3 application files.
Deploying new version.
Checking if new version is ready to serve.
Will check again in 1 seconds.
Checking if new version is ready to serve.
Will check again in 2 seconds.
Checking if new version is ready to serve.
Closing update: new version is ready to start serving.
即说明已经成功了。

二、本地设置

1. 下载网址上的完整源码包,把里面的localproxy解压出来放在任意文件夹内,比如localproxy
2. 用文本编辑器编辑文件夹中的proxy.conf,里面有三行fetch_server = …….的,随便改一行为http://abcde.appspot.com/fetch.py并且去年本行前面的#就可以保存了。
3. 用cd命令进入localproxy然后运行python proxy.py即可,如果看到以下四行,说明成功:
dennis@dennis-laptop:~/gappproxy-1.0.0beta/localproxy$ proxy.py
--------------------------------------------
HTTP Enabled : YES
HTTPS Enabled: YES
Direct Fetch : YES
Local Proxy  :
Fetch Server : http://linghucong.appspot.com/fetch.py
--------------------------------------------
4. 设置浏览器的本地代理,就是把代理IP设置成为127.0.0.1,端口设为8000。当然也可以使用autoproxy。
5. 如果图方便可以在桌面建立一个launcher,Type类型选application in terminal,命令Command写上python /file_folder/localproxy/proxy.py。(其中file_folder是localproxy目录的路径)

--
Posted By GFW Blog to GFW BLOG at 10/04/2009 03:06:00 A
--~--~---------~--~----~------------~-------~--~----~
1、请点击www.chinagfw.org访问我们,订阅地址:http://feeds2.feedburner.com/chinagfwblog。2、需要Psiphon2注册邀请的朋友,请向english@sesawe.net发送电子邮件请求,说明 "can I have psiphon2 access" 并告诉您所在的国家。也可以使用Twitter Direct Messages或登陆Psiphon网站直接向Psiphon索取使用邀请。3、GFW Blog现提供最新翻墙工具下载(地址一、二、三),翻墙(突破网络封锁)方法介绍请见本站anti-censorship部分。4、本站热烈欢迎各位朋友投稿或推荐文章,请发邮件至chinagfwblog[at]gmail.com。5、敬请关注、支持、参与Sesawe和黑箱监管集体诉讼。
To unsubscribe from this group, send email to
gfw-blog+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/gfw-blog?hl=zh-CN
-~----------~----~----~----~------~----~------~--~---

没有评论:

发表评论