[GH-ISSUE #3073] [Feature Request] frpc连接frps支持对称加密方式连接 #2462

Closed
opened 2026-05-05 13:35:01 -06:00 by gitea-mirror · 8 comments
Owner

Originally created by @dwxiayi on GitHub (Aug 26, 2022).
Original GitHub issue: https://github.com/fatedier/frp/issues/3073

Describe the feature request

frpc默认连接frps应该是使用明文发送token,存在抓包泄漏风险。
当然现在版本是支持tls证书连接方式的,但是证书的制作和携带不够方便。
是否可以考虑使用客户端、服务端配置相同密码(在不增加配置的情况下可使用token作为密码)的对称加密(客户端、服务端使用默认加密算法即可,支持配置更好了)方式连接,防止信息泄漏配置简单又可靠。大名鼎鼎的ss/ssr也是这种机制保证数据加密。
PS:tls协议其实就是通过证书传递密码,最后使用对称加密算法加密数据。

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 @dwxiayi on GitHub (Aug 26, 2022). Original GitHub issue: https://github.com/fatedier/frp/issues/3073 ### Describe the feature request frpc默认连接frps应该是使用明文发送token,存在抓包泄漏风险。 当然现在版本是支持tls证书连接方式的,但是证书的制作和携带不够方便。 是否可以考虑使用客户端、服务端配置相同密码(在不增加配置的情况下可使用token作为密码)的对称加密(客户端、服务端使用默认加密算法即可,支持配置更好了)方式连接,防止信息泄漏配置简单又可靠。大名鼎鼎的ss/ssr也是这种机制保证数据加密。 PS:tls协议其实就是通过证书传递密码,最后使用对称加密算法加密数据。 ### Describe alternatives you've considered _No response_ ### Affected area - [ ] Docs - [ ] Installation - [ ] Performance and Scalability - [X] Security - [ ] User Experience - [ ] Test and Release - [ ] Developer Infrastructure - [ ] Client Plugin - [ ] Server Plugin - [ ] Extensions - [ ] Others
gitea-mirror 2026-05-05 13:35:02 -06:00
Author
Owner

@dwxiayi commented on GitHub (Aug 26, 2022):

不是很懂go语言,没有抓包,盲目说是明文有点武断。

<!-- gh-comment-id:1228238985 --> @dwxiayi commented on GitHub (Aug 26, 2022): 不是很懂go语言,没有抓包,盲目说是明文有点武断。
Author
Owner

@fatedier commented on GitHub (Aug 26, 2022):

如果只需要加密直接配置 tls_enable = true 即可,会使用自动生成的证书。

<!-- gh-comment-id:1228336173 --> @fatedier commented on GitHub (Aug 26, 2022): 如果只需要加密直接配置 `tls_enable = true` 即可,会使用自动生成的证书。
Author
Owner

@dwxiayi commented on GitHub (Aug 26, 2022):

如果只需要加密直接配置 tls_enable = true 即可,会使用自动生成的证书。

这样应该是信任任意客户端证书的?有中间人攻击的风险。

<!-- gh-comment-id:1228349772 --> @dwxiayi commented on GitHub (Aug 26, 2022): > 如果只需要加密直接配置 `tls_enable = true` 即可,会使用自动生成的证书。 这样应该是信任任意客户端证书的?有中间人攻击的风险。
Author
Owner

@github-actions[bot] commented on GitHub (Sep 26, 2022):

Issues go stale after 30d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.

<!-- gh-comment-id:1257326378 --> @github-actions[bot] commented on GitHub (Sep 26, 2022): Issues go stale after 30d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.
Author
Owner

@shaoyaoqian commented on GitHub (Nov 16, 2022):

如果只需要加密直接配置 tls_enable = true 即可,会使用自动生成的证书。

这样应该是信任任意客户端证书的?有中间人攻击的风险。

我在学校使用frp为外网提供http服务,没有加密,学校发现了,叫我停掉。请问,如果我配置 tls_enable = true,还会被第三方发现吗?

<!-- gh-comment-id:1316416034 --> @shaoyaoqian commented on GitHub (Nov 16, 2022): > > 如果只需要加密直接配置 `tls_enable = true` 即可,会使用自动生成的证书。 > > 这样应该是信任任意客户端证书的?有中间人攻击的风险。 我在学校使用frp为外网提供http服务,没有加密,学校发现了,叫我停掉。请问,如果我配置 `tls_enable = true`,还会被第三方发现吗?
Author
Owner

@dwxiayi commented on GitHub (Nov 16, 2022):

需要看下你的frps再那个网络,如果frps也在校园网很容易被检测到。如果在外网应该可以启用客户端的use_encryption选项。
也可以使用更安全的stcp方式。
ps:frpc连接frps的协议应该已经被防火墙识别了,如果学校禁止使用这个东西也是无解的。可以启用tls试试,不过最好用自己生成的证书。

<!-- gh-comment-id:1316461700 --> @dwxiayi commented on GitHub (Nov 16, 2022): > 需要看下你的frps再那个网络,如果frps也在校园网很容易被检测到。如果在外网应该可以启用客户端的use_encryption选项。 也可以使用更安全的stcp方式。 ps:frpc连接frps的协议应该已经被防火墙识别了,如果学校禁止使用这个东西也是无解的。可以启用tls试试,不过最好用自己生成的证书。
Author
Owner

@dwxiayi commented on GitHub (Nov 16, 2022):

@shaoyaoqian

<!-- gh-comment-id:1316462002 --> @dwxiayi commented on GitHub (Nov 16, 2022): @shaoyaoqian
Author
Owner

@shaoyaoqian commented on GitHub (Nov 16, 2022):

frps在外网。之前是用http明文的。

<!-- gh-comment-id:1316524567 --> @shaoyaoqian commented on GitHub (Nov 16, 2022): frps在外网。之前是用http明文的。
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#2462
No description provided.