Skip to content
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

Is it possible to proxy Http/2 to Http/3 on TCP layer? #406

Open
louiesun opened this issue Oct 11, 2024 · 3 comments
Open

Is it possible to proxy Http/2 to Http/3 on TCP layer? #406

louiesun opened this issue Oct 11, 2024 · 3 comments

Comments

@louiesun
Copy link

I want to write a proxy but I don't want to add a CA on my users's computer.

So I can't decrypt the flow.

Is it possible?

@wkrp
Copy link
Member

wkrp commented Oct 11, 2024

No, it's not possible. If it were possible for a local proxy to decrypt TLS and re-encrypt as QUIC, it would be possible for anyone on the network path to do it, which would mean TLS is insecure.

There's a thread about local CA and MITM at #373.

You could, of course, wrap HTTP/2 (or any other stream) in an HTTP/3 tunnel, using a local HTTP proxy (CONNECT) or MASQUE CONNECT-UDP or CONNECT-IP. But then you can't forward connections straight to the origin web server, you need a proxy server to remove the outer layer.

@louiesun
Copy link
Author

No, it's not possible. If it were possible for a local proxy to decrypt TLS and re-encrypt as QUIC, it would be possible for anyone on the network path to do it, which would mean TLS is insecure.

There's a thread about local CA and MITM at #373.

You could, of course, wrap HTTP/2 (or any other stream) in an HTTP/3 tunnel, using a local HTTP proxy (CONNECT) or MASQUE CONNECT-UDP or CONNECT-IP. But then you can't forward connections straight to the origin web server, you need a proxy server to remove the outer layer.

I don't want to decrypt the package. I am trying to move the randoms and secrets and some other things of the packages.
Can we just move the clinet random from one to another and move the encrypted server responce from another to one?

@mmmray
Copy link

mmmray commented Oct 11, 2024

the payload inside TLS in h2 vs h3 looks completely different, and has to be converted. you can't do it for the same reason you can't convert h1 to h2 without decrypting. of course, with QUIC there are more issues than that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants