congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
Socks5ProxySocketFactory.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
jodd.http.net.Socks5ProxySocketFactory
constructor

Best Java code snippets using jodd.http.net.Socks5ProxySocketFactory.<init> (Showing top 2 results out of 315)

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

  /**
   * 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;
    }
  }
}
jodd.http.netSocks5ProxySocketFactory<init>

Popular methods of Socks5ProxySocketFactory

  • closeSocket
    Closes socket silently.
  • createSocks5ProxySocket
  • fill

Popular in Java

  • Finding current android device location
  • getApplicationContext (Context)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • setScale (BigDecimal)
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • ImageIO (javax.imageio)
  • JComboBox (javax.swing)
  • JFileChooser (javax.swing)
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Top 17 Free Sublime Text Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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