Code Monkey home page Code Monkey logo

gappproxy's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

gappproxy's Issues

can't type password in DOS

can't type password in DOS

What version of the product are you using? On what operating system?
Python 2.6.4, Google App Engine SDK 1.3.0, and my os is windows7

Please provide any additional information below.
after installed Python 2.6.4 and Google App Engine SDK 1.3.0, i moved the
files of fetchserver to the installed folder of Google App Engine. then i
open DOS, have the path to  the installed folder of Google App Engine. then
i type these text:appcfg.py update fetchserver-1.0.0beta
it can have me input my gmail, and i can do succeefully. while after it, it
have me input my password.  and i can't input even one text for psw. 
hope you can tell me what is the issue? and how to fix it?  whether shall i
open the softwares of Python and Google App Engine SDK?

Original issue reported on code.google.com by [email protected] on 9 Apr 2010 at 6:09

我這兒gappproxy也被鎖掉了

原本還用好好的,今天就沒辦法用了,大概可能被擋掉ip了吧
...目前也沒想到啥方法
來突破,如果自行架設一個能run 
fetchserver的東西可行嗎,有相關的知識或想法能
提供嗎?

Original issue reported on code.google.com by [email protected] on 10 Mar 2010 at 1:38

为什么不能看youtube视频?


用gappproxy 访问youtube 播放视频,总会出现“an error 
occured,please try
again later”,刚开始以为是gappproxy 
不支持大文件的缘故,可现在支持大文件
了,youtube 
还是出现同样的错误。但播放其他网站上的一些视频时却没��
�题,如
http://vimeo.com。可以看高清视频。

Original issue reported on code.google.com by [email protected] on 27 Sep 2009 at 9:56

无法在twitter进行post

What steps will reproduce the problem?
1. 登录twitter
2. post

What is the expected output? What do you see instead?
应该能看到post后的内容,但是页面始终显示ajax那个旋转的图
标。

What version of the product are you using? On what operating system?
Firefox 3.5,XP SP3

Please provide any additional information below.
能修复吗? 

Original issue reported on code.google.com by [email protected] on 8 Sep 2009 at 1:58

自定义监听地址

我需要在虚拟机中使用客户端,并通过桥接模式提供的网络��
�口来访问虚拟机,虚拟机的地址为192.168.*.*。
而proxy.py只监听127.0.0.1,这样我是不能连上的。

下面提供的补丁可以自定义监听地址。

Original issue reported on code.google.com by [email protected] on 15 May 2010 at 12:06

Attachments:

Urlfetch的改进建议

英文版的GAE文档比中文的要新,urlfetch函数新增的几个功能如
果加入GAP会很好:
1. 
fetch函数增加了一个可选参数deadline,建议改成最长时间10秒��
�默认5秒)。
2. 
不支持浏览器ranges也没有关系,但建议用一下urlfetch新增的Asy
nchronous
Requests,预先fetch下来多个部分,效率会高一些。
感谢作者的不断更新!

Original issue reported on code.google.com by [email protected] on 9 Nov 2009 at 6:49

problem watching youtube

I use gui under windows7 to watch youtube and the video won't show up.
It says "an error occurred, please try again later"

ps: I use the 1.0.0 beta version

Original issue reported on code.google.com by [email protected] on 3 Nov 2009 at 10:03

无法使用GAppProxy作为svn代理

What steps will reproduce the problem?
1. 
将gappproxy作为turtoiseSVN的代理,然后执行任何操作,比如说upd
ate

What is the expected output? What do you see instead?
--------------------------------------------
activate.adobe.com - - [14/Sep/2009 20:48:16] code 501, message Unsupported
meth
od ('OPTIONS')
activate.adobe.com - - [14/Sep/2009 20:48:16] "OPTIONS
https://crystal.svn.sourc
eforge.net/svnroot/crystal/CS/trunk HTTP/1.1" 501 -
Traceback (most recent call last):
  File "proxy.py", line 352, in <module>
    httpd.serve_forever()
  File "d:\Python26\lib\SocketServer.py", line 224, in serve_forever
    r, w, e = select.select([self], [], [], poll_interval)
KeyboardInterrupt

What version of the product are you using? On what operating system?
使用python2.6, winxp, 最新的打了9月12号补丁的fetchserver

Original issue reported on code.google.com by ranjiao on 14 Sep 2009 at 12:51

