A Java request can encounter several proxy inputs: explicit client configuration, the default selector, JVM networking properties, and supported operating-system settings. When a log unexpectedly mentions SOCKS, identify which input chose it.

For code that uses the default selector, inspect the decision for the exact destination:

URI target = URI.create("https://example.com/");
ProxySelector selector = ProxySelector.getDefault();
if (selector != null) {
    System.out.println(selector.select(target));
}

This reports the selector's candidates. It does not prove which connection ultimately succeeded, and a client with its own explicit route can make a different choice.

Check the effective settings

Review http.proxyHost, https.proxyHost, socksProxyHost, their ports, and java.net.useSystemProxies. The JDK networking-properties documentation describes their scope and precedence. System proxy discovery is checked at startup; set it deliberately when starting the JVM.

Historical answers describe specific combinations of old Windows dialogs and old JDKs. Those reports can explain the origin of a workaround, but they do not establish that a current runtime has the same bug. Record the runtime version and the selector output before changing operating-system settings for every application.

If the application needs an HTTP proxy for one client, an explicit proxy configuration can make that requirement clearer. If it needs central automatic routing, investigate why the selector received or returned the unexpected SOCKS entry.

A custom selector should preserve intentional bypasses and failure handling. Filtering every SOCKS candidate indiscriminately can break connections that were supposed to use one. Fix the incorrect rule with the smallest scope you can identify.

Ũhoro ũhĩtĩte