Class RegistryReader

java.lang.Object
one.tranic.t.proxy.RegistryReader

public class RegistryReader extends Object
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.

  • Constructor Details

    • RegistryReader

      public RegistryReader()
  • Method Details

    • readWindowsProxySettings

      public static RegistryReader.ProxySettings 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.