mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 08:05:49 -06:00
[GH-ISSUE #2119] wss support #1684
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#1684
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 @fredericmalo on GitHub (Nov 28, 2020).
Original GitHub issue: https://github.com/fatedier/frp/issues/2119
Originally assigned to: @yuyulei on GitHub.
The solution you want
Hello, as I don't understand chinese, could someone explain the status of this pull request ? It seems that it solves my issue
https://github.com/fatedier/frp/pull/1919
As Caddy Server provides wss support out-of-the-box (I didn't need any configuration on this), I would need ro reverse proxy https + wss with FRP. For now, wss are in 'pending' mode in Chrome.
Alternatives considered
I don't think there is any alternative, but please explain how to configure rpc for this !
Thanks !
@fatedier commented on GitHub (Nov 30, 2020):
It won't be supported since the protocol is between frpc and frps.
What's your usage scenario?
@fredericmalo commented on GitHub (Nov 30, 2020):
Dear,
I was using Caddy server to handle http/https requests, but it exposes the public IP of my home router. I would like to hide my public IP by tunneling thanks to FRP.
I would like to expose a Node-Red instance through FRP, but the wss flow stays in "pending" status.
As explained here, node-red needs wss://domain.ltd/comms to push real-time debug messages to the webinterface:
As wss is quiet popular protocol now, I guess it would interest lots of FRP users :)
It works out-of-the-box with Caddyfile with this config:
Do you need more clarification from my side ?
Thanks, best !
@fatedier commented on GitHub (Dec 1, 2020):
You can find more solutions from these documents:
https://github.com/fatedier/frp#visit-your-web-service-in-lan-by-custom-domains
https://github.com/fatedier/frp#enable-https-for-local-http-service
Or just use
TCPtype https://github.com/fatedier/frp#access-your-computer-in-lan-by-ssh@fewkso commented on GitHub (Dec 1, 2020):
Hi @fatedier, our frps is behind a https load balancer which forces http to https, so we can't use insecure websocket connection. The proposed change is simple and it works (could it be refined?, maybe, I don't know), but it would be super useful to have the feature out of the box instead of having to merge the code ourself.
@fatedier commented on GitHub (Dec 1, 2020):
@fewkso You problem isn't same here.
It's not the protocol we want to support between frpc and frps. It will limit the future design for frp's self protocol.
You can try to combine frps with other tunnel projects which can tunnel TCP on other protocols like websocket or UDP.
@fredericmalo commented on GitHub (Dec 8, 2020):
Hello, I digg into this issue and found that websocket are working properly in http mode:
but when I switch to https, the websocket protocol switch from ws://nodered.mydomain.com/comms to wss://nodered.mydomain.com/comms
and status is endless 'pending' as described at the beginning of this ticket.
Do you have any idea how to proxy wss protocol thanks to FRP ?
Thanks ! all the best !
@dong-zeyu commented on GitHub (Jan 9, 2021):
I encounter the same problem when using
https2httpplugin, when the backend is not nginx. I think it might because the backend does not provide as much information as nginx to the frp for it's normally functioning. As suggested by #2125, you could use nginx as an intermediate server to do the http to https convert, likebackend <---http---> nginx <---https---> frp.@yuyulei commented on GitHub (Jan 21, 2021):
a websocket bug fixed by #2199 , now you can try new release v0.35.0
wss will be supported later.
@dong-zeyu commented on GitHub (Jan 21, 2021):
I test it in the lastest dev branch and it seems that the problem persists.
I created a test case to reproduce this issue. It seems that it's a different issue from the KeepAlive one, because in the test case, all the requests is simulated in the tcp layer.
In another shell
Some explanation can be seen in
wss_test.py.@yuyulei commented on GitHub (Feb 3, 2021):
@fredericmalo https proxy can support wss. Give a frpc.ini demo if the server can accept https request:
And make sure that request Host same to OriginHost.
@yuyulei commented on GitHub (Feb 5, 2021):
@dizzam there is some problem in http(s) plugin to support ws(s). Can you use http(s) proxy directly ?