[GH-ISSUE #5329] Proxy does not support websocket #10999

Open
opened 2026-08-05 01:28:04 -04:00 by saavagebueno · 0 comments
Owner

Originally created by @alexmoras on GitHub (Feb 14, 2026).
Original GitHub issue: https://github.com/netbirdio/netbird/issues/5329

Describe the problem

NetBird Proxy does not appear to support websockets. Proxy Events shows a 502 Gateway error whenever clients try and access a websocket resource.

To Reproduce

Steps to reproduce the behavior:

  1. Brand new install of v0.65.1 with option 0 for NetBird proxying.
  2. Setup reverse proxy of a resource that uses web sockets, such as Immich (as in this case).
  3. Review logs and see the 502 error.

Expected behavior

Websockets should proxy as normal.

Are you using NetBird Cloud?

Self-hosted

NetBird version

v0.65.1

Is any other VPN software installed?

No

Debug output

To help us resolve the problem, please attach the following anonymized status output

netbird status -dA

Create and upload a debug bundle, and share the returned file key:

netbird debug for 1m -AS -U

93c9438a5ab5ed9bf422337ffc625db9af9007965995907e9a6bbca4bd6fc73d/68ee2bb0-c2dc-40f4-bbb2-cfd63061e406

Uploaded files are automatically deleted after 30 days.

Alternatively, create the file only and attach it here manually:

netbird debug for 1m -AS

Screenshots

If applicable, add screenshots to help explain your problem.

Additional context

Log entries from netbird-proxy:

netbird-proxy  | 2026-02-14T22:35:09Z WARN proxy/internal/proxy/reverseproxy.go:297: proxy error: request_id=d68fh7878s30008mjuh0 client_ip=172.30.0.10 method=GET host=photos.domain.net path=/api/socket.io/ status=502 title="Connection Error" err=can't switch protocols using non-Hijacker ResponseWriter type *accesslog.statusWriter
netbird-proxy  | 2026-02-14T22:35:10Z WARN proxy/internal/proxy/reverseproxy.go:297: proxy error: request_id=d68fh7g78s30008mjuk0 client_ip=172.30.0.10 method=GET host=photos.domain.net path=/api/socket.io/ status=502 title="Connection Error" err=can't switch protocols using non-Hijacker ResponseWriter type *accesslog.statusWriter
netbird-proxy  | 2026-02-14T22:35:12Z WARN proxy/internal/proxy/reverseproxy.go:297: proxy error: request_id=d68fh8078s30008mjul0 client_ip=172.30.0.10 method=GET host=photos.domain.net path=/api/socket.io/ status=502 title="Connection Error" err=can't switch protocols using non-Hijacker ResponseWriter type *accesslog.statusWriter
netbird-proxy  | 2026-02-14T22:35:17Z WARN proxy/internal/proxy/reverseproxy.go:297: proxy error: request_id=d68fh9878s30008mjulg client_ip=172.30.0.10 method=GET host=photos.domain.net path=/api/socket.io/ status=502 title="Connection Error" err=can't switch protocols using non-Hijacker ResponseWriter type *accesslog.statusWriter
netbird-proxy  | 2026-02-14T22:35:22Z WARN proxy/internal/proxy/reverseproxy.go:297: proxy error: request_id=d68fhag78s30008mjum0 client_ip=172.30.0.10 method=GET host=photos.domain.net path=/api/socket.io/ status=502 title="Connection Error" err=can't switch protocols using non-Hijacker ResponseWriter type *accesslog.statusWriter
netbird-proxy  | 2026-02-14T22:35:27Z WARN proxy/internal/proxy/reverseproxy.go:297: proxy error: request_id=d68fhbo78s30008mjumg client_ip=172.30.0.10 method=GET host=photos.domain.net path=/api/socket.io/ status=502 title="Connection Error" err=can't switch protocols using non-Hijacker ResponseWriter type *accesslog.statusWriter
netbird-proxy  | 2026-02-14T22:35:32Z WARN proxy/internal/proxy/reverseproxy.go:297: proxy error: request_id=d68fhd078s30008mjun0 client_ip=172.30.0.10 method=GET host=photos.domain.net path=/api/socket.io/ status=502 title="Connection Error" err=can't switch protocols using non-Hijacker ResponseWriter type *accesslog.statusWriter
netbird-proxy  | 2026-02-14T22:35:38Z WARN proxy/internal/proxy/reverseproxy.go:297: proxy error: request_id=d68fheg78s30008mjung client_ip=172.30.0.10 method=GET host=photos.domain.net path=/api/socket.io/ status=502 title="Connection Error" err=can't switch protocols using non-Hijacker ResponseWriter type *accesslog.statusWriter
netbird-proxy  | 2026-02-14T22:35:43Z WARN proxy/internal/proxy/reverseproxy.go:297: proxy error: request_id=d68fhfo78s30008mjuo0 client_ip=172.30.0.10 method=GET host=photos.domain.net path=/api/socket.io/ status=502 title="Connection Error" err=can't switch protocols using non-Hijacker ResponseWriter type *accesslog.statusWriter

Have you tried these troubleshooting steps?

  • Reviewed client troubleshooting (if applicable)
  • Checked for newer NetBird versions
  • Searched for similar issues on GitHub (including closed ones)
  • Restarted the NetBird client
  • Disabled other VPN software
  • Checked firewall settings
Originally created by @alexmoras on GitHub (Feb 14, 2026). Original GitHub issue: https://github.com/netbirdio/netbird/issues/5329 **Describe the problem** NetBird Proxy does not appear to support websockets. Proxy Events shows a 502 Gateway error whenever clients try and access a websocket resource. **To Reproduce** Steps to reproduce the behavior: 1. Brand new install of v0.65.1 with option 0 for NetBird proxying. 2. Setup reverse proxy of a resource that uses web sockets, such as Immich (as in this case). 3. Review logs and see the 502 error. **Expected behavior** Websockets should proxy as normal. **Are you using NetBird Cloud?** Self-hosted **NetBird version** v0.65.1 **Is any other VPN software installed?** No **Debug output** To help us resolve the problem, please attach the following anonymized status output netbird status -dA Create and upload a debug bundle, and share the returned file key: netbird debug for 1m -AS -U 93c9438a5ab5ed9bf422337ffc625db9af9007965995907e9a6bbca4bd6fc73d/68ee2bb0-c2dc-40f4-bbb2-cfd63061e406 *Uploaded files are automatically deleted after 30 days.* Alternatively, create the file only and attach it here manually: netbird debug for 1m -AS **Screenshots** If applicable, add screenshots to help explain your problem. **Additional context** Log entries from `netbird-proxy`: ``` netbird-proxy | 2026-02-14T22:35:09Z WARN proxy/internal/proxy/reverseproxy.go:297: proxy error: request_id=d68fh7878s30008mjuh0 client_ip=172.30.0.10 method=GET host=photos.domain.net path=/api/socket.io/ status=502 title="Connection Error" err=can't switch protocols using non-Hijacker ResponseWriter type *accesslog.statusWriter netbird-proxy | 2026-02-14T22:35:10Z WARN proxy/internal/proxy/reverseproxy.go:297: proxy error: request_id=d68fh7g78s30008mjuk0 client_ip=172.30.0.10 method=GET host=photos.domain.net path=/api/socket.io/ status=502 title="Connection Error" err=can't switch protocols using non-Hijacker ResponseWriter type *accesslog.statusWriter netbird-proxy | 2026-02-14T22:35:12Z WARN proxy/internal/proxy/reverseproxy.go:297: proxy error: request_id=d68fh8078s30008mjul0 client_ip=172.30.0.10 method=GET host=photos.domain.net path=/api/socket.io/ status=502 title="Connection Error" err=can't switch protocols using non-Hijacker ResponseWriter type *accesslog.statusWriter netbird-proxy | 2026-02-14T22:35:17Z WARN proxy/internal/proxy/reverseproxy.go:297: proxy error: request_id=d68fh9878s30008mjulg client_ip=172.30.0.10 method=GET host=photos.domain.net path=/api/socket.io/ status=502 title="Connection Error" err=can't switch protocols using non-Hijacker ResponseWriter type *accesslog.statusWriter netbird-proxy | 2026-02-14T22:35:22Z WARN proxy/internal/proxy/reverseproxy.go:297: proxy error: request_id=d68fhag78s30008mjum0 client_ip=172.30.0.10 method=GET host=photos.domain.net path=/api/socket.io/ status=502 title="Connection Error" err=can't switch protocols using non-Hijacker ResponseWriter type *accesslog.statusWriter netbird-proxy | 2026-02-14T22:35:27Z WARN proxy/internal/proxy/reverseproxy.go:297: proxy error: request_id=d68fhbo78s30008mjumg client_ip=172.30.0.10 method=GET host=photos.domain.net path=/api/socket.io/ status=502 title="Connection Error" err=can't switch protocols using non-Hijacker ResponseWriter type *accesslog.statusWriter netbird-proxy | 2026-02-14T22:35:32Z WARN proxy/internal/proxy/reverseproxy.go:297: proxy error: request_id=d68fhd078s30008mjun0 client_ip=172.30.0.10 method=GET host=photos.domain.net path=/api/socket.io/ status=502 title="Connection Error" err=can't switch protocols using non-Hijacker ResponseWriter type *accesslog.statusWriter netbird-proxy | 2026-02-14T22:35:38Z WARN proxy/internal/proxy/reverseproxy.go:297: proxy error: request_id=d68fheg78s30008mjung client_ip=172.30.0.10 method=GET host=photos.domain.net path=/api/socket.io/ status=502 title="Connection Error" err=can't switch protocols using non-Hijacker ResponseWriter type *accesslog.statusWriter netbird-proxy | 2026-02-14T22:35:43Z WARN proxy/internal/proxy/reverseproxy.go:297: proxy error: request_id=d68fhfo78s30008mjuo0 client_ip=172.30.0.10 method=GET host=photos.domain.net path=/api/socket.io/ status=502 title="Connection Error" err=can't switch protocols using non-Hijacker ResponseWriter type *accesslog.statusWriter ``` **Have you tried these troubleshooting steps?** - [x] Reviewed [client troubleshooting](https://docs.netbird.io/how-to/troubleshooting-client) (if applicable) - [x] Checked for newer NetBird versions - [x] Searched for similar issues on GitHub (including closed ones) - [x] Restarted the NetBird client - [x] Disabled other VPN software - [x] Checked firewall settings
saavagebueno added the triage-needed label 2026-08-05 01:28:04 -04:00
Sign in to join this conversation.
No Label triage-needed
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#10999