[GH-ISSUE #3525] websocket ws:// 404 #2812

Closed
opened 2026-05-05 13:49:08 -06:00 by gitea-mirror · 1 comment
Owner

Originally created by @fenglilinglegeluan on GitHub (Jul 11, 2023).
Original GitHub issue: https://github.com/fatedier/frp/issues/3525

Bug Description

错误:

GET  ws://dwdq0nv4.mirror.xxx.asia/ws/37ca3324-fa33-486a-a25d-c9d81ac5da3e/live
状态 404Not Found
版本 HTTP/1.1
传输 210 字节(大小 0 字节)

背景:
我使用了一个手机投屏的软件(软件作者地址:【https://github.com/tuuzed/MirrorApp】),可以把手机画面投屏到web。
但是使用frp内网穿透的版本,出现了ws连接404的问题。
尝试解决:
1、我手动将投屏的端口通过frp的http穿透到服务器时,功能是正常的。但是通过软件随机生成子域名穿透到服务器时,我可以访问到web界面,但是没有投屏的画面,F12查看发现提示404 Not Found。
2、猜测是nginx的配置有设置错误的地方,尝试修改无果,困扰了一天。

frpc Version

0.30.0

frps Version

0.30.0

System Architecture

linux/amd64

Configurations

nginx:

map $http_upgrade $connection_upgrade{
        default upgrade;
        '' close;
}
server {
        location / {
                proxy_pass http://127.0.0.1:8080;
                proxy_set_header Host $host;
        }
        location /ws {
                proxy_pass http://127.0.0.1:8080;
                proxy_set_header Host $host;
}}

frps:

[common]
bind_port = 7000
dashboard_addr = 0.0.0.0
dashboard_port = 7500
token = 123456
vhost_http_port =  8080
vhost_https_port = 8443
subdomain_host=mirror.xxx.asia

Logs

GET ws://dwdq0nv4.mirror.xxx.asia/ws/37ca3324-fa33-486a-a25d-c9d81ac5da3e/live
状态 404Not Found
版本 HTTP/1.1
传输 210 字节(大小 0 字节)

Steps to reproduce

  1. 安装投屏软件,设置代理服务器,填写域名,端口,token。
  2. 域名解析添加
  3. 运行软件,firefox浏览器输入软件返回的内网穿透的地址查看投屏状态。

Affected area

  • Docs
  • Installation
  • Performance and Scalability
  • Security
  • User Experience
  • Test and Release
  • Developer Infrastructure
  • Client Plugin
  • Server Plugin
  • Extensions
  • Others
Originally created by @fenglilinglegeluan on GitHub (Jul 11, 2023). Original GitHub issue: https://github.com/fatedier/frp/issues/3525 ### Bug Description 错误: ``` GET ws://dwdq0nv4.mirror.xxx.asia/ws/37ca3324-fa33-486a-a25d-c9d81ac5da3e/live 状态 404Not Found 版本 HTTP/1.1 传输 210 字节(大小 0 字节) ``` 背景: 我使用了一个手机投屏的软件(软件作者地址:【https:\/\/github.com/tuuzed/MirrorApp】),可以把手机画面投屏到web。 但是使用frp内网穿透的版本,出现了ws连接404的问题。 尝试解决: 1、我手动将投屏的端口通过frp的http穿透到服务器时,功能是正常的。但是通过软件随机生成子域名穿透到服务器时,我可以访问到web界面,但是没有投屏的画面,F12查看发现提示404 Not Found。 2、猜测是nginx的配置有设置错误的地方,尝试修改无果,困扰了一天。 ### frpc Version 0.30.0 ### frps Version 0.30.0 ### System Architecture linux/amd64 ### Configurations nginx: ``` map $http_upgrade $connection_upgrade{ default upgrade; '' close; } server { location / { proxy_pass http://127.0.0.1:8080; proxy_set_header Host $host; } location /ws { proxy_pass http://127.0.0.1:8080; proxy_set_header Host $host; }} ``` frps: ``` [common] bind_port = 7000 dashboard_addr = 0.0.0.0 dashboard_port = 7500 token = 123456 vhost_http_port = 8080 vhost_https_port = 8443 subdomain_host=mirror.xxx.asia ``` ### Logs GET ws://dwdq0nv4.mirror.xxx.asia/ws/37ca3324-fa33-486a-a25d-c9d81ac5da3e/live 状态 404Not Found 版本 HTTP/1.1 传输 210 字节(大小 0 字节) ### Steps to reproduce 1. 安装投屏软件,设置代理服务器,填写域名,端口,token。 2. 域名解析添加 3. 运行软件,firefox浏览器输入软件返回的内网穿透的地址查看投屏状态。 ### Affected area - [ ] Docs - [ ] Installation - [ ] Performance and Scalability - [ ] Security - [ ] User Experience - [ ] Test and Release - [ ] Developer Infrastructure - [ ] Client Plugin - [ ] Server Plugin - [ ] Extensions - [X] Others
gitea-mirror 2026-05-05 13:49:08 -06:00
Author
Owner

@github-actions[bot] commented on GitHub (Aug 11, 2023):

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

<!-- gh-comment-id:1674087406 --> @github-actions[bot] commented on GitHub (Aug 11, 2023): Issues go stale after 30d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.
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#2812
No description provided.