mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 16:15:49 -06:00
[GH-ISSUE #2195] ws和http #1750
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#1750
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 @jlikeme on GitHub (Jan 17, 2021).
Original GitHub issue: https://github.com/fatedier/frp/issues/2195
webserver的http端口和ws端口都使用的是80端口,frpc仅配置了http协议,这种方式是不是无法正常穿透ws服务?
The solution you want
有何方式能同时实现http和ws吗?
如果是修改ws端口,再做ws的tcp穿透,这样的话每部署一次webserver就要修改一次ws端口了哇。
Alternatives considered
How to implement this function
Application scenarios of this function
@fatedier commented on GitHub (Jan 17, 2021):
ws 基于 HTTP,使用 HTTP 类型配置即可。
@jlikeme commented on GitHub (Jan 17, 2021):
http端口和ws端口相同的话,frpc只需要设置一个http类型就行了吗?
这样ws就可以正常穿透了吗?请问还有没有其他需要注意的?
@jlikeme commented on GitHub (Jan 18, 2021):
在原有http端口上实现ws的情况下,发起ws请求时,原有的http Transport设置了DisableKeepAlives=true,因此在frps转发请求时发送的request请求会包含Connection: close头信息,导致ws服务会出现无法正常响应的问题。
可以在reverseproxy.go:L279设置DisableKeepAlives=false
@github-actions[bot] commented on GitHub (Mar 5, 2021):
Issues go stale after 45d of inactivity. Stale issues rot after an additional 10d of inactivity and eventually close.