src/main/java/com/github/markusbernhardt/proxy/selector/fixed/FixedSocksSelector.java
raw symbols SCIP| 1 | package com.github.markusbernhardt.proxy.selector.fixed; |
| 2 | |
| 3 | import java.net.InetSocketAddress; |
| 4 | import java.net.Proxy; |
| 5 | |
| 6 | /***************************************************************************** |
| 7 | * This proxy selector is configured with a fixed proxy. This proxy will be |
| 8 | * returned for all URIs passed to the select method. This implementation can be |
| 9 | * used for SOCKS 4 and 5 proxy support. |
| 10 | * |
| 11 | * @author Markus Bernhardt, Copyright 2016 |
| 12 | * @author Bernd Rosstauscher, Copyright 2009 |
| 13 | ****************************************************************************/ |
| 14 | |
| 15 | public class FixedSocksSelector extends FixedProxySelector { |
| 16 | |
| 17 | /************************************************************************* |
| 18 | * Constructor |
| 19 | * |
| 20 | * @param proxyHost |
| 21 | * the host name or IP address of the proxy to use. |
| 22 | * @param proxyPort |
| 23 | * the port of the proxy. |
| 24 | ************************************************************************/ |
| 25 | |
| 26 | public FixedSocksSelector(String proxyHost, int proxyPort) { |
| 27 | super(new Proxy(Proxy.Type.SOCKS, InetSocketAddress.createUnresolved(proxyHost, proxyPort))); |
| 28 | } |
| 29 | |
| 30 | } |