public enum ProxyMode extends Enum<ProxyMode>
Central axis: PAC_URL_* modes only differ in how the PAC URL is
discovered. All PAC_URL_* modes then download the PAC file and evaluate
FindProxyForURL through the JavaScript (GraalVM) PAC evaluator. The
discovery step never determines the final route by itself.
The modes are cut along clear functional lines. In particular, the way the
PAC URL is discovered (PowerShell vs. Windows settings vs. manual)
is an explicit choice and is never silently mixed with static-proxy or
registry reading. No PAC_URL_* mode ever falls back to
WINDOWS_STATIC_PROXY, MANUAL_PROXY or DISABLED.
| Enum Constant and Description |
|---|
DISABLED
Forces DIRECT.
|
MANUAL_PROXY
Uses a manually configured proxy
host:port. |
PAC_URL_MANUAL
Uses a PAC URL that the user configured explicitly, downloads the PAC
file and evaluates
FindProxyForURL via GraalVM/JavaScript. |
PAC_URL_POWERSHELL
Discovers the PAC URL exclusively through PowerShell
(the
AutoConfigURL one-liner, executed inline via -Command). |
PAC_URL_WINDOWS_SETTINGS
Discovers the PAC URL from Windows settings without PowerShell,
via
WindowsPacUrlResolver (reg.exe across all relevant
hives/policies, the DefaultConnectionSettings blob and the
WPAD auto-detect flag). |
POWERSHELL_ROUTE_RESOLVER_LEGACY
Deprecated.
Use a
PAC_URL_* mode (GraalVM PAC evaluation) instead. |
WINDOWS_NATIVE_PROXY_SETTINGS
Reserved future Java 21 / FFM mode that will read proxy settings /
AutoConfigURL / auto-detect through native Windows APIs and then
use the Java/GraalVM PAC evaluation. |
WINDOWS_NATIVE_ROUTE_RESOLVER
Reserved future Java 21 / FFM mode that will determine the final route for
a concrete URL through WinHTTP / native Windows APIs (the native successor
of
POWERSHELL_ROUTE_RESOLVER_LEGACY). |
WINDOWS_STATIC_PROXY
Reads the classic static Windows proxy from
ProxyEnable / ProxyServer / ProxyOverride. |
| Modifier and Type | Method and Description |
|---|---|
static ProxyMode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ProxyMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ProxyMode DISABLED
public static final ProxyMode MANUAL_PROXY
host:port.
public static final ProxyMode WINDOWS_STATIC_PROXY
ProxyEnable / ProxyServer / ProxyOverride.
This is the former REGISTRY mode. It is no PAC mode, reads no
AutoConfigURL, and never determines a route via PowerShell. It is
only ever used when explicitly selected and must not be a silent fallback
of any PAC mode.
public static final ProxyMode PAC_URL_MANUAL
FindProxyForURL via GraalVM/JavaScript.
Pipeline: configured pacUrl -> download -> GraalVM FindProxyForURL
-> parse. It performs no automatic discovery:
WindowsPacUrlResolver (no reg.exe/registry).StaticProxySettingsResolver.public static final ProxyMode PAC_URL_POWERSHELL
AutoConfigURL one-liner, executed inline via -Command).
PowerShell may only deliver the PAC URL here, never the final route.
Afterwards the PAC file is downloaded and evaluated via GraalVM/JavaScript.
This is the important test path on hardened machines.
public static final ProxyMode PAC_URL_WINDOWS_SETTINGS
WindowsPacUrlResolver (reg.exe across all relevant
hives/policies, the DefaultConnectionSettings blob and the
WPAD auto-detect flag). Afterwards the PAC file is downloaded and
evaluated via GraalVM/JavaScript.@Deprecated public static final ProxyMode POWERSHELL_ROUTE_RESOLVER_LEGACY
PAC_URL_* mode (GraalVM PAC evaluation) instead.System.Net.WebRequest.GetSystemWebProxy() to determine the final
route directly. No GraalVM, no own PAC evaluation. Kept only for
diagnostics/backward compatibility and not offered in normal UIs.public static final ProxyMode WINDOWS_NATIVE_PROXY_SETTINGS
AutoConfigURL / auto-detect through native Windows APIs and then
use the Java/GraalVM PAC evaluation. Currently returns a
NOT_IMPLEMENTED result — never DIRECT or a fallback.public static final ProxyMode WINDOWS_NATIVE_ROUTE_RESOLVER
POWERSHELL_ROUTE_RESOLVER_LEGACY). Currently returns a
NOT_IMPLEMENTED result — never DIRECT or a fallback.public static ProxyMode[] values()
for (ProxyMode c : ProxyMode.values()) System.out.println(c);
public static ProxyMode valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullCopyright © 2026. All rights reserved.