How filterrr/flclash works
FlClash is a cross-platform ClashMeta proxy client. The documented user workflow is to configure proxy or VPN use in the client, start it, and route traffic; Android’s sampled path exposes the app/plugin bridge, shared run state, and platform services. The repository tree does not include the Flutter application sources, so subscription management, WebDAV sync, and the UI are documented capabilities but their implementation paths and connections cannot be traced here. Core Go and helper-service internals are only partly sampled; the graph avoids inferring calls between them.
Main entry points: GlobalState.kt Shared run state · MainActivity.kt Android app host · VpnPlugin.kt VPN plugin · FlClashVpnService.kt VPN service
Components 21
Android runtime
- Android app host
android/app/src/main/kotlin/com/follow/clask/MainActivity.kt - Shared run state
android/app/src/main/kotlin/com/follow/clask/GlobalState.kt - App plugin
android/app/src/main/kotlin/com/follow/clask/plugins/AppPlugin.kt - Service plugin
android/app/src/main/kotlin/com/follow/clask/plugins/ServicePlugin.kt - VPN plugin
android/app/src/main/kotlin/com/follow/clask/plugins/VpnPlugin.kt - Tile plugin
android/app/src/main/kotlin/com/follow/clask/plugins/TilePlugin.kt - Update plugin
android/app/src/main/kotlin/com/follow/clask/plugins/UpdatePlugin.kt - VPN service
android/app/src/main/kotlin/com/follow/clask/services/FlClashVpnService.kt - Proxy service
android/app/src/main/kotlin/com/follow/clask/services/FlClashService.kt - Quick settings tile
android/app/src/main/kotlin/com/follow/clask/services/FlClashTileService.kt - Screen watcher
android/app/src/main/kotlin/com/follow/clask/services/ScreenStateWatcher.kt
Proxy engine
- Go client API
core/lib.go - Core hub
core/hub.go - Core server
core/server.go - Core state
core/state/state.go - Tunnel support
core/tun/tun.go
Desktop integration
- Helper HTTP service
services/helper/src/service/hub.rs - Helper process service
services/helper/src/service/windows.rs - Window integration
plugins/window_ext/macos/Classes/WindowExtPlugin.swift - Windows proxy plugin
plugins/proxy/windows/proxy_plugin.cpp
Other components
- Client user
Connections 19
- Client user → Android app host: opens client
- Android app host → App plugin: registers
android/app/src/main/kotlin/com/follow/clask/MainActivity.kt - Android app host → VPN plugin: registers
android/app/src/main/kotlin/com/follow/clask/MainActivity.kt - Android app host → Service plugin: registers
android/app/src/main/kotlin/com/follow/clask/MainActivity.kt - Android app host → Tile plugin: registers
android/app/src/main/kotlin/com/follow/clask/MainActivity.kt - Android app host → Update plugin: registers
android/app/src/main/kotlin/com/follow/clask/MainActivity.kt - Shared run state → App plugin: installs
android/app/src/main/kotlin/com/follow/clask/GlobalState.kt - Shared run state → VPN plugin: installs
android/app/src/main/kotlin/com/follow/clask/GlobalState.kt - Shared run state → Tile plugin: installs
android/app/src/main/kotlin/com/follow/clask/GlobalState.kt - Shared run state → Service plugin: installs
android/app/src/main/kotlin/com/follow/clask/GlobalState.kt - Service plugin → Shared run state: initializes engine
android/app/src/main/kotlin/com/follow/clask/plugins/ServicePlugin.kt - VPN plugin → VPN service: binds service
android/app/src/main/kotlin/com/follow/clask/plugins/VpnPlugin.kt - VPN plugin → Proxy service: binds service
android/app/src/main/kotlin/com/follow/clask/plugins/VpnPlugin.kt - VPN plugin → Shared run state: updates run state
android/app/src/main/kotlin/com/follow/clask/plugins/VpnPlugin.kt - VPN service → Shared run state: initializes engine
android/app/src/main/kotlin/com/follow/clask/services/FlClashVpnService.kt - VPN service → Screen watcher: uses watcher
android/app/src/main/kotlin/com/follow/clask/services/FlClashVpnService.kt - Proxy service → Screen watcher: uses watcher
android/app/src/main/kotlin/com/follow/clask/services/FlClashService.kt - Quick settings tile → Shared run state: toggles run
android/app/src/main/kotlin/com/follow/clask/services/FlClashTileService.kt - Helper HTTP service → Helper process service: starts and stops