[GH-ISSUE #5291] WebSocket Support #4081

Open
opened 2026-05-05 14:35:04 -06:00 by gitea-mirror · 1 comment
Owner

Originally created by @bonzius on GitHub (Apr 21, 2026).
Original GitHub issue: https://github.com/fatedier/frp/issues/5291

Describe the feature request

I have an application that uses WebSocket. It works properly if I use type = "tcp". But in this case I can't use HTTPMultiplexing on Port 80. If I use type = "http" WebSocket is not supported.
Is there a work around to use HTTPMultiplexing on Port 80 + WebSocket?
Regards, Michael.

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 @bonzius on GitHub (Apr 21, 2026). Original GitHub issue: https://github.com/fatedier/frp/issues/5291 ### Describe the feature request I have an application that uses WebSocket. It works properly if I use type = "tcp". But in this case I can't use HTTPMultiplexing on Port 80. If I use type = "http" WebSocket is not supported. Is there a work around to use HTTPMultiplexing on Port 80 + WebSocket? Regards, Michael. ### Describe alternatives you've considered _No response_ ### Affected area - [ ] Docs - [ ] Installation - [ ] Performance and Scalability - [ ] Security - [ ] User Experience - [ ] Test and Release - [ ] Developer Infrastructure - [x] Client Plugin - [x] Server Plugin - [ ] Extensions - [ ] Others
Author
Owner

@fatedier commented on GitHub (Apr 23, 2026):

type = "http" in frp does support WebSocket. It's implemented via Go's httputil.ReverseProxy (see pkg/util/vhost/http.go), which passes Connection: Upgrade requests through transparently, and there is an e2e test that covers exactly this scenario: test/e2e/v1/basic/http.go (a WebSocket echo server behind a type = "http" proxy, using customDomains).

So HTTP multiplexing on port 80 + WebSocket should work together. If it isn't working for you, please share:

  • frp version (both frps and frpc)
  • Your full frpc config for the proxy
  • The frps vhostHTTPPort / bindPort settings
  • The client request (URL, any custom headers) and the exact error you're getting
  • Logs from frps and frpc with debug level

Most likely causes from past reports:

  1. Client is connecting to bindPort (e.g. 7000) instead of vhostHTTPPort.
  2. Host header doesn't match customDomains / subdomain on the proxy.
  3. A reverse proxy in front of frps is stripping Upgrade / Connection headers.
  4. You're using wss:// but haven't terminated TLS (frps HTTP vhost is plaintext; use vhostHTTPSPort for TLS).
<!-- gh-comment-id:4301396457 --> @fatedier commented on GitHub (Apr 23, 2026): `type = "http"` in frp **does** support WebSocket. It's implemented via Go's `httputil.ReverseProxy` (see `pkg/util/vhost/http.go`), which passes `Connection: Upgrade` requests through transparently, and there is an e2e test that covers exactly this scenario: `test/e2e/v1/basic/http.go` (a WebSocket echo server behind a `type = "http"` proxy, using `customDomains`). So HTTP multiplexing on port 80 + WebSocket should work together. If it isn't working for you, please share: - frp version (both frps and frpc) - Your full frpc config for the proxy - The frps `vhostHTTPPort` / `bindPort` settings - The client request (URL, any custom headers) and the exact error you're getting - Logs from frps and frpc with debug level Most likely causes from past reports: 1. Client is connecting to `bindPort` (e.g. 7000) instead of `vhostHTTPPort`. 2. `Host` header doesn't match `customDomains` / `subdomain` on the proxy. 3. A reverse proxy in front of frps is stripping `Upgrade` / `Connection` headers. 4. You're using `wss://` but haven't terminated TLS (frps HTTP vhost is plaintext; use `vhostHTTPSPort` for TLS).
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#4081
No description provided.