按说明设置后不能访问网页

What steps will reproduce the problem?
1. 按照说明运行gui.exe,并在IE中设置代理
2. 想访问网页,却出现:
Error response

Error code 403. 

Message: Forbidden. 

Error code explanation: 403 = Request forbidden -- authorization will not 
help. 

3.

What is the expected output? What do you see instead?


What version of the product are you using? On what operating system?


Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 4 Oct 2009 at 1:21

r55不能作为服务运行吗?

RT,没有找到,wiki里好像只有gui运行,是不是取消了服务项��
�置?

谢谢你们做的代理工具,感谢!


Original issue reported on code.google.com by [email protected] on 26 Oct 2008 at 10:16

关于证书问题的解决办法

本人使用firefox,gapproxy和autoproxy总是弹出证书无效的警告,��
�过一下午和一
晚上的研究,现找到解决办法(当然完美的解决还是要靠作��
�的)

去http://blog.solrex.cn/articles/fix-gappproxy-set-cookie-and-https-cert-
bugs.html中的http://share.solrex.cn/ibuild/ 下载代码。

下载python 2.6.2(不是3.0)和GAE SDK

    *

      解压缩 fetchServer 文件夹至 Google App Engine SKD 安装目录,默认为
X:\Program Files\Google\google_appengine\fetchserver。
    *

      用文本编辑器打开刚解压的 fetchServer 文件夹内的 app.yaml 文件,修改第
一行 your_application_name 为刚才输入的 Application
Identifier,yourname.appspot.com 中的 yourname。
    *

      上传 fetchserver

打开命令提示符(点击 开始 > 运行 > cmd),进入 X:\Program
Files\Google\google_appengine 目录(输入 cd X:\Program
Files\Google\google_appengine\ 即可),输入以下命令行: appcfg.py update
fetchserver,回车,会要求你输入 Google 
账户及密码,之后关闭结束上传。

注意这里千万不能用SDUpload ,因为它不识别secure: optional。

yourname.appspot.com前的协议是http而不要改成https。全部设置完成
之后,以
gmail为例,只会弹出一次风险提示,加入例外就行啦。

可恨的错误啊:
SSLError: [Errno 1] _ssl.c:480: error:14094418:SSL
routines:SSL3_READ_BYTES:tlsv
不知谁有完美的解决方案啊

写给作者:
CACert:免费的数字证书组织
http://www.cnbeta.com/articles/31501.htm

Original issue reported on code.google.com by [email protected] on 15 Aug 2009 at 4:41

上facebook还是有些问题


