WeidiDeng
WeidiDeng
Yes, or else h2c will stop working if keep alive is disabled. For now it's buggy behaviour, but it works 🤷 .
Just wait for the release of [golang/x/net](https://github.com/golang/net/commit/9617c6335bca5e4e80949a5b1dbe43273260e8a3). It's fixed in the master.
@mohammed90 I always thought we should pool connections for the same client ip if proxy protocol is enabled instead of blindly disabling keep-alive. Tried to implement custom pooling but gave...
@CRCinAU Can you try `xcaddy build h2c-proxy-protocol` to see if it's fixed?
Run following dockerfile: ``` FROM caddy:2.7.6-builder AS builder RUN xcaddy build h2c-proxy-protocol FROM caddy:2.7.6 COPY --from=builder /usr/bin/caddy /usr/bin/caddy ``` The resulting image contains this patch. And you can copy the...
Any logs available? Please enable debug in the global option.
> You need to configure it like this (see https://caddyserver.com/docs/caddyfile/directives/reverse_proxy#the-http-transport): > > ``` > reverse_proxy h2c://:80 { > transport http { > keepalive off > proxy_protocol v2 > } >...
I think this is a stdlib issue, https://github.com/golang/net/blob/022530c41555839e27aec3868cc480fb7b5e33d4/http2/transport.go#L1028 However h2c requests start with a streamID of 3. https://github.com/golang/net/blob/022530c41555839e27aec3868cc480fb7b5e33d4/http2/transport.go#L836 So requests never get sent in this case.
@CRCinAU Can you try with `xcaddy build h2c-proxy-protocol --replace golang.org/x/net=github.com/WeidiDeng/net@h2c-disable-keepalive`? You'll need to update the caddy image version to 2.8.0 since older version can't build with this method.
That builder has the wrong xcaddy version 0.4.1 instead of the latest 0.4.2. It'll be a while before the docker is ready.