-
-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
client_ip matcher not working correctly on resumed HTTP/3 connections #6664
Comments
This appears to be a regression in the 2.9 beta. 2.8.4 correctly serves the file on a resumed connection. |
Same issues here, but have a look at #6596 in particular #6596 (comment) Temporary workaround for me is: @early tls early_data
error @early 425 But I hope when #6596 is merged into master and used for the next 2.9 beta that the temporary workaround can be removed. |
Ah, thanks. I hadn't seen that PR and the workaround fixes it for me too. |
I raised this issue on the forum https://caddy.community/t/firefox-http-3-0-rtt-issue-with-named-ip-matcher/25764 where we came up with our own workaround which is different to this one. That thread is locked now but I'm slightly confused over what the final fix is going to be for this. Once that PR is committed do we still need either of these workarounds or will that solve it without any workarounds? |
When #6596 is merged, the client_ip matcher will throw an error instead of returning false, meaning the request will fail with a specific error code ( If you need the fix right away, you can build from that branch for now with |
@francislavoie would you mind to merge master into the 6596 branch? I would like to update my 2.9.0-beta2 environment. |
I just rebased a few minutes ago. |
I've just built that branch with xcaddy and removed my workaround. It appears to do exactly what you said. Looks good to me!
|
Same experience for me. Works like a charme. Would be awesome, if #6596 could be added to the next 2.9.0-beta (or final) release. |
That is the plan @steffenbusch |
Yeah I'm in process of reviewing this |
When an HTTP/3 connection is old enough that it needs explicitly resuming, it seems the
client_ip
matcher information becomes invalid which breaks LAN filtering (fortunately in a fails-closed state for me, but might not be for everyone).Example Caddyfile:
Gives the logs:
The
client_ip
in the log still appears correct, but is not being used by the matcher so the second (resumed) try returns a 403.Testing is unfortunately a little slow. Only Firefox even seems to attempt HTTP/3 for some reason (Chrome(ish) and Safari don't try, curl is one-shot as far as I know). And it will reuse the connection without an explicit "resumed" handshake (whatever that entails) unless it's left idle for 1 minute between tries.
In the logs above, the first request was HTTP/2 and the followup switched to HTTP/3 but I also have examples where a successful HTTP/3 request is made to start with, which is why I think the "resumed" is important.
The text was updated successfully, but these errors were encountered: