@Configuration @EnableConfigurationProperties(value=NetProxyProperties.class) @ConditionalOnProperty(prefix="yue.net.proxy", name="enabled", havingValue="true") public class NetProxy extends Object
Modifier and Type | Field and Description |
---|---|
static String |
DEF_NON_PROXY_VAL |
static String |
FTP_NON_PROXY_HOSTS |
static String |
FTP_PROXY_HOST |
static String |
FTP_PROXY_PORT |
static String |
HTTP_NON_PROXY_HOSTS |
static String |
HTTP_PROXY_HOST |
static String |
HTTP_PROXY_PORT |
static String |
HTTPS_PROXY_HOST |
static String |
HTTPS_PROXY_PORT |
static String |
SOCKET_NON_PROXY_HOSTS |
static String |
SOCKS_PROXY_HOST |
static String |
SOCKS_PROXY_PORT |
static String |
SOCKS_PROXY_VERSION |
static String |
USE_SYSTEM_PROXIES |
Constructor and Description |
---|
NetProxy() |
Modifier and Type | Method and Description |
---|---|
void |
ftpServerClose() |
void |
ftpServerEnable() |
void |
httpServerClose() |
void |
httpServerEnable() |
void |
httpsServerClose() |
void |
httpsServerEnable() |
void |
socksServerClose() |
void |
socksServerEnable() |
static void |
useSystemProxies()
使用系统代理
|
public static final String HTTP_PROXY_HOST
public static final String HTTP_PROXY_PORT
public static final String HTTPS_PROXY_HOST
public static final String HTTPS_PROXY_PORT
public static final String FTP_PROXY_HOST
public static final String FTP_PROXY_PORT
public static final String SOCKS_PROXY_HOST
public static final String SOCKS_PROXY_PORT
public static final String SOCKS_PROXY_VERSION
public static final String FTP_NON_PROXY_HOSTS
public static final String HTTP_NON_PROXY_HOSTS
public static final String SOCKET_NON_PROXY_HOSTS
public static final String USE_SYSTEM_PROXIES
public static final String DEF_NON_PROXY_VAL
public static void useSystemProxies()
在Windows系统、macOS系统和Gnome系统上,可以告诉java.net堆栈,将该属性设置为true,以使用系统代理设置(这两个系统都允许通过它们的用户界面全局设置代理)。注意,此属性只在启动时检查一次。
public void httpServerEnable()
public void httpServerClose()
public void httpsServerEnable()
public void httpsServerClose()
public void ftpServerEnable()
public void ftpServerClose()
public void socksServerEnable()
public void socksServerClose()
Copyright © 2022 Pivotal Software, Inc.. All rights reserved.