@Override public boolean equals(Object obj) { if (obj instanceof IPRange) { IPRange range = (IPRange) obj; return range.getStartIP().equals(startIP) && range.getEndIP().equals(endIP); } else { return false; } }
@Override public Socket createProxySocket() throws IOException { try { return configuration.getSSLSocketFactory().createSocket(); } catch (SSLConfigurationException e) { throw new SocksException(e.getMessage()); } }
public SSLConfiguration build() { KeyStoreInfo keyStore = null; if (keyStorePath != null) { keyStore = new KeyStoreInfo(keyStorePath, keyStorePassword, keyStoreType); } KeyStoreInfo trustKeyStore = null; if (trustKeyStorePath != null) { trustKeyStore = new KeyStoreInfo(trustKeyStorePath, trustKeyStorePassword, trustKeyStoreType); } return new SSLConfiguration(keyStore, trustKeyStore, clientAuth); } }
/** * Gets next IP address. If the IP address doesn't have next IP then return <code>null</code>. * * @return Next IP address. */ public IP nextIP() { return new IP(value + 1); }
/** * Returns <code>true</code> if the IP can be used in Internet. * * @return <code>true</code> if the IP can be used in Internet. */ public boolean isUseInInternet() { return !isLocalIP(); }
@Override public Socket createProxySocket(InetAddress address, int port) throws IOException { try { return configuration.getSSLSocketFactory().createSocket(address, port); } catch (SSLConfigurationException e) { throw new SocksException(e.getMessage()); } }
@Override public boolean equals(Object obj) { if (obj instanceof IPRange) { IPRange range = (IPRange) obj; return range.getStartIP().equals(startIP) && range.getEndIP().equals(endIP); } else { return false; } }
public SSLConfiguration build() { KeyStoreInfo keyStore = null; if (keyStorePath != null) { keyStore = new KeyStoreInfo(keyStorePath, keyStorePassword, keyStoreType); } KeyStoreInfo trustKeyStore = null; if (trustKeyStorePath != null) { trustKeyStore = new KeyStoreInfo(trustKeyStorePath, trustKeyStorePassword, trustKeyStoreType); } return new SSLConfiguration(keyStore, trustKeyStore, clientAuth); } }
/** * Gets previous IP address. If the IP address doesn't have previous IP then return * <code>null</code>. * * @return Previous IP address. */ public IP preIP() { return new IP(value - 1); }
@Override public Socket createProxySocket() throws IOException { try { return configuration.getSSLSocketFactory().createSocket(); } catch (SSLConfigurationException e) { throw new SocksException(e.getMessage()); } }
@Override public Socket createProxySocket(InetAddress address, int port) throws IOException { try { return configuration.getSSLSocketFactory().createSocket(address, port); } catch (SSLConfigurationException e) { throw new SocksException(e.getMessage()); } }