在请求头加入“Proxy-Authorization”属性,其值是第三方代理ip平台的账号密码(用:连接)的Base64值。
例:

URL realUrl = new URL(url);
            Proxy proxy = ProxyUtil.getProxy();
            if (proxy != null){
                connection = (HttpURLConnection) realUrl.openConnection(proxy);
                if (PROXY_AUTHENTICATION == null)
                    PROXY_AUTHENTICATION = "Basic " + new String(Base64Utils.encode("account:password".getBytes()));
                connection.setRequestProperty("Proxy-Authorization", PROXY_AUTHENTICATION);
            }