import win.ui;
/*DSG{{*/
var winform = win.form(text="aardio form";right=463;bottom=280)
winform.add()
/*}}*/
//设置webkit代理
win.setenv("HTTP_proxy","http://代理服务器IP:代理端口/")
import web.kit.form
var wbKit = web.kit.form(winform)
webkit.go("http://www.ip.cn/")
winform.show()
win.loopMessage();
或者:
web.kit.configure({
proxy = {
type = "HTTP";
hostname = "127.0.0.1";
port = 8080;
username = "";
password ="";
};
cookieFilePath = "/cookie";
})
再或者:
mainForm.button3.oncommand = function(id,event){
//取消dl设置并刷新当前webform 内容;
inet.setProxy();
wb.refresh();
}
mainForm.button2.oncommand = function(id,event){
//开启dl,只对当前打开的的webform 有效,不会影响到别的IE网页;
inet.setProxy("http://xxx.xxx.xxx.xx:13030");
wb.refresh();
}
设置全部的程序dl使用
inet.conn.setProxy( ,"HTTP://主机地址:端口号");
inet.conn.setProxy("连接名","HTTP://主机地址:端口号" ); // 指定了连接名,用于多链接的情况
inet.setProxy() 有三个参数,最后一个参数可以是会话句柄( 也就是 inet.http().session )
而 inet.http() inet.whttp() 都可以在构造参数中直接指定代理服务器
更多:
import inet;
inet.setProxy("FTP=FTP://IP地址:端口号")
inet.setProxy("GOPHER=HTTP://IP地址:端口号")
inet.setProxy("SOCKS=IP地址:端口号")
inet.setProxy("SOCKS5=IP地址:端口号")
inet.setProxy("HTTP=HTTP://IP地址:端口号")
inet.setProxy("IP地址") //等价于 inet.setProxy("HTTP=HTTP://IP地址:80")
多个dl使用空格隔开
区别:通过inet.http() inet.whttp() 构造参数设置(局部)
通过inet. setproxy 设置(局部)
通过inet.conn.setproxy 设置(全局)
在inet.http()的后面最好再加上以下代码
http.flags = 0x80000000/*_INTERNET_FLAG_RELOAD*/
| 0x4000000/*_INTERNET_FLAG_DONT_CACHE*/
都是收集整理的,一次全部发出来了。