Package one.tranic.t.base.parse.proxy
Class RegistryReader
java.lang.Object
one.tranic.t.base.parse.proxy.RegistryReader
A utility class for reading Windows registry values to retrieve proxy settings.
The class provides functionality for accessing proxy-related registry keys and returning corresponding settings wrapped in a ProxySettings record.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordA record class representing proxy settings. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic RegistryReader.ProxySettingsReads proxy settings from the Windows registry and returns them as a ProxySettings object.
-
Constructor Details
-
RegistryReader
public RegistryReader()
-
-
Method Details
-
readWindowsProxySettings
Reads proxy settings from the Windows registry and returns them as a ProxySettings object.If an error occurs during registry access, it attempts to read proxy settings from environment variables as a fallback.
- Returns:
- a ProxySettings object containing the proxy server, proxy override rules, and a flag indicating whether a proxy is enabled. If registry access fails, it uses values from environment variables.
-