« | September 2025 | » | 日 | 一 | 二 | 三 | 四 | 五 | 六 | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | | | | | |
| 公告 |
武汉楚烟信息技术有限公司 100 ↓ 3 武汉北大青鸟 100 - 4 上海维豪信息安全技术有限公司 100 -- 5 北京天元网络 100 -- 6 HP 100 -- 7 英业达公司 100 -- 8 上海索恩软件产业有限公司 100 -- 9 UTStarcom 100 -- 10 杭州阿尔卡特通讯系统有限公司 100 -- 11 武汉计算机软件开发有限公司 100 -- 12 株洲慧方软件 100 -- 13 航天信息股份有限公司 100 -- 14 美国微软公司总部 100 -- 15 深圳市砺剑科技开发有限公司 100 -- 16 深圳辰通 100 -- 17 Lemon-Aisa柠檬亚洲有限公司 100 -- 18 容大科技 100 -- 19 北京宏昌润达科技发展有限公司 100 -- 20 北京科胜软件技术培训中心 100 -- 21 北京燕园科胜技术开发有限公司 100 -- 22 北京新潮科技有限公司 100 -- 23 中电信息技术有限公司 100 -- 24 北京易方优网络科技有限公司 100 -- 25 北京瑞赛博网络技术有限公司 100 -- 26 北京中科视讯科技有限公司 100 -- 27 北京阳光宏远科技有限公司 100 ↓ 28 华夏媒体信息技术有限公司 100 ↓ 29 北京海特在线科技有限公司 100 ↓ 30 宁波市科技园区思坦达软件开发有限公司 100 ↓ 31 温州腾鸿科技开发有限公司 100 ↓ 32 上海朗信源星软件科技有限公司 100 ↓ 33 福州刷新网络技术服务有限公司 90 -- 34 SAP大连 90 -- 35 南方人才网 90 -- 36 上海浪擎信息有限公司 80 -- 37 金福软件 80 -- 38 贵州盛世科技有限公司 80 -- 39 上海联盈数码 80 -- 40 北京岩海伟业科技发展有限公司 80 -- 41 厦门点击中文网络科技有限公司 80 ↓ 42 潍坊银通数码网络有限公司 80 ↓ 43 高伟达软件技术发展有限公司 75 -- 44 中商流通生产力促进中心 75 -- 45 天津市网涛科技发展有限公司 70 -- 46 常州金蝶软件有限公司 70 -- 47 杭州力汇软件 70 -- 48 长沙市龙光信息技术开发有限公司 70 -- 49 象山希望电脑中心 70 ↓ 50 北京思特奇信息技术股份有限公司 60 --
|
Blog信息 |
blog名称: 日志总数:6 评论数量:21 留言数量:0 访问次数:59103 建立时间:2005年5月24日 |

| |
[Java/JSP]java程序如何穿透带有密码验证的代理 原创空间, 心得体会, 软件技术, 电脑与网络
cgcol 发表于 2005/5/25 11:34:57 |
java sample codes that access outer internet through proxy which require username and password use inner instead of extends is the most different 网上也有一些文章但是大多数涉及带有授权验证的proxy都有问题,主要问题就是出在对 Authenticator.setDefault的使用,以及base64编码的问题上代码是最没有二义性的文档,实现原理不再解释,请看代码去体会。如果转载请注明代码出处。chimae@cnjsp.orgpackage org.chimae.net;import java.io.BufferedReader;import java.io.IOException;import java.io.InputStream;import java.io.InputStreamReader;import java.net.Authenticator;import java.net.HttpURLConnection;import java.net.PasswordAuthentication;import java.net.URL;/** * @author chimae@cnjsp.org */public class ProxyConnTest { public static void initProxy(String host, int port, final String username, final String password) { Authenticator.setDefault(new Authenticator() { protected PasswordAuthentication getPasswordAuthentication() { return new PasswordAuthentication(username, new String(password).toCharArray()); } }); System.setProperty(\"http.proxyType\", \"4\"); System.setProperty(\"http.proxyPort\", Integer.toString(port)); System.setProperty(\"http.proxyHost\", host); System.setProperty(\"http.proxySet\", \"true\"); } public static void main(String[] args) throws IOException { String url = \"http://java.sun.com/\"; String proxy = \"yourProxy\"; int port =8080; String username =\"username\"; String password =\"password\"; String curLine = \"\"; String content = \"\"; URL server = new URL(url); initProxy(proxy,port,username,password); HttpURLConnection connection = (HttpURLConnection)server.openConnection(); connection.connect(); InputStream is = connection.getInputStream(); BufferedReader reader = new BufferedReader(new InputStreamReader(is)); while ((curLine = reader.readLine()) != null) { content += curLine; } System.out.println(\"content= \" + content); is.close(); }} |
|
回复:java程序如何穿透带有密码验证的代理 原创空间, 心得体会, 软件技术, 电脑与网络
fewaf(游客)发表评论于2009/3/25 15:29:48 |
肾病、急性肾炎、慢性肾炎、肾炎 蛋糕 蛋糕、礼盒、水果礼盒、西点、元祖 、室内空气检测、快递、速递、快件、国际快递、快递公司、黄金投资、黄金交易、黄金T+D、外国人就业许可、外国人签证转签延期、外国人工作签证、外资企业设立 |
|
回复:java程序如何穿透带有密码验证的代理 原创空间, 心得体会, 软件技术, 电脑与网络
gameerggg(游客)发表评论于2008/5/26 16:18:20 |
We provide the following cheap gold :<a herf="http://www.docoin.com/cheap.Final_Fantasy_XI.3.aspx">ffxi gil</a>,<a herf="http://www.docoin.com/cheap.Final_Fantasy_XI.3.aspx">final fantasy xi gil</a>,
<a herf="http://www.docoin.com/cheap.Final_Fantasy_XI.3.aspx">cheap ffxi gil</a>,
<a herf="http://www.docoin.com/cheap.Final_Fantasy_XI.3.aspx">cheap final fantasy xi gil </a><a herf="http://www.docoin.com/cheap.Ever_Quest_2.2.aspx">everquest2 plat</a>,
<a herf=" http://www.docoin.com/cheap.Ever_Quest_2.2.aspx">cheap everquest2 plat</a>,<a herf=" http://www.docoin.com/cheap.Ever_Quest_2.2.aspx">eq2 plat</a>,
<a herf="http://www.docoin.com/cheap.Ever_Quest_2.2.aspx">cheap eq2 plat</a>,<a herf="http://www.docoin.com/cheap.Ever_Quest_2.2.aspx">eq2 platinum</a>
<a herf="http://www.docoin.com/cheap.Ever_Quest_2.2.aspx">cheap eq2 platinum</a>, |
|
World of Warcraft Gold 原创空间, 心得体会, 软件技术, 电脑与网络
Warcraft Gold(游客)发表评论于2006/11/25 12:36:45 |
农夫要杀公鸡却逮不着,World of Warcraft Gold于是抓起母鸡对公鸡说:再不下来让你当光棍儿!Cheap World of Warcraft Gold公鸡:你他妈以为我傻呀 ,我下去她就成寡妇了。。。 |
|
» 1 »
|