title: Unable to get Proxy working with Socket
body: <p>I am trying to get Proxy working with Socket. But everytime I tried, it would returned a "<strong>Exception in thread "pool-1-thread-1" java.lang.IllegalArgumentException: Invalid Proxy</strong>" exception error</p>
  
  <p><em>at java.net.Socket.(Socket.java:131)</em></p>
  
  <p>But if its Proxy.Type.SOCKS, it works.</p>
  
  <pre><code>public void Test()
  {
     Socket s = null;
     SocketAddress addr = null;
     Proxy proxy = null;
  
     addr = new InetSocketAddress("127.0.0.1", 8080);
     proxy = new Proxy(Proxy.Type.HTTP, addr);
     socket = new Socket(proxy); // This is the line that is triggering the exception
  }
  </code></pre>