cloudflared_tunnel 1.0.1
cloudflared_tunnel: ^1.0.1 copied to clipboard
Flutter plugin for Cloudflare Tunnel (cloudflared). Create secure tunnels to expose local servers to the internet via Cloudflare's global network. Includes optional built-in HTTP file server.
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
1.0.0 - 2024-01-19 #
Added #
- Initial release of cloudflared_tunnel Flutter plugin
- Cloudflare Tunnel support with token-based authentication
- Built-in Go HTTP file server with request logging
- Android foreground service for background operation (Termux-like behavior)
- Tunnel survives app closure and notification dismissal
- Real-time tunnel state streaming (connecting, connected, disconnected, error)
- Real-time server state streaming
- Request log streaming for the built-in HTTP server
- Directory listing API
- Notification permission handling for Android 13+
- ProGuard rules for release builds
- Shelf server example (Dart-based HTTP server)
Features #
-
Tunnel Management
startTunnel()- Start tunnel with Cloudflare tokenstopTunnel()- Stop the running tunnelgetTunnelState()- Get current tunnel stateisTunnelRunning()- Check if tunnel is runningvalidateToken()- Validate tunnel token without starting
-
Built-in Server (Optional)
startServer()- Start local HTTP file serverstopServer()- Stop the servergetServerState()- Get server stategetServerUrl()- Get the server URLgetRequestLogs()- Get stored request logsclearRequestLogs()- Clear request logslistDirectory()- List directory contents
-
Service Management
isServiceRunning()- Check if background service is runningstopService()- Stop the background service completelyrequestNotificationPermission()- Request notification permission (Android 13+)hasNotificationPermission()- Check notification permission
-
Convenience Methods
startAll()- Start both server and tunnelstopAll()- Stop both tunnel and server
Platforms #
- Android (API 21+) - Full support with foreground service
- iOS - Coming soon
Notes #
- The AAR is pre-built and included in the package
- No need to build Go code or run gomobile
- Works with both Go server and Dart-based servers (like Shelf)