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

upgrade http version of incoming taffic http_proxy #628

Open
GlenDC opened this issue Mar 26, 2025 · 5 comments
Open

upgrade http version of incoming taffic http_proxy #628

GlenDC opened this issue Mar 26, 2025 · 5 comments

Comments

@GlenDC
Copy link
Contributor

GlenDC commented Mar 26, 2025

Hi, is there already support for upgrading the http version of incoming traffic into an http proxy server?
If so, how can that be done, documentation doesn't seem to mention it. And it not, would you be open for a contribution, and if so, how would you have that in mind?

@zh-jq
Copy link
Collaborator

zh-jq commented Mar 27, 2025

The client send a http1 forward request and then g3proxy connnect to the upstream with a h2 connection?
It's normal for a reverse proxy, but I don't think it's useful for a forward proxy. So what's the usecase here?

@GlenDC
Copy link
Contributor Author

GlenDC commented Mar 27, 2025

It can be useful in case you have something in between proxy and client that can only do h1. This forces h1 on client, but the server forwarded though can only handle properly h2

@zh-jq-b
Copy link
Member

zh-jq-b commented Mar 27, 2025

I think this can be done along with site level http upstream pool (not implemented yet). When a request arrive as a plain HTTP forward request (no TLS here), it will try to fetch a h1 connection or h2 stream from that pool, the pool itself will handle the creation of new h1/h2 connections.

The limitation here is that, you have to add site config in (anonymous) user config for each domain you want force h2.

@zh-jq-b
Copy link
Member

zh-jq-b commented Mar 27, 2025

The design will be different for TLS traffic, as there won't any http pool used, just h1 <-> h2 conversion on connected connection in g3proxy/src/inspect/http. The ICAP client code also need to be added.

@mspublic
Copy link
Contributor

mspublic commented Apr 2, 2025

I think this is a useful feature for roadmap.

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

4 participants