HttpURLConnection con =null;
URL url = new URL("xxxxx");
Proxy proxy=new Proxy(java.net.Proxy.Type.HTTP, new InetSocketAddress(android.net.Proxy.getDefaultHost(),android.net.Proxy.getDefaultPort()));
con = (HttpURLConnection) url.openConnection(proxy);