private SslContext newSslContext(SocketAddress remoteAddress, SessionProtocol desiredProtocol) {
        final String hostname;
        if (remoteAddress instanceof InetSocketAddress) {
            hostname = ((InetSocketAddress) remoteAddress).getHostString();
        } else {
            assert remoteAddress instanceof DomainSocketAddress;
            hostname = "unix:" + ((DomainSocketAddress) remoteAddress).path();
        }

        final SslContextMode sslContextMode =
                desiredProtocol.isExplicitHttp1() ? SslContextFactory.SslContextMode.CLIENT_HTTP1_ONLY
                                                  : SslContextFactory.SslContextMode.CLIENT;
        assert sslContextFactory != null;
        return sslContextFactory.getOrCreate(sslContextMode, hostname);
    }
Returns a {@link Bootstrap} corresponding to the specified {@link SocketAddress}
{@link SessionProtocol} and {@link SerializationFormat}.
core/src/main/java/com/linecorp/armeria/client/Bootstraps.java