mirror of
https://github.com/outbackdingo/optimclaw.git
synced 2026-08-27 08:00:17 +00:00
fix: pre-validate Cloudflare tunnel token by spawning cloudflared (#446)
* fix: pre-validate Cloudflare tunnel token by spawning cloudflared After format validation passes, spawn `cloudflared tunnel run` briefly with a dummy URL and watch stderr for up to 10s. If an error appears before a connection URL, report it and offer "Save anyway?". This catches bad tokens during setup instead of at runtime 30s later. Closes #440 Co-Authored-By: Claude Opus 4.6 <[email protected]> * fix: tighten cloudflared output matching in live validation - Check for cfargotunnel.com/trycloudflare.com in success detection - Use starts_with("err") instead of contains("err") to avoid false positives on words like "stderr" Co-Authored-By: Claude Opus 4.6 <[email protected]> --------- Co-authored-by: Claude Opus 4.6 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
293a700b69
commit
bb279ad822
+1
-1
@@ -1502,7 +1502,7 @@ impl SetupWizard {
|
||||
/// Step 6: Channel configuration.
|
||||
async fn step_channels(&mut self) -> Result<(), SetupError> {
|
||||
// First, configure tunnel (shared across all channels that need webhooks)
|
||||
match setup_tunnel(&self.settings) {
|
||||
match setup_tunnel(&self.settings).await {
|
||||
Ok(tunnel_settings) => {
|
||||
self.settings.tunnel = tunnel_settings;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user