()
| 348 | |
| 349 | |
| 350 | private static Proxy getProxy(){ |
| 351 | if (InfoUtils.openProxy){ |
| 352 | InetSocketAddress inetSocketAddress = new InetSocketAddress(InfoUtils.ProxyHost, InfoUtils.ProxyPort); |
| 353 | Proxy.Type type; |
| 354 | switch (InfoUtils.ProxyType){ |
| 355 | case "HTTP": |
| 356 | type=Proxy.Type.HTTP; |
| 357 | break; |
| 358 | case "SOCKS": |
| 359 | type=Proxy.Type.SOCKS; |
| 360 | break; |
| 361 | default: |
| 362 | type=Proxy.Type.DIRECT; |
| 363 | break; |
| 364 | } |
| 365 | return new Proxy(type, inetSocketAddress); |
| 366 | }else{ |
| 367 | return null; |
| 368 | } |
| 369 | } |
| 370 | |
| 371 | |
| 372 | static class MyAuthenticator extends Authenticator { |
no outgoing calls
no test coverage detected