Commit Graph

1272 Commits

Author SHA1 Message Date
2dust b0213ffdf6 Refactor FAB state handling in MainActivity 2026-01-16 17:40:09 +08:00
2dust 538b2eb0f8 Bug fix
https://github.com/2dust/v2rayNG/issues/5172
2026-01-16 16:36:01 +08:00
2dust f2093c4c52 Refactor real ping test logic into worker service 2026-01-16 16:28:35 +08:00
2dust 02ac57a4c6 Fix and improve port hopping interval handling
https://github.com/2dust/v2rayNG/issues/5171
2026-01-16 15:21:19 +08:00
2dust 379266f205 Add tun inbound to custom config if missing
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.
2026-01-16 15:07:10 +08:00
2dust 23dbb35da7 Refactor MainActivity and clean up SettingsActivity 2026-01-15 17:54:15 +08:00
2dust 22a605ecda up 2.0.1 2026-01-15 14:51:11 +08:00
2dust c7dd45f4f2 Bug fix
https://github.com/2dust/v2rayNG/issues/5164
2026-01-15 14:49:29 +08:00
2dust 609e688d87 Fix HYSTERIA2 string 2026-01-15 14:30:10 +08:00
2dust a2a4ea79a9 Optimize coroutine dispatcher in V2RayTestService 2026-01-15 14:22:24 +08:00
2dust c08147c362 Refactor WebDAV backup path and file name handling 2026-01-15 11:52:18 +08:00
2dust c99fda9839 Bug fix
https://github.com/2dust/v2rayNG/issues/5158
2026-01-15 11:11:16 +08:00
2dust 587d103518 Fix enum declaration for RoutingType 2026-01-15 10:41:06 +08:00
Umor1st 192a4afe6d Add Russia whitelist routing option (#5161)
* Add Russia whitelist routing option

* Update RoutingType.kt

* Add custom routing file in assets

* Update localization
2026-01-15 10:34:11 +08:00
2dust ee69364f2b Remove hysteria submodule and related build steps 2026-01-15 10:32:10 +08:00
2dust 6be0bd7b21 Remove plugin framework and refactor Hysteria2 integration 2026-01-15 10:19:25 +08:00
2dust a3972b98f3 up 2.0.0 2026-01-14 15:57:20 +08:00
2dust a2b6e669d8 Update XrayLite submodule and optimize imports 2026-01-14 09:54:49 +08:00
solokot 55c42fbf2a Update Russian translation (#5156) 2026-01-14 09:30:05 +08:00
2dust ab4af6bd82 Refactor rulesets management to ViewModel 2026-01-13 17:29:40 +08:00
2dust c3a8ee59dc Refactor subscription management to ViewModel 2026-01-13 17:29:22 +08:00
2dust 18f23d9d3b Bug fix
https://github.com/2dust/v2rayNG/issues/5151
2026-01-13 11:10:48 +08:00
2dust 4a3686fb32 Refactor per-app proxy logic to ViewModel 2026-01-13 10:57:42 +08:00
2dust 68ed08d36e Add invert selection to per-app proxy list 2026-01-13 09:56:28 +08:00
DHR60 d0612619fd Raise minSdk to 24 (#5152) 2026-01-12 19:33:15 +08:00
2dust 3ddd6ee699 Refactor V2Ray native integration to V2RayNativeManager
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.
2026-01-12 17:40:48 +08:00
2dust 485ea2e28d Update submodules to latest commits 2026-01-12 16:27:53 +08:00
2dust 2fd57baa37 Refactor TUN selection to use HEV toggle and cleanup
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.
2026-01-12 16:14:33 +08:00
yuhan6665 73d1dce4db Add xray-core tun mode (#5150)
* 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
2026-01-12 14:16:44 +08:00
2dust bd60224577 Add auto remove and sort after test options 2026-01-11 20:08:37 +08:00
2dust 3f1b741d9d Refactor progress bar handling to BaseActivity 2026-01-11 17:06:11 +08:00
2dust b71614a9cd Show and update subscription last updated time 2026-01-11 14:40:41 +08:00
2dust 31d29d97c0 Refactor imports and remove unused code 2026-01-11 11:48:40 +08:00
2dust 183391b6e3 Enable log copy on long press 2026-01-11 11:24:02 +08:00
2dust 3ad6464595 Refactor V2RayTestService 2026-01-10 18:25:38 +08:00
2dust e684bef35d Migrate settings storage to MMKV and add PreferenceDataStore
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.
2026-01-10 14:31:02 +08:00
2dust a87d5d375b Refactor themes to use shared AppThemeBase style 2026-01-09 18:11:36 +08:00
2dust 545683c9ba Reorganize and expand settings preferences UI 2026-01-09 17:34:07 +08:00
2dust 1a8631257b Refactor UI to use Material3 toolbar and theme
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.
2026-01-09 14:44:39 +08:00
Skh-web6982 ebebd3277f Update Persian translate (#5145)
* Update Persian translate

* Update strings.xml
2026-01-09 09:58:38 +08:00
solokot 5242827baf Update Russian translation (#5141) 2026-01-09 09:58:23 +08:00
Hossein Abaspanah c6799d5bf3 Update strings.xml (#5143) 2026-01-08 19:36:36 +08:00
Hossein Abaspanah 054a3bfa5e Update Luri Bakhtiari translation (#5140) 2026-01-08 19:34:33 +08:00
AmirMohammad Yazdanmanesh 02a9d64188 Tests for shadowsocks fmt protocol formatter (#5137)
* Add unit tests for ShadowsocksFmt protocol formatter

  - Add comprehensive test coverage for Shadowsocks URL parsing
  - Test SIP002 format (modern) with base64 encoded userinfo
  - Test legacy format with full base64 encoding
  - Test URI generation and round-trip consistency
  - Cover edge cases: IPv6 addresses, empty remarks, various encryption methods
  - Mock Android Base64 and Log classes for unit test execution

* Adding URL decoding before Base64 decoding. The flow is now: extract → URL decode → Base64 decode.

* Fix test naming convention to match project standards

Change test method names from backtick-delimited descriptive names
to underscore-separated format with test_ prefix to align with
existing project conventions (e.g., test_parseInt in UtilsTest).

Before: `parseSip002 valid URL with base64 encoded userinfo`()
After:  test_parseSip002_validUrlWithBase64EncodedUserinfo()

* Fix Base64 mock to properly handle encoding flags

The mock now inspects the flags parameter and applies URL-safe
encoding and padding removal conditionally based on actual flag
values (URL_SAFE, NO_PADDING) instead of unconditionally using
withoutPadding().

* Fix Base64 decode mock to propagate exceptions

The mock now properly handles the URL_SAFE flag and propagates
exceptions on invalid input instead of silently returning an
empty ByteArray. This matches Android's actual Base64 behavior
where IllegalArgumentException is thrown on invalid input.

* Extract helper functions to reduce code duplication

Add createSip002Url() and createLegacyUrl() helper functions to
centralize URL construction logic. Add SS_SCHEME constant to
avoid magic strings. This improves maintainability by reducing
repeated Base64 encoding and URL construction patterns.

* Add URI format verification before extracting base64

Verify that toUri() returns a URI string without the scheme
prefix before extracting the base64 content. This ensures the
test correctly validates the URI format and prevents incorrect
data extraction if the implementation changes.

* Add scheme verification in round-trip test

Explicitly verify that toUri() returns a URI string without the
scheme prefix before prepending it. This documents the expected
behavior and ensures the test fails gracefully if the
implementation changes.

* mockito-inline version 6.1.0 does not exist
  - The latest available version is 5.2.0 (released March 2023)
  - The mockito-inline artifact was effectively deprecated after 5.2.0; mocking final classes is now built into mockito-core since Mockito 5.x
2026-01-08 19:31:13 +08:00
2dust 29b67c29f5 Show running test task count in UI and improve test service 2026-01-08 16:37:10 +08:00
2dust 79d5cad738 Refactor server list data handling in adapter 2026-01-08 15:07:26 +08:00
2dust de5b714a28 Refactor group tab to ViewPager2 with fragments
Replaces the group tab and server list RecyclerView in MainActivity with a ViewPager2-based implementation using fragments. Adds GroupPagerAdapter and GroupServerFragment for per-group server lists, introduces BaseFragment for fragment view binding, and updates related logic in MainViewModel and SettingsChangeManager. Updates dependencies to include ViewPager2 and Fragment KTX, and modifies layouts to support the new structure.
2026-01-08 13:58:52 +08:00
2dust 416ee28e80 Rename proxy_packagename.txt to proxy_package_name 2026-01-05 11:00:40 +08:00
2dust 71f0d98e68 Add SettingsChangeManager and centralize restart logic 2026-01-05 10:40:55 +08:00
2dust 37bd57ffc5 Add WebDAV backup and restore functionality
Introduces a new BackupActivity for configuration backup and restore, supporting both local storage and WebDAV servers. Adds WebDavManager and WebDavConfig for handling WebDAV operations, updates the navigation drawer and menu, and refactors AboutActivity to remove backup/restore logic. Includes new layouts and string resources for backup options and WebDAV settings.
2026-01-03 15:22:45 +08:00