Last active
March 10, 2019 12:14
-
-
Save ezhov-da/9b3a713fcd9840c966a6b4229dccdf24 to your computer and use it in GitHub Desktop.
proxy устанавливаем proxy через конкретного пользователя
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
System.setProperty("http.proxyHost", "we.asc.asc.ru"); | |
System.setProperty("http.proxyPort", "34"); | |
System.setProperty("http.proxyUser", "вап_vm"); | |
System.setProperty("http.proxyPassword", "вап"); | |
Authenticator.setDefault( | |
new Authenticator() { | |
@Override | |
public PasswordAuthentication getPasswordAuthentication() { | |
return new PasswordAuthentication( | |
"вапв_vm", "впа".toCharArray()); | |
} | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment