title: java socket and Proxy authentication
body: <p>I need a Java Socket client class that supports authenticated socks proxy, java.net.Proxy only supports one set of credentials for the whole JVM.  I have multiple proxies each with different logins.
  here's what java's proxy Authenticator does, only one login for the whole JVM.  how do I have multiple?</p>
  
  <pre>
  Authenticator.setDefault(new Authenticator(){
    protected  PasswordAuthentication  getPasswordAuthentication(){
     PasswordAuthentication p=new PasswordAuthentication("xxx", "xxx".toCharArray());
     return p;
    }
   });
  </pre>