-
Notifications
You must be signed in to change notification settings - Fork 883
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
Paddings in CONNECT/200 headers compressed by HPACK #72
Comments
True, it is ineffectual. It meant two things: this padding was not high on the priority list, and my Wireshark had problems decrypting TLS 1.3 and I forgot to fix that and verify the headers. Patching forwardproxy means maintaining a nonstandard build of Caddy. It's a little risky for me.
Good find. I didn't verify it hard enough.
This header is not a source of obfuscation, so no matter. |
I do remember Haproxy passes the extra headers through. I'm not familiar with what's going on with Caddy these days. It's a usability issue also, because I can only detect padding support automatically if the header is being passed through. But it seems not easy since forwardproxy is not even updated for Caddy 2. That workaround keeps thrashing the hpack table space. Just change the indexing policy here naiveproxy/src/net/third_party/quiche/src/spdy/core/hpack/hpack_encoder.cc Lines 63 to 75 in f51cbff
with something like |
I'm sure forwardproxy doesn't pass the extra headers, see:
Does that work with your HTTP Fast Open? I doubt.
Agree. This is better. Moreover, unindexed headers still go through a Huffman code compression (rfc7541#appendix-B), thus a '.' occupies 6 bits instead of 8. So I changed the placeholder to '*' which is still 8 bits. Other candidates are [& , ; X Z]. |
The point is how to patch it so it does pass headers. HTTP Fast Open can be deferred after autoconf of padding, which is a one time thing. I checked and found out the x/net/http2/server in Caddy will return a Date header no matter what, which changes once per second. So the concern about wasting hpack space is moot. And in bigger picture this overhead is tiny compared to user payload, so it's back to your first idea with RandBytesAsString. |
Patching hpack_encoder is ad hoc, but very concise. I stand by it. You decide. |
Yeah, but can you patch Caddy's hpack encoder? Not so easy then. |
Fixed. There is a followup change in Caddy forwardproxy that allows the padding in 200 to take effect but it's beyond the scope of this issue. |
The padding in
naiveproxy/src/net/tools/naive/http_proxy_socket.cc
Line 305 in 82ee107
naiveproxy/src/net/tools/naive/naive_proxy_bin.cc
Line 411 in 82ee107
The Proxy-Authenticate header is compressed to 1 byte even quicker, further reducing size of CONNECT request. Should that be concerned?
The text was updated successfully, but these errors were encountered: