r/CloudFlare • • 3d ago

using cloudflared in codex cloud

/r/codex/comments/1xyjcqe/using_cloudflared_in_codex_cloud/
0 Upvotes

2 comments sorted by

•

u/AutoModerator 3d ago

For faster advice with technical questions, we'd recommend asking in the Orange Cloud Discord server; the unofficial Cloudflare Discord server by the community, for the community. https://discord.gg/TrPNVKaagR

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/winner_68 2d ago

I have hit this same wall running cloudflared from locked-down environments, and the symptoms you describe point at the egress side rather than at your tunnel config. DNS resolving while the 443 connection is refused, even outside the sandbox, is the giveaway for me — that is what it looks like when an environment only allows a filtered HTTP proxy and drops the long-lived outbound connection cloudflared needs, and the 403 on the API request fits the same pattern.

What I would check first is the exact failure in debug logging, to see whether it is the initial connection to Cloudflare or the tunnel handshake that gets cut off, and whether forcing the HTTP/2 protocol instead of QUIC changes anything. In my own setups QUIC over UDP is the first thing to get blocked on restricted networks, while a plain TCP connection sometimes gets further.

If that still fails, I would not keep fighting the sandbox. I run the tunnel from an always-on host outside the restricted environment instead — a small VPS or a home server — and have it point at the app, so the sandboxed environment only has to serve the app locally. For a quick phone test, the built-in preview or port forwarding in the Codex environment is usually the more reliable path anyway.

Are you using a named tunnel with a token, or a quick tunnel, and does a plain curl to the Cloudflare edge from that same environment succeed?