congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
UsernamePasswordCredentials
Code IndexAdd Tabnine to your IDE (free)

How to use
UsernamePasswordCredentials
in
sockslib.common

Best Java code snippets using sockslib.common.UsernamePasswordCredentials (Showing top 12 results out of 315)

origin: theotherp/nzbhydra2

/**
 * Constructs a Socks5 instance.
 *
 * @param socketAddress SOCKS5 server's address.
 * @param username      Username of the authentication.
 * @param password      Password of the authentication.
 */
public Socks5(SocketAddress socketAddress, String username, String password) {
  this(socketAddress);
  setCredentials(new UsernamePasswordCredentials(username, password));
}
origin: fengyouchao/sockslib

/**
 * Constructs a Socks5 instance.
 *
 * @param socketAddress SOCKS5 server's address.
 * @param username      Username of the authentication.
 * @param password      Password of the authentication.
 */
public Socks5(SocketAddress socketAddress, String username, String password) {
 this(socketAddress);
 setCredentials(new UsernamePasswordCredentials(username, password));
}
origin: theotherp/nzbhydra2

@Override
public void read(InputStream inputStream) throws SocksException, IOException {
  version = checkEnd(inputStream.read());
  usernameLength = checkEnd(inputStream.read());
  username = readString(inputStream, usernameLength);
  passwordLength = checkEnd(inputStream.read());
  password = readString(inputStream, passwordLength);
  credentials = new UsernamePasswordCredentials(username, password);
}
origin: fengyouchao/sockslib

@Override
public void read(InputStream inputStream) throws SocksException, IOException {
 version = checkEnd(inputStream.read());
 usernameLength = checkEnd(inputStream.read());
 username = readString(inputStream, usernameLength);
 passwordLength = checkEnd(inputStream.read());
 password = readString(inputStream, passwordLength);
 credentials = new UsernamePasswordCredentials(username, password);
}
origin: theotherp/nzbhydra2

user = values[0].split(":");
address = values[1].split(":");
credentials = new UsernamePasswordCredentials(user[0], user[1]);
origin: fengyouchao/sockslib

user = values[0].split(":");
address = values[1].split(":");
credentials = new UsernamePasswordCredentials(user[0], user[1]);
origin: fengyouchao/sockslib

Socks5 proxy = new Socks5(new InetSocketAddress(proxyHost, proxyPort));
if (username != null && password != null) {
 proxy.setCredentials(new UsernamePasswordCredentials(username, password));
origin: theotherp/nzbhydra2

Socks5 proxy = new Socks5(new InetSocketAddress(proxyHost, proxyPort));
if (username != null && password != null) {
  proxy.setCredentials(new UsernamePasswordCredentials(username, password));
origin: theotherp/nzbhydra2

Socks5 proxy = new Socks5(new InetSocketAddress(proxyHost, proxyPort));
if (username != null && password != null) {
  proxy.setCredentials(new UsernamePasswordCredentials(username, password));
origin: fengyouchao/sockslib

Socks5 proxy = new Socks5(new InetSocketAddress(proxyHost, proxyPort));
if (username != null && password != null) {
 proxy.setCredentials(new UsernamePasswordCredentials(username, password));
origin: theotherp/nzbhydra2

  return new Socks5(host, port);
} else {
  return new Socks5(host, port, new UsernamePasswordCredentials(username, password));
socks = new SSLSocks5(new InetSocketAddress(host, port), configuration);
if (!Strings.isNullOrEmpty(username)) {
  socks.setCredentials(new UsernamePasswordCredentials(username, password));
socks = new SSLSocks5(new InetSocketAddress(host, port), configuration);
if (!Strings.isNullOrEmpty(username)) {
  socks.setCredentials(new UsernamePasswordCredentials(username, password));
origin: fengyouchao/sockslib

 return new Socks5(host, port);
} else {
 return new Socks5(host, port, new UsernamePasswordCredentials(username, password));
socks = new SSLSocks5(new InetSocketAddress(host, port), configuration);
if (!Strings.isNullOrEmpty(username)) {
 socks.setCredentials(new UsernamePasswordCredentials(username, password));
socks = new SSLSocks5(new InetSocketAddress(host, port), configuration);
if (!Strings.isNullOrEmpty(username)) {
 socks.setCredentials(new UsernamePasswordCredentials(username, password));
sockslib.commonUsernamePasswordCredentials

Javadoc

The class UsernamePasswordCredentials represents an USERNAME/PASSWORD credentials. Only SOCKS5 protocol supports this credentials.

Most used methods

  • <init>

Popular in Java

  • Making http requests using okhttp
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getExternalFilesDir (Context)
  • getContentResolver (Context)
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • JLabel (javax.swing)
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • PhpStorm for WordPress
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