mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 08:05:49 -06:00
[GH-ISSUE #2953] [Feature Request] frpc和frps之间的wss支持不完整 #2356
Labels
No labels
In Progress
WIP
WaitingForInfo
bug
doc
duplicate
easy
enhancement
future
help wanted
invalid
lifecycle/stale
need-issue-template
need-usage-help
no plan
proposal
pull-request
question
todo
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/frp#2356
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @woOzZ2 on GitHub (May 27, 2022).
Original GitHub issue: https://github.com/fatedier/frp/issues/2953
Describe the feature request
由于有高层转发的需求,所以在frpc和frps的通信协议的选项我只能选择websocket
在使用webscoket作为frpc和frps之间的通信协议的时候,即便开启了
enable_tls = true,frpc发起websocket握手的时候也是http请求,并不是https。如下在关闭了tls也就是没有设置
enable_tls = true的时候,可以看到websocket握手后的通信内容即使我在frps.ini设置了
only_tls = true,握手过程也没有tls参与在使用tcp作为frpc和frps之间的协议的时候,如下图,是有完整的tls握手的,除了SNI外我们看不到任何的信息
所以我认为
1.frpc和frps之间的websoket协议并不完整支持tls2.enable_tls = true在websocket协议的情况下工作的不一样-------配置文件-----
---frps.ini---
[common]
bind_port = 7000
kcp_bind_port = 7000
tls_only = true
---frpc.ini---
[common]
server_addr = 127.0.0.1
server_port = 7000
protocol = websocket
tls_enable = true
[WSS_test]
type = tcp
local_ip = 127.0.0.1
local_port = 2345
remote_port = 7890
Describe alternatives you've considered
无
Affected area
@github-actions[bot] commented on GitHub (Jun 27, 2022):
Issues go stale after 30d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.
@aa51513 commented on GitHub (Jul 26, 2022):
为什么不直接用tcp+tls呢
@woOzZ2 commented on GitHub (Jul 26, 2022):
tcp + tls 没法过CDN,我们业务需要走CDN
@happytrudy commented on GitHub (Jul 9, 2025):
我也发现此问题 通过http建立wss通道 正常来说这种会有安全问题 中间人攻击 所以只能这样了
@aa51513 commented on GitHub (Jul 10, 2025):
This issue is quite clear. In summary:
frpcsupports acting as a WSS client, butfrpsdoes not support acting as a WSS server. Therefore, when using the WSS protocol, it is necessary to add a TLS intermediary layer (such as Nginx) as a reverse proxy in front offrps. Otherwise, the connection will fail.这个问题非常明显,总结而言就是:frpc支持作为wss客户端,但frps不支持作为wss服务端,所以在使用wss协议的时候,需要通过反向代理(例如nginx)在frps之前,添加tls的中间层,否则就会无法连接。