1. 有时候上facebook登录进去后,访问其中的很多网页出现Fetch 
Server 
Error,Error Code: 591
2.在facebook中, 有时候网页中也会显示HTTP Error“ Transport error 
(#591) 
while retrieving data from endpoint 
`/ajax/apps/fetchApplicationsWithinCategory.php': Unknown HTTP error 
#591”(见附件)

用的是Sep 11, 2009版 的 fetch.py



Original issue reported on code.google.com by [email protected] on 11 Oct 2009 at 12:47

Attachments:

请求更新Downloads中的GUI

目前SVN最新版本似已能支持Youtube等视频,然直接用py免不了��
�窗口,且难以注册
为服务。还烦请dev将那些.py编译成exe发布,谢谢。

Original issue reported on code.google.com by xu.jimmy.wrk on 30 Sep 2009 at 1:49

HTTPS seems not working

--------------------------------------------
HTTP Enabled : YES
HTTPS Enabled: YES
Direct Fetch : YES
Local Proxy  : 
Fetch Server : http://oldherl.appspot.com/fetch.py
--------------------------------------------



Exception happened during processing of request from ('127.0.0.1', 43142)
Traceback (most recent call last):
  File "/usr/lib/python2.6/SocketServer.py", line 558, in
process_request_thread
    self.finish_request(request, client_address)
  File "/usr/lib/python2.6/SocketServer.py", line 320, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib/python2.6/SocketServer.py", line 615, in __init__
    self.handle()
  File "/usr/lib/python2.6/BaseHTTPServer.py", line 329, in handle
    self.handle_one_request()
  File "/usr/lib/python2.6/BaseHTTPServer.py", line 323, in handle_one_request
    method()
  File "./proxy.py", line 63, in do_CONNECT
    keyfile=common.DEF_KEY_FILE)
  File "/usr/lib/python2.6/ssl.py", line 118, in __init__
    self.do_handshake()
  File "/usr/lib/python2.6/ssl.py", line 293, in do_handshake
    self._sslobj.do_handshake()
SSLError: [Errno 1] _ssl.c:480: error:14094418:SSL
routines:SSL3_READ_BYTES:tlsv1 alert unknown ca

Original issue reported on code.google.com by [email protected] on 19 Apr 2009 at 10:19

r101不能正常浏览的网页

1.https://search.twitter.com不能访问
2.http://www.youtube.com/watch?v=uuTmTyzbaQk打不开视频
3.http://www.youtube.com/watch?v=tdF9-0JsPQo打不开视频
4.twitter上传头像破损失败

Original issue reported on code.google.com by [email protected] on 16 Oct 2009 at 5:48

GAppProxy-1.0.0beta 是个流氓!

客户端一打开就自动访问百度推广,模拟点击广告!!
请解决!
122.224.51.166 - - [12/Oct/2009 23:44:27] "GET
http://cpro.baidu.com/cpro/ui/cp.js HTTP/1.1" 200 -
122.224.55.201 - - [12/Oct/2009 23:44:37] "GET
http://cpro.baidu.com/cpro/ui/cp.js HTTP/1.1" 200 -
122.224.51.166 - - [12/Oct/2009 23:44:38] "GET
http://cpro.baidu.com/cpro/ui/uijs.php?fv=10&tn=text_default_468_60&n=jnbusy_cpr
&rsi1=60&rsi0=468&rad=&rss0=%23FFFFFF&rss1=%23FFFFFF&rss2=%230000ff&rss3=%234444
44&rss4=%23008000&rss5=&rss6=%23e10900&rsi5=4&ts=1&at=7&if=0&word=http%3A%2F%2Fw
ww.jnbus.com.cn%2FShowArticle.asp%3FArticleID%3D1875&refer=http%3A%2F%2Fwww.jnbu
s.com.cn%2Fclub%2Fmessanger.asp%3Faction%3Dnew%26touser%3D'%2Bstr%5Bi%5D%5B1%5D%
2B'&ch=0&lmt=1255333078&csp=1024,768&ccd=32&chi=12&cja=true&cpl=23&cmi=527242&cc
e=true&csl=zh-CN&rt=0&cad=1&aurl=&rss7=&cpa=1&dt=1255361887&ev=33554432&jn=1&cn=
1
HTTP/1.1" 200 -
122.224.55.201 - - [12/Oct/2009 23:44:43] "GET
http://cpro.baidu.com/cpro/ui/uijs.php?fv=10&tn=text_default_468_60&n=edugaokao_
cpr&rsi1=60&rsi0=468&rad=&rss0=%23FFFFFF&rss1=%23FFFFFF&rss2=%230000ff&rss3=%234
44444&rss4=%23008000&rss5=&rss6=%23e10900&rsi5=4&ts=1&at=7&if=0&word=http%3A%2F%
2Fwww.edugaokao.com%2FArticle%2FSendMail.asp%3FID%3D16588&refer=http%3A%2F%2Fwww
.soso.com%2Fq%3Fw%3D%25b7%25e1%25cf%25d8%25b1%25cf%25d2%25b5%25c9%25fa%25be%25cd
%25d2%25b5%26lr%3D%26sc%3Dweb%26ch%3Dw.p%26filter%3D1%26num%3D10%26gid%3D%26cin%
3D%26site%3D%26pg%3D16&ch=0&lmt=1253298967&csp=1440,900&ccd=32&chi=8&cja=true&cp
l=23&cmi=1300630&cce=true&csl=zh-CN&rt=0&cad=1&aurl=&rss7=&cpa=1&dt=1255362048&e
v=33554432&jn=1&cn=1
HTTP/1.1" 200 -
122.224.51.166 - - [12/Oct/2009 23:44:44] "GET
http://cpro.baidu.com/extra/text_flash/AC_RunActiveContent.js HTTP/1.1" 200 -
122.224.51.166 - - [12/Oct/2009 23:44:47] "GET
http://cpro.baidu.com/cpro/ui/cp.js HTTP/1.1" 200 -
122.224.51.166 - - [12/Oct/2009 23:44:54] "GET
http://cpro.baidu.com/cpro/ui/uijs.php?fv=10&tn=text_default_468_60&n=lili89_cpr
&rsi1=60&rsi0=468&rad=&rss0=%23FFFFFF&rss1=%23FFFFFF&rss2=%230000ff&rss3=%234444
44&rss4=%23008000&rss5=&rss6=%23e10900&rsi5=4&ts=1&at=7&if=0&word=http%3A%2F%2Fw
ww.b2cf.cn%2FPtcom%2F000268.html&refer=http%3A%2F%2Fwww.b2cf.cn%2FPtcom%2Fjianda
lu6712316.html&ch=0&lmt=1254007949&csp=1440,900&ccd=32&chi=7&cja=true&cpl=23&cmi
=1042175&cce=true&csl=zh-CN&rt=0&cad=1&aurl=&rss7=&cpa=1&dt=1255361907&ev=335544
32&jn=1&cn=1
HTTP/1.1" 200 -
122.224.55.201 - - [12/Oct/2009 23:45:07] "GET
http://122.224.55.201:8080/proxyheader.php HTTP/1.1" 200 -
f1.rosinstrument.com - - [12/Oct/2009 23:45:26] "GET
http://www.rbc.ru/index.html?8884354.94380753 HTTP/1.0" 200 -
122.224.51.166 - - [12/Oct/2009 23:45:34] "GET
http://cpro.baidu.com/cpro/ui/cp.js HTTP/1.1" 200 -

Original issue reported on code.google.com by [email protected] on 12 Oct 2009 at 4:02

項目組成員進來面對!!!

在 http://gappproxy.googlecode.com/files/GAppProxy-1.0.0beta.exe 下載
windows本地端

我的FETCH端有打開日誌記錄功能

這是在本地打開GUI.exe后30秒  訪問
http://XXXXXX.appspot.com/admin.py?obj=accesslog&cmd=list_pop_desti
服務器端記錄下來的訪問日誌 而且持續增加中

用python版本的就沒這問題
------------------------------------------------------------
GAppProxy 热门站点统计(TOP 50)
站点  访问量
images.google.com   4
www.microsoft.com   4
l36.member.sp1.yahoo.com    3
blog.cnstock.com    2
www.aol.com 2
www.google.com  2
119.160.245.62  1
13978859938.blog.163.com    1
174.129.212.2   1
174.139.14.132  1
217.12.8.16 1
43fb38d3.linkbucks.com  1
66.163.169.176  1
banners.webmasterplan.com   1
blog.view.cnfol.com 1
clickingagent.com   1
core.proxyswitcher.com  1
l37.member.re3.yahoo.com    1
love.mail.ru:80 1
server.discoveros.com   1
trysearch.net   1
www.google.com:80   1
www.hrhome.ru   1
www.reiselinie.org  1
-----------------------------------------------------------
如果是項目組成員有意添加 麻煩也優化下不要這麼頻繁

已經擠佔到正常的HTML連接了  經常開個網頁就連接重置

Original issue reported on code.google.com by [email protected] on 8 May 2010 at 2:11

when submit a topic or answer a topic in diybbs.zol.com.cn, the chinese sentence will be shorten when use gappproxy

What steps will reproduce the problem?
1. when submit a topic or answer a topic in diybbs.zol.com.cn, the chinese
sentence will be shorten when use gappproxy
2.
3.

What is the expected output? What do you see instead?


What version of the product are you using? On what operating system?


Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 15 Nov 2009 at 12:30

更新FF时证书未知而不被信任

===================================================
工具 -> 附加组件    提示如下错误
===================================================
services.addons.mozilla.org:443 使用了无效的安全证书。

该证书因为其发行者证书未知而不被信任。
该证书仅对 <a id="cert_domain_link" 
title="LocalProxyServer">LocalProxyServer</a> 有效。

(错误码: sec_error_unknown_issuer)

====================================================
帮助 -> 检查更新    提示如下错误
====================================================

AUS: 更新 XML 文件有错 (200)

====================================================

头一次发现. 
很偶然,以前没有遇到,之后又重新打开试了好几次,也没问题.
先记录下来(会不会是autoproxy的问题)

Original issue reported on code.google.com by [email protected] on 19 Apr 2009 at 12:02

1.0.0 beta gui client issue

What steps will reproduce the problem?
1. some website no pics ,www.imdb.com
2.
3.

What is the expected output? What do you see instead?


What version of the product are you using? On what operating system?


Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 6 Apr 2009 at 9:41

Attachments:

mac用户如何使用gappproxy呢?

 请给一个具体的教程,
 如果可以也出一个mac osx的GUI应用吧,谢谢
mac很缺proxy呀,,, 




Original issue reported on code.google.com by kf2kyle on 7 Sep 2009 at 8:25

how to update gui.exe?

用了Gappproxy,感觉确实蛮好用的,就是用原有的windows客户端�
��不了YouTube。
上次看了issue 
22,上面的大大说了一下更新客户端的方法,但是装了py/py2exe
/pywin32这
几个软件,也建立了bat批处理,可就是建出来的GAppProxy文件��
�里面是空的。不知道为什么。
本来一直用别人打包上传的101客户端。但是现在102又出来了��
�而且我觉得自己总要学会怎么打
包。所以还请各位大大不吝赐教,我到底问题出现在哪里?
运行批处理cmd跳出来的,但是运行了几行代码后就消失了,��
�后文件夹里面却没有任何文件。
哪位大大能够详细的说一下要装哪些软件?更新过程如何?

Original issue reported on code.google.com by [email protected] on 15 Nov 2009 at 4:28

rapidshare doesn't work

1. Go to: http://rs38.rapidshare.com/files/3778134/Perl_Quick_Reference.zip
2. You get error: 
Fetch Server Error
Error Code: 591

Message: Fetch server error, The target server may be down or not exist. 
Another possibility: try to request the URL directly.


What should happen is that you should get a download link after 90 seconds

I am using gappproxy version 1.2.0 beta

Thanks


Original issue reported on code.google.com by [email protected] on 10 Nov 2009 at 7:58

下载图片,老是出现 591、592 错误

下载图片,老是出现 591、592 
错误,有时候多试几次就好了,有时候怎么试也没
用。图片都是常用格式,大小都没有超过 1M 
的。不知道这是为什么。

Original issue reported on code.google.com by [email protected] on 17 Mar 2010 at 2:23

希望gappproxy能够支持DELETE方法

What steps will reproduce the problem?
1. 在twitter.com上将某人从某个list中移除

What is the expected output? What do you see instead?
应该能够成功移除.
事实上不能

What version of the product are you using? On what operating system?
1.0, python版
Firefox

Please provide any additional information below.
因为gappproxy不支持DELETE方法



Original issue reported on code.google.com by [email protected] on 17 May 2010 at 8:26

2个问题:1.admin页面无内容 2.出现reset能否忽略

What steps will reproduce the problem?
1. 
下载r102版的服务器端和客户端,自己的服务器,admin.py?obj=*&c
md=*无数据,
但是自己访问了不少页面了,是否写数据的程序未写?
2. 
使用python版客户端,观看flv时使用全局代理,会出现Connection 
reset by peer
,是GFW问题还是GAE的问题?如果为GFW问题,之前月光blog介绍�
��服务器端与客户端
均忽略此响应的话则可以继续通信,是否可以实现?
3.

What is the expected output? What do you see instead?


What version of the product are you using? On what operating system?


Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 26 Nov 2009 at 3:14

地址冲突?

按照步骤一切正常,可是运行proxy.py时总是出现“socket.error: 
[Errno 98]
Address already in use”,不知是何故?

Original issue reported on code.google.com by [email protected] on 30 Apr 2010 at 3:06

期待加密功能

现在好像没加密?所以还是没法绕过关键字限制?
哪怕只有弱加密或者伪加密也好

Original issue reported on code.google.com by [email protected] on 19 Apr 2009 at 10:07

Catch unknown ca exception

It gives this alert every time, really annoying.

Original issue reported on code.google.com by lovelywcm on 10 Jul 2009 at 1:26

submit a patch

What steps will reproduce the problem?
1. login twitter.com
2. goto http://twitter.com/account/settings
3. try to upload a picture

you'll get an error:

Error Code: 590
Message: Wrong length of post data


I just get a solution to resolve this problem:

1. localproxy/proxy.py

after:
        # get post data
        postData = ''
        if postDataLen > 0:
            postData = self.rfile.read(postDataLen)
            if len(postData) != postDataLen:
                # bad request
                self.send_error(400)
                self.connection.close()
                return
            # ADD this line
            postData = base64.b64encode(postData)

IN:
        params = urllib.urlencode({'method': method, 
                                   #'path': path, 
                                   'encoded_path': base64.b64encode(path), 
                                   'headers': self.headers, 
                                   'encodeResponse': 'compress', 
                                   # 'postdata': postData, 
                                   # change to:
                                   'encoded_postdata': postData,
                                   'version': '1.0.0 beta'})


2. fetch.py

after:

    def post(self):
        try:
            # get post data
            origMethod = self.request.get('method')
            origPath = self.request.get('encoded_path')
            if origPath != '':
                origPath = base64.b64decode(origPath)
            else:
                origPath = self.request.get('path')
            origHeaders = self.request.get('headers')
            encodeResponse = self.request.get('encodeResponse')
            # change this line to:
            # origPostData = self.request.get('postdata')
            origPostData = self.request.get('encoded_postdata')
            if origPostData != '':
                origPostData = base64.b64decode(origPostData)
            if origPostData == '':
                origPostData = self.request.get('postdata')         


I just create two patch file attached.


Original issue reported on code.google.com by [email protected] on 9 Jul 2009 at 7:05

Attachments:

重复造个轮子,呵呵

用twisted实现了一个 proxy.py

还不能处理https的CONNECT方法
auto proxy部分还在写

默认同时监听两个端口 
3128是本地的代理端口
8000是代理的自动配置脚本访问地址是 
http://127.0.0.1:8000/proxy.pac
还没写完整只能手动的修改pac脚本,配置脚本在pac.py内,现在只
默认返回固定模板



Original issue reported on code.google.com by fla.sam on 18 Jun 2008 at 11:47

Attachments:

proxy.py can't run on windows xp

发现proxy.py在windows上似乎无法正常工作.

我试了三台机器,都是XP+ActivePython2.5,其中有两台不能正常工作
,提示大量相同的
错误:bad status 
line,找了一下原因,似乎是urllib2.urlopen和SocketServer的多线
程模型发生了冲突,不知道如何解决.

在Linux下面工作倒很正常,开始都是在Linux下跑得,所以直到昨��
�晚上才发现Windows
上的问题,但也有一台Windows机器工作正常,郁闷.

Original issue reported on code.google.com by [email protected] on 13 Jun 2008 at 3:33

Ubuntu下快捷方式问题

我在桌面上建了个链接和Launcher,都无法正确启动。
似乎没有找到正确的proxy.conf,因为我在里面设置了出口代理�
��

我想只是路径问题,但是不知道怎么弄。没有找到设置类似��
�working dir”的地方。

Original issue reported on code.google.com by [email protected] on 21 Jan 2009 at 2:48

proxy.py为什么还是使用默认的服务器

What steps will reproduce the problem?

What is the expected output? What do you see instead?
在修改了proxy.conf 里面的
#fetch_server = http://127.0.0.1:8080/fetch.py
#fetch_server = http://wh××××.appspot.com/fetch.py
后开启proxy.py依旧显示
Fetch Server : http://fetchserver1.appspot.com/fetch.py
这样好像还是用的公用的服务器吧?
貌似把proxy.conf删掉了proxy.py的运行也没有什么变化....
为什么没法用proxy.conf设置成访问我自己建的那个wh××××.appsp
ot.com/fetch.py呢?

What version of the product are you using? On what operating system?
1.2.0 102  win7




Original issue reported on code.google.com by [email protected] on 1 Nov 2009 at 5:07

关于无法处理302等HTTP重定向请求

无法处理302等HTTP重定向请求,原因是GAE的urlfetch从1.1版(当前运
行版)开始不回
传重定向响应,这个目前还没有办法绕过去. 

我想可以判断目标http返回的http 
status来处理,检测到301,302的返回代码后检查
header里面的location 
key取得需要redirect的url然后再去fetch,下面是我以前写的
一段代码希望能够有帮助

def do_analyze_header( u='https://www.x-ways.net/winhex.zip' ):
    '''
    in this version only check http status code redirect, like 302, 301
    @param u: http url
    '''

    protocol = urlparse.urlparse( u )[0]
    _i_host, _i_path = split_url( u )
    if protocol.lower() == 'http':
        conn = httplib.HTTPConnection( _i_host )
    elif protocol.lower() == 'https':
        conn = httplib.HTTPSConnection( _i_host )
    else:
        raise BotError, 'Unknow protocol'
    my_request_header = {'User-Agent':'Mozilla/5.0'}
    try:
        conn.request( "GET", _i_path, headers=my_request_header )
    except socket.error:
        raise BotError, 'Connect Error'
    r1 = conn.getresponse()
    if r1.status == 200:
        conn.close()
        return r1, u
    elif r1.status == 301 or r1.status == 302:
        ru = r1.getheader( 'location' )
        conn.close()
        return do_analyze_header( ru )
    else:
        raise BotError, 'Read http header error'

Original issue reported on code.google.com by fla.sam on 1 Jul 2008 at 3:51

youtube abnormally

What steps will reproduce the problem?
1. access youtube.com via GappProxy
2. "this video is no longer available" is displayed for every video


What is the expected output? What do you see instead?
video should be played normally

What version of the product are you using? On what operating system?
1.0.0beta

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 12 Apr 2009 at 7:42

grooveshark无法显示播放器

What steps will reproduce the problem?
1. http://listen.grooveshark.com/
2. 不知是不是跟文件大小限制有关,但是Youtube视频可以看
3.

What is the expected output? What do you see instead?


What version of the product are you using? On what operating system?


Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 21 Apr 2010 at 4:08

支持PHP服务端

是否可以考虑支持PHP服务端?

代码我可以完成

而且PHP服务端就可以用PHP的socket函数基本完成https的完美支持
了

Original issue reported on code.google.com by [email protected] on 3 Apr 2010 at 2:35

为什么登不上http://www.andersen.com.cn/cgi-bin/cgi-bin/loginout.cgi?forum= 论坛?

What steps will reproduce the problem?
1. 已经获取了SVN中最新的代码。
2. 已经采用了最新的proxy.py
3. 
其它的论坛都可以登陆,但这个论坛每次登陆后自动又回到��
�录界面:(


What is the expected output? What do you see instead?


What version of the product are you using? On what operating system?


Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 15 Dec 2009 at 2:36

解决多个 Set-Cookie 记录问题

GAPPProxy 目前对 Cookie 的处理有一些问题,主要出在对 header 
中的多个
Set-Cookie 域处理错误。

举例,当服务器返回的 header 中有多个 Set-Cookie 
域时,比如一般的 wordpress
返回的 header 中,Set-Cookie 域至少有三个:

Set-Cookie:
wordpress_776c41a2fee8d137928f3750eb1f0736=admin%7C1247298611%7C8b89cfc801618539
57182ddfc481cd72;
path=/wp-content/plugins; httponly
Set-Cookie:
wordpress_776c41a2fee8d137928f3750eb1f0736=admin%7C1247298611%7C8b89cfc801618539
57182ddfc481cd72;
path=/wp-admin; httponly
Set-Cookie:
wordpress_logged_in_776c41a2fee8d137928f3750eb1f0736=admin%7C1247298611%7C545dce
a44d5e69aec5c1203c64bee061;
path=/; httponly

GAPPProxy 会把它作为一个串传给本地浏览器:
Set-Cookie:
wordpress_776c41a2fee8d137928f3750eb1f0736=admin%7C1247298611%7C8b89cfc801618539
57182ddfc481cd72;
path=/wp-content/plugins; httponly,
wordpress_776c41a2fee8d137928f3750eb1f0736=admin%7C1247298611%7C8b89cfc801618539
57182ddfc481cd72;
path=/wp-admin; httponly,
wordpress_logged_in_776c41a2fee8d137928f3750eb1f0736=admin%7C1247298611%7C545dce
a44d5e69aec5c1203c64bee061;
path=/; httponly

这样本地浏览器对 Cookie 
的设置就会错误。解决办法很简单,将这个长串用
split(', ')切开,同样设置三个 Set-Cookie 域即可。

Patch:

Index: proxy.py
===================================================================
--- proxy.py    (revision 92)
+++ proxy.py    (working copy)
@@ -237,6 +237,11 @@
             (name, _, value) = line.partition(':')
             name = name.strip()
             value = value.strip()
+            if name == 'Set-Cookie':
+              value_list = value.split(', ')
+              for value in value_list:
+                self.send_header(name, value)
+              continue
             self.send_header(name, value)
             # check Content-Type
             if name.lower() == 'content-type':


Original issue reported on code.google.com by solrex on 9 Jul 2009 at 8:38

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.