protected void initChannel()

in zuul-core/src/main/java/com/netflix/zuul/netty/server/http2/Http2SslChannelInitializer.java [77:139]


    protected void initChannel(Channel ch) {
        SslHandler sslHandler = sslContext.newHandler(ch.alloc());
        sslHandler.engine().setEnabledProtocols(serverSslConfig.getProtocols());

        //        SSLParameters sslParameters = new SSLParameters();
        //        AlgorithmConstraints algoConstraints = new AlgorithmConstraints();
        //        sslParameters.setAlgorithmConstraints(algoConstraints);
        //        sslParameters.setUseCipherSuitesOrder(true);
        //        sslHandler.engine().setSSLParameters(sslParameters);

        if (LOG.isDebugEnabled()) {
            LOG.debug(
                    "ssl protocols supported: {}",
                    String.join(", ", sslHandler.engine().getSupportedProtocols()));
            LOG.debug(
                    "ssl protocols enabled: {}",
                    String.join(", ", sslHandler.engine().getEnabledProtocols()));

            LOG.debug(
                    "ssl ciphers supported: {}",
                    String.join(", ", sslHandler.engine().getSupportedCipherSuites()));
            LOG.debug(
                    "ssl ciphers enabled: {}",
                    String.join(", ", sslHandler.engine().getEnabledCipherSuites()));
        }

        // Configure our pipeline of ChannelHandlerS.
        ChannelPipeline pipeline = ch.pipeline();

        storeChannel(ch);
        addTimeoutHandlers(pipeline);
        addPassportHandler(pipeline);
        addTcpRelatedHandlers(pipeline);
        pipeline.addLast(new Http2FrameLoggingPerClientIpHandler());
        pipeline.addLast("ssl", sslHandler);
        addSslInfoHandlers(pipeline, isSSlFromIntermediary);
        addSslClientCertChecks(pipeline);

        Http2MetricsChannelHandlers http2MetricsChannelHandlers =
                new Http2MetricsChannelHandlers(registry, "server", "http2-" + http2SslMetricId);

        Http2ConnectionCloseHandler connectionCloseHandler = new Http2ConnectionCloseHandler(registry);
        Http2ConnectionExpiryHandler connectionExpiryHandler = new Http2ConnectionExpiryHandler(
                maxRequestsPerConnection, maxRequestsPerConnectionInBrownout, connectionExpiry);

        pipeline.addLast(
                "http2CodecSwapper",
                new Http2OrHttpHandler(
                        new Http2StreamInitializer(
                                ch,
                                this::http1Handlers,
                                http2MetricsChannelHandlers,
                                connectionCloseHandler,
                                connectionExpiryHandler),
                        channelConfig,
                        cp -> {
                            http1Codec(cp);
                            http1Handlers(cp);
                        }));
        pipeline.addLast("codec_placeholder", DUMMY_HANDLER);

        pipeline.addLast(swallowSomeHttp2ExceptionsHandler);
    }