[PR #4561] [CLOSED] config: add VhostEnableH2C flag to support HTTP/2 cleartext upgrade #4998

Closed
opened 2026-05-05 14:52:45 -06:00 by gitea-mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/fatedier/frp/pull/4561
Author: @sword-jin
Created: 11/28/2024
Status: Closed

Base: devHead: vhost_support_h2c


📝 Commits (1)

  • 0a70a6a config: add VhostEnableH2C flag to support HTTP/2 cleartext upgrade

📊 Changes

7 files changed (+60 additions, -25 deletions)

View changed files

📝 pkg/config/flags.go (+1 -0)
📝 pkg/config/legacy/conversion.go (+1 -0)
📝 pkg/config/legacy/server.go (+5 -0)
📝 pkg/config/v1/server.go (+5 -0)
📝 pkg/util/vhost/http.go (+45 -25)
📝 server/dashboard_api.go (+2 -0)
📝 server/service.go (+1 -0)

📄 Description

WHY

Support h2c in virtual host.

Our use case is:

In front of the vhost, we deploy a caddy to reverse the traffic to frps. And use caddy do tls termination, we got a bug, the client always get an error internal: protocol error: no Grpc-Status trailer: unexpected EOF when requesting a GRPC streaming API(works well on unary API).

After some investigation and debug, I found we can fix it by support h2c on the vhost layer.

refrence:

close #4563


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/fatedier/frp/pull/4561 **Author:** [@sword-jin](https://github.com/sword-jin) **Created:** 11/28/2024 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `vhost_support_h2c` --- ### 📝 Commits (1) - [`0a70a6a`](https://github.com/fatedier/frp/commit/0a70a6a2d944640500edcba4af8aad1a563caf82) config: add VhostEnableH2C flag to support HTTP/2 cleartext upgrade ### 📊 Changes **7 files changed** (+60 additions, -25 deletions) <details> <summary>View changed files</summary> 📝 `pkg/config/flags.go` (+1 -0) 📝 `pkg/config/legacy/conversion.go` (+1 -0) 📝 `pkg/config/legacy/server.go` (+5 -0) 📝 `pkg/config/v1/server.go` (+5 -0) 📝 `pkg/util/vhost/http.go` (+45 -25) 📝 `server/dashboard_api.go` (+2 -0) 📝 `server/service.go` (+1 -0) </details> ### 📄 Description ### WHY Support `h2c` in virtual host. Our use case is: In front of the vhost, we deploy a caddy to reverse the traffic to frps. And use caddy do tls termination, we got a bug, the client always get an error `internal: protocol error: no Grpc-Status trailer: unexpected EOF` when requesting a GRPC streaming API(works well on unary API). After some investigation and debug, I found we can fix it by support h2c on the vhost layer. refrence: - Issue: https://github.com/golang/go/issues/14141 close #4563 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
gitea-mirror 2026-05-05 14:52:45 -06:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/frp#4998
No description provided.