龍門渕透華

About me

Developer Information
Name 龍門渕透華
User since July 23, 2008
Number of add-ons developed 0 add-ons
Average rating of developer's add-ons Not yet rated

My Reviews

Pan

Rated 5 out of 5 stars

比如说我正在使用的X-notifier插件, 上次回答说有可能是协议有关, 我特意去看了这个插件的gmail收信script, 里面主要用到getHtml, 而对应的网址就只有两个, "https://accounts.google.com"和"https://mail.google.com/mail/"
但按您上次回复的extensions.pan.proxyScheme的默认值["http","https","ftp","wss"]
那么https是有的,但是gmail收信就是超时,我把pan设成全局就能收到.

getHtml的大概是这样的
Handler.prototype.getHtml = function(aURL,aPostData,aHeaders,aMethod) {
if(aURL instanceof Array){
aPostData=aURL[1];
aHeaders=aURL[2];
aMethod=aURL[3];
aURL=aURL[0];
}
var ioService = Components.classes["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService);
var uri = ioService.newURI(aURL, null, null);
var channel = ioService.newChannelFromURI(uri);
var httpChannel = channel.QueryInterface(Ci.nsIHttpChannel);
if (aPostData||aPostData=="") {
var uploadStream = Components.classes["@mozilla.org/io/string-input-stream;1"]
.createInstance(Ci.nsIStringInputStream);
uploadStream.setData(aPostData, aPostData.length);
var uploadChannel = channel.QueryInterface(Ci.nsIUploadChannel);
uploadChannel.setUploadStream(uploadStream, "application/x-www-form-urlencoded", -1);
httpChannel.requestMethod = "POST";
}
//if(this.userAgent)httpChannel.setRequestHeader("User-Agent",this.userAgent,false);
if(aHeaders){
for(var t in aHeaders){
httpChannel.setRequestHeader(t,aHeaders[t],false);
}
}
if(aMethod)httpChannel.requestMethod=aMethod;
this.channel=channel;
channel.notificationCallbacks = this;
channel.asyncOpen(this,httpChannel);
}

This review is for a previous version of the add-on (2.7.1.1).  This user has a previous review of this add-on.

Pan

Rated 5 out of 5 stars

其他插件(比如下载,gmail)之类需要翻墙的插件,在使用autoproxy时,时可以正常根据代理规则去走的,但是pan的话,需要代理的就超时了,地址栏输入网站是可以正常打开的

This review is for a previous version of the add-on (2.7.1.1).