Tunnel with websockets

Hi I am new to using Cloudflare tunnels.

When I try running this command

cloudflared tunnel --config /Users/jamese/Projects/gc-balance-check/configs/Cloudflare/4khkfmvz0cw.yml run 4khkfmvz0cw
I get an error “Error validating origin URL: Currently Cloudflare Tunnel does not support ws protocol.”

However based on Cloudflare FAQ they fully support websockets:

My configs in my YAML file

url: “ws://”
tunnel: “4khkfmvz0cw”
credentials-file: “/Users/jamese/.cloudflared/d84d514a-78f8-4eb1-bddd-68552ef75f08.json”

What if you replace “url” with an “ingress” definition instead?

Ingress rules · Cloudflare Zero Trust docs (Edit: Noticed that Websocket isn’t mentioned among supported services on that page. Maybe it’s specified as HTTPS or TCP? :confused: )

Also, what does cloudflared version say?

cloudflared version 2021.10.3 (built 2021-10-15-0900 UTC)

I will try with the ingress rule and report back.

@svanlund Thanks for the tip with ingress. I was able to get it working.
What I was trying to achieve was to expose a puppeteer instance publicly. After messing around with some of the local proxy server settings in combination with the ingress rules I manage to get it to work with websockets.

Here are my configs for the ingress rule
tunnel: “4khkfmvz0cw”
credentials-file: “/Users/jamese/.cloudflared/d84d514a-78f8-4eb1-bddd-68552ef75f08.json”

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.