How amiercassanova-21/apk-cassanova-tunnel works
Amier VPN is an Android tunneling client built around Xray-based proxy profiles, with added SSH/SlowDNS tunnels and a separate Wi-Fi tethering feature. The main user journey is to import or configure a profile, select it, start a connection, and route traffic through the Android VPN or proxy service. The graph preserves subscription, routing, diagnostics, and tethering branches. Some links are dashed where the supplied excerpts and README do not establish the runtime caller; unsampled implementations are not treated as inspected.
Main entry points: CoreServiceManager.kt Core service manager · MainActivity.kt Main screen · TetherVpnService.kt Tether VPN · MmkvManager.kt Profile settings store
Components 26
Profiles and setup
- Profile editors
V2rayNG/app/src/main/java/com/v2ray/ang/ui/server - Profile formats
V2rayNG/app/src/main/java/com/v2ray/ang/fmt - Profile model
V2rayNG/app/src/main/java/com/v2ray/ang/dto/entities/ProfileItem.kt - Subscriptions
V2rayNG/app/src/main/java/com/v2ray/ang/handler/SubscriptionUpdater.kt - Profile settings store
V2rayNG/app/src/main/java/com/v2ray/ang/handler/MmkvManager.kt - Routing editor
V2rayNG/app/src/main/java/com/v2ray/ang/ui/routing/RoutingSettingActivity.kt - Routing settings
V2rayNG/app/src/main/java/com/v2ray/ang/handler/SettingsManager.kt
Connection runtime
- Core config builder
V2rayNG/app/src/main/java/com/v2ray/ang/core/CoreConfigManager.kt - Core service manager
V2rayNG/app/src/main/java/com/v2ray/ang/core/CoreServiceManager.kt - VPN service
V2rayNG/app/src/main/java/com/v2ray/ang/service/CoreVpnService.kt - Root proxy mode
V2rayNG/app/src/main/java/com/v2ray/ang/root/RootProxyManager.kt - SSH tunnel manager
V2rayNG/app/src/main/java/com/v2ray/ang/core/ssh/SshTunnelManager.kt - SSH tunnel engines
V2rayNG/app/src/main/java/com/v2ray/ang/core/ssh/SshTunnel.kt - Browser dialer
V2rayNG/app/src/main/java/com/v2ray/ang/service/DialerNativeService.kt
Network features
- Tether controls
V2rayNG/tether/src/main/java/com/amier/tether/MainActivity.kt - Tether VPN
V2rayNG/tether/src/main/java/com/amier/tether/TetherVpnService.kt - Proxy discovery
V2rayNG/tether/src/main/java/com/amier/tether/ProxyFinder.kt - Transparent proxy
V2rayNG/tether/src/main/java/com/v2ray/ang/service/TProxyService.kt - Connection diagnostics
V2rayNG/app/src/main/java/com/v2ray/ang/handler/SpeedtestManager.kt
App experience
- Main screen
V2rayNG/app/src/main/java/com/v2ray/ang/ui/main/MainActivity.kt - Traffic and status
V2rayNG/app/src/main/java/com/v2ray/ang/handler/TrafficTracker.kt - Notifications
V2rayNG/app/src/main/java/com/v2ray/ang/handler/NotificationManager.kt
Other components
- User
- Xray core
- Android VPN
- Wi-Fi network
Connections 28
- User → Main screen: opens
- Main screen → Profile editors: configures
- Profile editors → Profile formats: encodes profiles
- Profile formats → Profile model: produces
- Subscriptions → Profile settings store: updates profiles
- Profile model → Profile settings store: persists as
V2rayNG/app/src/main/java/com/v2ray/ang/handler/MmkvManager.kt - Routing editor → Routing settings: edits rules
V2rayNG/app/src/main/java/com/v2ray/ang/ui/routing/RoutingSettingActivity.kt - Main screen → Core service manager: starts connection
- Core service manager → Core config builder: builds config
V2rayNG/app/src/main/java/com/v2ray/ang/core/CoreServiceManager.kt - Core service manager → SSH tunnel manager: starts tunnel
V2rayNG/app/src/main/java/com/v2ray/ang/core/CoreServiceManager.kt - Core service manager → Profile settings store: reads settings
V2rayNG/app/src/main/java/com/v2ray/ang/core/CoreServiceManager.kt - SSH tunnel manager → Profile model: reads profile
V2rayNG/app/src/main/java/com/v2ray/ang/core/ssh/SshTunnelManager.kt - SSH tunnel manager → SSH tunnel engines: starts engine
V2rayNG/app/src/main/java/com/v2ray/ang/core/ssh/SshTunnelManager.kt - VPN service → Core service manager: delegates lifecycle
V2rayNG/app/src/main/java/com/v2ray/ang/service/CoreVpnService.kt - VPN service → Android VPN: establishes tunnel
- Core service manager → Xray core: controls core
- Root proxy mode → Profile settings store: reads settings
V2rayNG/app/src/main/java/com/v2ray/ang/root/RootProxyManager.kt - Main screen → Subscriptions: manages subscriptions
- Main screen → Routing editor: opens routing
- Core service manager → Notifications: updates status
V2rayNG/app/src/main/java/com/v2ray/ang/core/CoreServiceManager.kt - Notifications → Traffic and status: reads traffic
V2rayNG/app/src/main/java/com/v2ray/ang/handler/NotificationManager.kt - Main screen → Connection diagnostics: runs tests
- User → Tether controls: starts tethering
- Tether controls → Tether VPN: controls service
V2rayNG/tether/src/main/java/com/amier/tether/MainActivity.kt - Tether VPN → Proxy discovery: finds proxy
V2rayNG/tether/src/main/java/com/amier/tether/MainActivity.kt - Tether VPN → Transparent proxy: reads proxy stats
V2rayNG/tether/src/main/java/com/amier/tether/TetherVpnService.kt - Tether VPN → Wi-Fi network: monitors Wi-Fi
V2rayNG/tether/src/main/java/com/amier/tether/TetherVpnService.kt - Browser dialer → Wi-Fi network: uses WebSockets