// 设置代理的密码验证 Authenticator auth = new Authenticator() { private PasswordAuthentication pa = new PasswordAuthentication("username", "pwd".toCharArray()); protected PasswordAuthentication getPasswordAuthentication() { return pa; } }; Authenticator.setDefault(auth); Proxy proxy = new Proxy(Proxy.Type.…
2015-03-18 18:51