Updated getV2rayCustomConfig to check for the presence of a 'tun' inbound in the configuration. If not present and HevTun is not used, the method adds a 'tun' inbound from the template configuration and updates the config accordingly.
Introduced V2RayNativeManager as a thread-safe singleton to encapsulate all Libv2ray native method calls, replacing direct usage throughout the codebase. Updated SpeedtestManager, V2RayServiceManager, V2RayTestService, AboutActivity, and CheckUpdateActivity to use the new manager, improving code organization and maintainability.
Replaces the TUN interface selection ListPreference with a CheckBoxPreference for enabling HEV TUN, updates related logic and string resources, removes SettingsViewModel, and simplifies inbound configuration. This refactor improves user experience and code maintainability by consolidating TUN selection and removing legacy code.
* Add xray-core tun mode
The service start-up sequence is changed:
vpn service is created first,
a file descriptor to the underlining vpn service can then be passed to xray-core,
Xray core then create the TUN inbound from it
* Remove badvpn-tun2socks
Replaces SharedPreferences with MMKV for all settings by introducing MmkvPreferenceDataStore and updating SettingsActivity to use it. Adds encode/decode helpers for more types in MmkvManager, ensures default settings are initialized in SettingsManager, and removes the unused FragmentAdapter. This change improves consistency and reliability of settings storage.
Introduces a base activity layout with MaterialToolbar and refactors all activities to use setContentViewWithToolbar for consistent toolbar/title handling. Updates color and theme resources to Material3, removes hardcoded color references from layouts, and improves RecyclerView indicator color logic. This modernizes the UI and centralizes toolbar management.