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:
https://developers.cloudflare.com/cloudflare-one/faq/cloudflare-tunnels-faq

My configs in my YAML file

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

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

https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/configuration/configuration-file/ingress (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”
ingress:

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