[GH-ISSUE #3162] 望考虑 https2http 插件支持 wss #2535

Closed
opened 2026-05-05 13:37:56 -06:00 by gitea-mirror · 12 comments
Owner

Originally created by @whwnow on GitHub (Nov 6, 2022).
Original GitHub issue: https://github.com/fatedier/frp/issues/3162

Describe the feature request

我在本地部署 Rocket.Chat 时,本地服务是 http + ws,然后使用 https2http 插件转成 https 对外,wss 协议的状态码一直为101 。看到 issues 里有不少都在提这个功能。给的方案是是自己在加一层 nginx,然后 frp 使用 tcp 协议。这个从易用性上牺牲好多,本来使用 https2http 插件,证书的问题全都解决了,现在还要自己再加一套 nginx,做 https 转发。望考虑一下这个需求

Describe alternatives you've considered

No response

Affected area

  • Docs
  • Installation
  • Performance and Scalability
  • Security
  • User Experience
  • Test and Release
  • Developer Infrastructure
  • Client Plugin
  • Server Plugin
  • Extensions
  • Others
Originally created by @whwnow on GitHub (Nov 6, 2022). Original GitHub issue: https://github.com/fatedier/frp/issues/3162 ### Describe the feature request 我在本地部署 Rocket.Chat 时,本地服务是 http + ws,然后使用 https2http 插件转成 https 对外,wss 协议的状态码一直为101 。看到 issues 里有不少都在提这个功能。给的方案是是自己在加一层 nginx,然后 frp 使用 tcp 协议。这个从易用性上牺牲好多,本来使用 https2http 插件,证书的问题全都解决了,现在还要自己再加一套 nginx,做 https 转发。望考虑一下这个需求 ### Describe alternatives you've considered _No response_ ### Affected area - [ ] Docs - [ ] Installation - [ ] Performance and Scalability - [ ] Security - [ ] User Experience - [ ] Test and Release - [ ] Developer Infrastructure - [X] Client Plugin - [ ] Server Plugin - [ ] Extensions - [ ] Others
gitea-mirror 2026-05-05 13:37:56 -06:00
Author
Owner

@fatedier commented on GitHub (Nov 7, 2022):

如果解决方案不复杂的话,可以考虑。

<!-- gh-comment-id:1305009282 --> @fatedier commented on GitHub (Nov 7, 2022): 如果解决方案不复杂的话,可以考虑。
Author
Owner

@whwnow commented on GitHub (Nov 7, 2022):

感谢支持!期待早日可以用上这个功能。我现在的转发机服务很干净,就一个frp,这样就不用再起一套nginx了

<!-- gh-comment-id:1305267828 --> @whwnow commented on GitHub (Nov 7, 2022): 感谢支持!期待早日可以用上这个功能。我现在的转发机服务很干净,就一个frp,这样就不用再起一套nginx了
Author
Owner

@welearner commented on GitHub (Nov 30, 2022):

+1,啥时候能支持 wss 啊,现在通过 frp 运行 code-server 根本用不了 https,有点小抓狂

<!-- gh-comment-id:1332337249 --> @welearner commented on GitHub (Nov 30, 2022): +1,啥时候能支持 wss 啊,现在通过 frp 运行 code-server 根本用不了 https,有点小抓狂
Author
Owner

@TaoRone commented on GitHub (Apr 11, 2023):

同求……https2http 插件转不了ws很难受

<!-- gh-comment-id:1503487503 --> @TaoRone commented on GitHub (Apr 11, 2023): 同求……https2http 插件转不了ws很难受
Author
Owner

@ningfdx commented on GitHub (Apr 19, 2023):

@fatedier 可否提供一下思路,是否需要再 frp/pkg/plugin/client/https2http.go:78 增加Transport以支持长连接?
,我可以帮助开发和贡献

<!-- gh-comment-id:1514770692 --> @ningfdx commented on GitHub (Apr 19, 2023): @fatedier 可否提供一下思路,是否需要再 frp/pkg/plugin/client/https2http.go:78 增加Transport以支持长连接? ,我可以帮助开发和贡献
Author
Owner

@haodiao commented on GitHub (May 8, 2023):

@fatedier https2http 插件很好用,但用户访问时只有 http1.1 的tls,能否升级到http/2,甚至是最新基于udp的http/3

<!-- gh-comment-id:1538909317 --> @haodiao commented on GitHub (May 8, 2023): @fatedier https2http 插件很好用,但用户访问时只有 http1.1 的tls,能否升级到http/2,甚至是最新基于udp的http/3
Author
Owner

@fatedier commented on GitHub (Jun 28, 2023):

排查到是由于 yamux 的一个问题导致 wss 无法正常使用: https://github.com/hashicorp/yamux/pull/121

会在这个 PR 中修复: https://github.com/fatedier/frp/pull/3503

<!-- gh-comment-id:1611495603 --> @fatedier commented on GitHub (Jun 28, 2023): 排查到是由于 yamux 的一个问题导致 wss 无法正常使用: https://github.com/hashicorp/yamux/pull/121 会在这个 PR 中修复: https://github.com/fatedier/frp/pull/3503
Author
Owner

@whwnow commented on GitHub (Jun 29, 2023):

给力,这个问题终于解决了,哈哈

<!-- gh-comment-id:1612963322 --> @whwnow commented on GitHub (Jun 29, 2023): > 给力,这个问题终于解决了,哈哈
Author
Owner

@rebron1900 commented on GitHub (Apr 21, 2025):

@whwnow 大佬,如何才能在插件里启用wss呢?

<!-- gh-comment-id:2817832882 --> @rebron1900 commented on GitHub (Apr 21, 2025): @whwnow 大佬,如何才能在插件里启用wss呢?
Author
Owner

@FocusProgram commented on GitHub (Jun 16, 2025):

@rebron1900 请问下最终解决了吗?看了半天https2http插件是不是还是不支持wss啊

<!-- gh-comment-id:2977069484 --> @FocusProgram commented on GitHub (Jun 16, 2025): @rebron1900 请问下最终解决了吗?看了半天https2http插件是不是还是不支持wss啊
Author
Owner

@PhDLuffy commented on GitHub (Jul 6, 2025):

@FocusProgram 问题解决了,更新frp 0.51之后的版本就OK了,正常使用https2http就可以,非常完美。

<!-- gh-comment-id:3041231168 --> @PhDLuffy commented on GitHub (Jul 6, 2025): @FocusProgram 问题解决了,更新frp 0.51之后的版本就OK了,正常使用https2http就可以,非常完美。
Author
Owner

@rebron1900 commented on GitHub (Jul 20, 2025):

@FocusProgram 问题解决了,更新frp 0.51之后的版本就OK了,正常使用https2http就可以,非常完美。

你具体怎么配置的?我现在是下面这个配置,但是minio前端提示 objectBrowserWSMiddleware.ts:78 WebSocket connection to 'wss://miniow.test.com:1234/ws/objectManager' failed:

[[proxies]]
name = "miniow"
type = "https"
subdomain = "miniow"
transport.proxyProtocolVersion = "v2"
[proxies.plugin]
type = "https2http"
localAddr = "192.168.1.12:56184"                                         
crtPath = "/ssl/1234/frp.crt"
keyPath = "/ssl/1234/frp.key"      
hostHeaderRewrite = "192.168.1.12"                                      
requestHeaders.set.x-from-where = "frp"
<!-- gh-comment-id:3094376857 --> @rebron1900 commented on GitHub (Jul 20, 2025): > [@FocusProgram](https://github.com/FocusProgram) 问题解决了,更新frp 0.51之后的版本就OK了,正常使用https2http就可以,非常完美。 你具体怎么配置的?我现在是下面这个配置,但是minio前端提示 `objectBrowserWSMiddleware.ts:78 WebSocket connection to 'wss://miniow.test.com:1234/ws/objectManager' failed: ` ``` [[proxies]] name = "miniow" type = "https" subdomain = "miniow" transport.proxyProtocolVersion = "v2" [proxies.plugin] type = "https2http" localAddr = "192.168.1.12:56184" crtPath = "/ssl/1234/frp.crt" keyPath = "/ssl/1234/frp.key" hostHeaderRewrite = "192.168.1.12" requestHeaders.set.x-from-where = "frp" ```
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#2535
No description provided.