public class OkHttpProxyInfo extends Object
限定符和类型 | 类和说明 |
---|---|
static class |
OkHttpProxyInfo.ProxyType
Proxy types.
|
构造器和说明 |
---|
OkHttpProxyInfo(OkHttpProxyInfo.ProxyType proxyType,
String proxyHost,
int proxyPort,
String proxyUser,
String proxyPassword) |
限定符和类型 | 方法和说明 |
---|---|
static OkHttpProxyInfo |
directProxy()
Creates directProxy.
|
Proxy |
getProxy()
返回 java.net.Proxy
|
String |
getProxyAddress()
Returns proxy address.
|
String |
getProxyPassword()
Returns proxy password or
null . |
int |
getProxyPort()
Returns proxy port.
|
OkHttpProxyInfo.ProxyType |
getProxyType()
Returns proxy type.
|
String |
getProxyUsername()
Returns proxy user name or
null if
no authentication required. |
static OkHttpProxyInfo |
httpProxy(String proxyAddress,
int proxyPort,
String proxyUser,
String proxyPassword)
Creates HTTP proxy.
|
static OkHttpProxyInfo |
socks4Proxy(String proxyAddress,
int proxyPort,
String proxyUser)
Creates SOCKS4 proxy.
|
static OkHttpProxyInfo |
socks5Proxy(String proxyAddress,
int proxyPort,
String proxyUser,
String proxyPassword)
Creates SOCKS5 proxy.
|
public OkHttpProxyInfo(OkHttpProxyInfo.ProxyType proxyType, String proxyHost, int proxyPort, String proxyUser, String proxyPassword)
public static OkHttpProxyInfo directProxy()
public static OkHttpProxyInfo socks4Proxy(String proxyAddress, int proxyPort, String proxyUser)
public static OkHttpProxyInfo socks5Proxy(String proxyAddress, int proxyPort, String proxyUser, String proxyPassword)
public static OkHttpProxyInfo httpProxy(String proxyAddress, int proxyPort, String proxyUser, String proxyPassword)
public OkHttpProxyInfo.ProxyType getProxyType()
public String getProxyAddress()
public int getProxyPort()
public String getProxyUsername()
null
if
no authentication required.public String getProxyPassword()
null
.public Proxy getProxy()
Copyright © 2024. All rights reserved.