Tabnine Logo
Socks5ProxySocketFactory
Code IndexAdd Tabnine to your IDE (free)

How to use
Socks5ProxySocketFactory
in
jodd.http.net

Best Java code snippets using jodd.http.net.Socks5ProxySocketFactory (Showing top 12 results out of 315)

origin: oblac/jodd

@Override
public Socket createSocket(final String host, final int port) {
  return createSocks5ProxySocket(host, port);
}
origin: oblac/jodd

  fill(in, buf, 2);
      fill(in, buf, 2);
      if (buf[1] == 0) {
        check = true;
  fill(in, buf, 4);
      fill(in, buf, 6);
      break;
    case 3:
      fill(in, buf, 1);
      fill(in, buf, (buf[0] & 0xff) + 2);
      break;
    case 4:
      fill(in, buf, 18);
      break;
    default:
  closeSocket(socket);
  throw rttex;
} catch (Exception ex) {
  closeSocket(socket);
  throw new HttpException(ProxyInfo.ProxyType.SOCKS5, ex.toString(), ex);
origin: oblac/jodd

  /**
   * Returns socket factory based on proxy type and SSL requirements.
   */
  protected SocketFactory getSocketFactory(final ProxyInfo proxy, final boolean ssl, final boolean trustAllCertificates) throws IOException {
    switch (proxy.getProxyType()) {
      case NONE:
        if (ssl) {
          return getDefaultSSLSocketFactory(trustAllCertificates);
        }
        else {
          return SocketFactory.getDefault();
        }
      case HTTP:
        return new HTTPProxySocketFactory(proxy);
      case SOCKS4:
        return new Socks4ProxySocketFactory(proxy);
      case SOCKS5:
        return new Socks5ProxySocketFactory(proxy);
      default:
        return null;
    }
  }
}
origin: org.jodd/jodd-http

  fill(in, buf, 2);
      fill(in, buf, 2);
      if (buf[1] == 0) {
        check = true;
  fill(in, buf, 4);
      fill(in, buf, 6);
      break;
    case 3:
      fill(in, buf, 1);
      fill(in, buf, (buf[0] & 0xff) + 2);
      break;
    case 4:
      fill(in, buf, 18);
      break;
    default:
  closeSocket(socket);
  throw rttex;
} catch (Exception ex) {
  closeSocket(socket);
  throw new HttpException(ProxyInfo.ProxyType.SOCKS5, ex.toString(), ex);
origin: org.jodd/jodd-http

  /**
   * Returns socket factory based on proxy type and SSL requirements.
   */
  protected SocketFactory getSocketFactory(final ProxyInfo proxy, final boolean ssl, final boolean trustAllCertificates) throws IOException {
    switch (proxy.getProxyType()) {
      case NONE:
        if (ssl) {
          return getDefaultSSLSocketFactory(trustAllCertificates);
        }
        else {
          return SocketFactory.getDefault();
        }
      case HTTP:
        return new HTTPProxySocketFactory(proxy);
      case SOCKS4:
        return new Socks4ProxySocketFactory(proxy);
      case SOCKS5:
        return new Socks5ProxySocketFactory(proxy);
      default:
        return null;
    }
  }
}
origin: oblac/jodd

@Override
public Socket createSocket(final String host, final int port, final InetAddress localHost, final int localPort) {
  return createSocks5ProxySocket(host, port);
}
origin: oblac/jodd

@Override
public Socket createSocket(final InetAddress host, final int port) {
  return createSocks5ProxySocket(host.getHostAddress(), port);
}
origin: oblac/jodd

@Override
public Socket createSocket(final InetAddress address, final int port, final InetAddress localAddress, final int localPort) {
  return createSocks5ProxySocket(address.getHostAddress(), port);
}
origin: org.jodd/jodd-http

@Override
public Socket createSocket(final String host, final int port, final InetAddress localHost, final int localPort) {
  return createSocks5ProxySocket(host, port);
}
origin: org.jodd/jodd-http

@Override
public Socket createSocket(final String host, final int port) {
  return createSocks5ProxySocket(host, port);
}
origin: org.jodd/jodd-http

@Override
public Socket createSocket(final InetAddress address, final int port, final InetAddress localAddress, final int localPort) {
  return createSocks5ProxySocket(address.getHostAddress(), port);
}
origin: org.jodd/jodd-http

@Override
public Socket createSocket(final InetAddress host, final int port) {
  return createSocks5ProxySocket(host.getHostAddress(), port);
}
jodd.http.netSocks5ProxySocketFactory

Javadoc

Socket factory for SOCKS5 proxy. See: http://www.ietf.org/rfc/rfc1928.txt

Most used methods

  • <init>
  • closeSocket
    Closes socket silently.
  • createSocks5ProxySocket
  • fill

Popular in Java

  • Updating database using SQL prepared statement
  • getSharedPreferences (Context)
  • addToBackStack (FragmentTransaction)
  • getSystemService (Context)
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • JButton (javax.swing)
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now