akuhtz / proxy-vole

Proxy Vole is a Java library to auto detect the platform network proxy settings.
Other
30 stars 16 forks source link

Unexpected proxy auto-detection result on Windows #147

Open vsalavatov opened 2 days ago

vsalavatov commented 2 days ago

A user contacted me today saying that the application does not autodetect proxy settings from the system (Windows 11). The proxy was set to use a PAC script and Chrome detected it successfully. After an investigation it turned out to be the following: image

The user had both the "Automatically detect settings" and "Use setup script" (the PAC thing) configured. With this configuration, proxy-vole failed to detect the PAC script (all strategies didn't find the setting, no errors). With the "Automatically detect settings" toggle turned off, the proxy vole successfully detected the PAC script using the OS_DEFAULT strategy.

Honestly, I'm not completely sure what the expected behaviour should be in this case. But it might be beneficial to change the behaviour here to find the PAC script.

Details:

Edition Windows 11 Pro
Version 23H2
akuhtz commented 21 hours ago

@vsalavatov I cannot reproduce it on my system. Can you find out what the default browser is on this system?

Not sure if you can let the user run a console program that prints log information like in ProxySearch:

    public static void main(String[] args) {
        ProxySearch ps = ProxySearch.getDefaultProxySearch();
        Logger.setBackend(new LogBackEnd() {

            @Override
            public void log(Class<?> clazz, LogLevel loglevel, String msg, Object... params) {
                System.out.println(MessageFormatter.format(msg, params).getMessage());
            }

        });
        ps.getProxySelector();
    }