From ff03b30c021dd8551ebefebddeec6e1590d39952 Mon Sep 17 00:00:00 2001 From: ssbg04 Date: Sun, 23 Aug 2026 23:37:55 +0800 Subject: [PATCH] fix: force cloudflared to use http2 to resolve UDP/QUIC connectivity issues --- backend/src/services/tunnelService.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/src/services/tunnelService.js b/backend/src/services/tunnelService.js index dde6fcf..3b8c2b5 100644 --- a/backend/src/services/tunnelService.js +++ b/backend/src/services/tunnelService.js @@ -131,10 +131,10 @@ async function startTunnel() { const port = process.env.PORT || 18484; const args = token - ? ['tunnel', 'run', '--token', token] - : ['tunnel', '--url', `http://localhost:${port}`]; + ? ['tunnel', '--protocol', 'http2', 'run', '--token', token] + : ['tunnel', '--protocol', 'http2', '--url', `http://localhost:${port}`]; - console.log(`[Tunnel] Launching Cloudflare tunnel: "${binPath}" ${token ? 'tunnel run --token [CONFIGURED]' : args.join(' ')}`); + console.log(`[Tunnel] Launching Cloudflare tunnel: "${binPath}" ${token ? 'tunnel --protocol http2 run --token [CONFIGURED]' : args.join(' ')}`); tunnelState = 'starting'; try {