Advertisement
Guest User

Untitled

a guest
Jan 18th, 2017
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.68 KB | None | 0 0
  1.         final String authUser = "asaf";
  2.         final String authPassword = "1234";
  3.  
  4.         Authenticator.setDefault(
  5.                 new Authenticator() {
  6.                     @Override
  7.                     public PasswordAuthentication getPasswordAuthentication() {
  8.                         return new PasswordAuthentication(
  9.                                 authUser, authPassword.toCharArray());
  10.                     }
  11.                 }
  12.         );
  13.  
  14.         System.setProperty("https.proxyUser", authUser);
  15.         System.setProperty("https.proxyPassword", authPassword);
  16.         System.setProperty("http.proxyUser", authUser);
  17.         System.setProperty("http.proxyPassword", authPassword);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement