Thanks Oleg for the answer on the possible logging options for client5.

I tried different setup to find a solution to my present problem, but without seeing light.

I’m trying to setup a connection to a http2 server, using https and a proxy (which can do only HTTP1).

Thus, the CONNECT operation to setup the SSL Tunnel should use http1 , then the traffic going through the tunnel first negociate the protocol, and then use http2 if available.
It’s what I understood from the output of curl 7.59.0 compiled with http2 support.
(I can provide the traces of my tests if necessary)

I’m using Java 9 as recommended in a previous exchange, in order to have ALPN. 

First question : is it possible right now with httpclient5 ? 

The tests I have done while forcing usage of http2 : using .setVersionPolicy(HttpVersionPolicy.FORCE_HTTP_2), leads to
AsyncRetryExec:90 - I/O exception (org.apache.hc.core5.http2.H2ConnectionException) caught when processing request 
to {tls}->>https://korben.info:443: Frame size exceeds maximum

It seems quite logical : the client is trying to speak http2 to the proxy which is answering with http1.

But the same code using .setVersionPolicy(HttpVersionPolicy.NEGOTIATE), leads to :
Exception in thread "main" java.util.concurrent.ExecutionException: org.apache.hc.core5.http.ParseException: Invalid protocol version; error at offset 0: <€ÿÿÿÿ>

Is there something I’m doing wrong ?

The code for the last test is attached to this mail.

I can provide the traces for the different tests if necessary.