private static Implementation detectImplementation() {
        try {
            Class.forName(JUNIXSOCKET_SOCKET_CLASS);
            LOG.debug("Using JUnixSocket Unix Domain Socket implementation");
            return Implementation.JUNIXSOCKET;
        } catch (final ClassNotFoundException e) {
            try {
                Class.forName(JDK_UNIX_SOCKET_ADDRESS_CLASS);
                LOG.debug("Using JDK Unix Domain Socket implementation");
                return Implementation.JDK;
            } catch (final ClassNotFoundException e2) {
                LOG.debug("No Unix Domain Socket implementation found");
                return Implementation.NONE;
            }
        }
    }
A factory for Unix domain sockets.
<p>
This implementation supports both the JDK16+ standard library implementation (JEP 380) and the JUnixSocket library.
It will automatically detect which implementation is available and use it. JUnixSocket is preferred, since it
supports the {@link java.net.Socket} API used by the classic client.
</p>

@since 5.6
httpclient5/src/main/java/org/apache/hc/client5/http/socket/UnixDomainSocketFactory.java