Guest User

Untitled

a guest
Nov 22nd, 2017
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. static {
  2. ProxySelector.setDefault(new ProxySelector() {
  3. private final ProxySelector def = ProxySelector.getDefault();
  4.  
  5. @Override
  6. public List<Proxy> select(final URI uri) {
  7. return Arrays.asList(new Proxy(Proxy.Type.SOCKS, new InetSocketAddress("127.0.0.1", 8889)));
  8. }
  9.  
  10. @Override
  11. public void connectFailed(final URI uri, final SocketAddress sa, final IOException ioe) {
  12. throw new UnsupportedOperationException("Not supported yet.");
  13. }
  14. });
  15. }
Add Comment
Please, Sign In to add comment