cloudflare / cloudflare/cloudflared
💡General `Upgrade` header support
- Dominant language
- Go
- Stars
- 15.6k
- Forks
- 1.4k
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the feature you'd like**
I attempted to serve my [Headscale](https://github.com/juanfont/headscale) and [Tailscale DERP Servers](https://tailscale.com/kb/1232/derp-servers/) behind Cloudflare Tunnels, but unfortunately, they are not functioning as expected. The main issue stems from their usage of the `Upgrade` header, similar to the WebSocket protocol. However, unlike the standard `Upgrade: websocket` value, they employ custom values such as `Upgrade: tailscale-control-protocol` and `Upgrade: derp`.
Currently `cloudflared` is limited to handling only the standard `Upgrade: websocket` value. I'm curious if there would be any consequences of not detecting the value of the `Upgrade` header. As far as I know [`net/http/httputil.ReverseProxy`](https://pkg.go.dev/net/http/httputil#ReverseProxy) doesn't detect these values, and everything seems to work fine. In fact, Cloudflare Proxy didn't detect them either.
**Describe alternatives you've considered**
Currently I'm using Cloudflare Proxy and things are working fine. But I still prefer to use Cloudflare Tunnel to serve my services.
**Additional context**
N/A
Contributor guide
Assessment
This issue has not been assessed yet.