From f2b5ffdb8ea3c766f14bab1dfd7c3865cffa2ce8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Daniel=20Jeli=C5=84ski?= A proxy server allows indirect connection to network services and
is used mainly for security (to get through firewalls) and
-performance reasons (proxies often do provide caching mechanisms).
-The following properties allow for configuration of the various type
-of proxies.Proxies
Applications may use the {@link java.net.ProxySelector#select(URI)} method +to determine the proxy that should be used for connecting to a given URI.
+The following properties are used to configure the JDK default + {@link java.net.ProxySelector} implementation. + This is the ProxySelector returned by {@link java.net.ProxySelector#getDefault()} + when no default ProxySelector was installed by + {@link java.net.ProxySelector#setDefault(ProxySelector)} +
HTTP
-The following proxy settings are used by the HTTP protocol handler.
+The following properties are used to configure the proxy + that is {@linkplain java.net.ProxySelector#select(URI) selected} + for URIs with the {@code http://} scheme.
{@systemProperty http.proxyHost} (default: <none>)
The hostname, or address, of the proxy server.
@@ -86,26 +94,29 @@ of proxies.
The default value excludes all common variations of the loopback address.
HTTPS
This is HTTP over SSL, a secure version of HTTP
- mainly used when confidentiality (like on payment sites) is needed.
The following proxy settings are used by the HTTPS protocol handler.
+HTTPS
+The following properties are used to configure the proxy + that is {@linkplain java.net.ProxySelector#select(URI) selected} + for URIs with the {@code https://} scheme.
{@systemProperty https.proxyHost} (default: <none>)
The hostname, or address, of the proxy server.
{@systemProperty https.proxyPort} (default: {@code 443})
The port number of the proxy server.
The HTTPS protocol handler will use the same nonProxyHosts +
The HTTPS protocol uses the same nonProxyHosts property as the HTTP protocol.
FTP
-The following proxy settings are used by the FTP protocol handler.
+The following properties are used to configure the proxy + that is {@linkplain java.net.ProxySelector#select(URI) selected} + for URIs with the {@code ftp://} scheme.
{@systemProperty ftp.proxyHost} (default: <none>)
The hostname, or address, of the proxy server.
@@ -118,37 +129,38 @@ of proxies.
The default value excludes all common variations of the loopback address.
SOCKS
This is another type of proxy. It allows for lower-level
- type of tunneling since it works at the TCP level. In effect,
- in the Java(tm) platform setting a SOCKS proxy server will result in
- all TCP connections to go through that proxy, unless other proxies
- are specified. If SOCKS is supported by a Java SE implementation, the
- following properties will be used:
SOCKS
+This is a lower-level proxy that is + {@linkplain java.net.ProxySelector#select(URI) selected} + for all of the above URI schemes unless a scheme-specific proxy + is configured. It is also selected for the {@code socket://} URI scheme.
{@systemProperty socksProxyHost} (default: <none>)
The hostname, or address, of the proxy server.
{@systemProperty socksProxyPort} (default: {@code 1080})
The port number of the proxy server.
{@systemProperty socksProxyVersion} (default: {@code 5})
+
{@systemProperty socksNonProxyHosts} (default: {@code localhost|127.*|[::1]})
+ Indicates the hosts that should be accessed without going
+ through the proxy. Typically this defines internal hosts.
+ The value of this property is a list of hosts, separated by
+ the '|' character. In addition, the wildcard character
+ '*' can be used for pattern matching. For example,
+ {@code -DsocksNonProxyHosts="*.example.com|localhost"}
+ will indicate that every host in the example.com domain (including sub-domains)
+ and the localhost should be accessed directly even if a proxy server is
+ specified.
The default value excludes all common variations of the loopback address.
+{@systemProperty socksProxyVersion} (default: {@code 5})
The version of the SOCKS protocol supported by the server. The
default is {@code 5} indicating SOCKS V5. Alternatively,
{@code 4} can be specified for SOCKS V4. Setting the property
to values other than these leads to unspecified behavior.
{@systemProperty java.net.socks.username} (default: <none>)
- Username to use if the SOCKSv5 server asks for authentication
- and no {@link java.net.Authenticator java.net.Authenticator} instance was found.
{@systemProperty java.net.socks.password} (default: <none>)
- Password to use if the SOCKSv5 server asks for authentication
- and no {@code java.net.Authenticator} instance was found.
Note that if no authentication is provided with either the above - properties or an Authenticator, and the proxy requires one, then - the user.name property will be used with no password.
{@systemProperty java.net.useSystemProxies} (default: {@code false})
On Windows systems, macOS systems, and Gnome systems it is possible to
@@ -192,20 +204,13 @@ of proxies.
{@systemProperty http.auth.digest.validateServer} (default: {@code false})
{@systemProperty http.auth.digest.validateProxy} (default: {@code false})
-{@systemProperty http.auth.digest.cnonceRepeat} (default: {@code 5})
-These 3 properties modify the behavior of the HTTP digest +
These properties modify the behavior of the HTTP digest authentication mechanism. Digest authentication provides a limited ability for the server to authenticate itself to the client (i.e. By proving it knows the user's password). However, not all HTTP servers support this capability and by default it is turned off. The - first two properties can be set to true to enforce this check for + properties can be set to true to enforce this check for authentication with either an origin or proxy server, respectively.
-It is usually not necessary to change the third property. It - determines how many times a cnonce value is re-used. This can be - useful when the MD5-sess algorithm is being used. Increasing this - value reduces the computational overhead on both client and server - by reducing the amount of material that has to be hashed for each - HTTP request.
{@systemProperty http.auth.ntlm.domain} (default: <none>)
NTLM is another authentication scheme. It uses the
{@code java.net.Authenticator} class to acquire usernames and passwords when