-
Notifications
You must be signed in to change notification settings - Fork 164
Fix Tailscale Integration and Add Complete iOS Support #542
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Fix Tailscale Integration and Add Complete iOS Support #542
Conversation
- Fix server binding to allow network access (not forced to localhost) - Fix exit code 0 being incorrectly treated as error - Fix toggle auto-disabling after 10 seconds - Add clear fallback mode messaging for users
- Update to new Tailscale CLI syntax (--bg flag) - Add WebSocket authentication for Tailscale users - Implement smooth mode detection and status reporting - Fix race conditions during mode transitions
The funnel command was incorrectly using 'tailscale funnel --bg 443' which overrode the proxy destination to http://127.0.0.1:443 instead of keeping it pointed at http://localhost:4020. Fixed by using: tailscale funnel --bg --https=443 http://localhost:4020 This ensures Funnel preserves the correct proxy target when enabling public access mode.
- Add TailscaleURLHelper with IP validation and fallback mechanisms - Support multiple Tailscale binary locations - Implement URL construction for private vs public Funnel modes - Add auto-start monitoring in TailscaleServeStatusService
- Show https:// prefix for public Funnel URLs in menu bar - Display both Public and Private URLs when Funnel enabled - Add status indicators (Public/Private/Error/Starting) - Fix TailscaleServeStatusService environment integration
- Implement OAuth-based authentication with Tailscale API - Add automatic server discovery on tailnet - Create comprehensive Tailscale settings UI - Add three key switches: Auto-Discover, Prefer Tailscale, Auto-Refresh - Implement HTTPS to HTTP fallback for mode transitions - Add visual lock/unlock indicators for connection security - Create detailed integration guide at ios/docs/tailscale-guide.md
- Add notification when Tailscale credentials are cleared - Update ServerListView to observe credential clear notification - Force UI refresh in TailscaleSettingsView after reset - Ensure discovered servers disappear from home screen after reset - Fix device count to clear when configuration is reset
- Fix Tailscale settings navigation to open correct tab when accessed from Tailscale buttons - Fix Tailscale reset to properly remove saved servers from UI - Remove excessive debug logging throughout the app - Fix all critical linting warnings (force unwrapping, data conversion) - Update tests to match new TailscaleServer API with httpsUrl and isPublic parameters - Clean up notification handling for credential clearing All tests pass (305/326 passed, 21 skipped)
|
@steipete I did quite a bunch of work on Tailscale on the server and iOS app. First, I fixed the regression in release 15. The server app supports public internet and private Tailnet support. Funnel was added to public internet support, and also includes SSL for secure connections if enabled. The iOS app supports creating an OAuth connection to Tailscale and discovering and adding Vibetunnel servers. I didn't touch the web app, but in the future it may benefit from the changes on the iOS version. There seems to be a bug in Bonjour discovery in the iOS app, but that's not the work I intended here. Anyhow, I'm stopping here until I see a response. I get it and know you are futzing around with that Twitter app trying to ship, but it would be nice for you to review when you get the oppurtunity. I'm going to try and ship a few things myself. |
- Fix Tailscale server not being saved when Add button tapped in Settings - Correct storage key from "serverProfiles" to "savedServerProfiles" - Add automatic settings dismissal after adding Tailscale server - Refresh profiles on settings dismissal to show newly added servers - Remove debug logging added during troubleshooting - Fix SwiftLint for-where violation in TailscaleURLHelper - Fix force unwrapping violation in IP validation logic 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Fix Tailscale Integration and Add Complete iOS Support
Summary
This PR comprehensively fixes Tailscale integration issues introduced in Release 15 and adds full Tailscale support to the iOS companion app, enabling secure remote access to VibeTunnel servers from mobile devices.
Changes Overview
🐛 Bug Fixes (macOS)
Release 15 Regression Fix
Tailscale CLI Compatibility
--bg(background) flag syntaxhttp://localhost:4020)/Applications,/opt/homebrew,/usr/local)tailscale ipcommand gracefullyURL Display and Status Handling
TailscaleServeStatusServiceto environment(Public/Private/Error/Starting)✨ New Features
Complete iOS Tailscale Integration
Public/Private Mode Support (macOS & iOS)
🔧 Technical Improvements
Code Quality
Security
.gitignoreto prevent accidental commits📚 Documentation
ios/docs/tailscale-guide.mdTesting
Test Coverage
TailscaleFallbackRegressionTests.swiftfor regression preventiontailscale-regression.test.tsfor server-side validationtailscale-serve-service.test.tsfor service testingtailscale-regression.spec.tsManual Testing Performed
Migration Guide
For users upgrading from Release 15:
Breaking Changes
None. This PR maintains full backward compatibility while fixing existing issues.
Screenshots
Note: The iOS app now shows visual indicators for connection security (lock icons) and properly opens Settings to the Tailscale tab when accessing from Tailscale-related buttons.
Related Issues
Fixes the Tailscale regression introduced in Release 15 where direct Tailscale access was broken.
Co-authored-by: Claude noreply@anthropic.com