├── V2rayNG
├── app
│ ├── proguard-rules.pro
│ ├── .gitignore
│ ├── src
│ │ ├── main
│ │ │ ├── assets
│ │ │ │ ├── custom_routing_block
│ │ │ │ ├── custom_routing_proxy
│ │ │ │ ├── v2ray_config.json
│ │ │ │ └── custom_routing_direct
│ │ │ ├── ic_launcher-web.png
│ │ │ ├── ic_foot_print-playstore.png
│ │ │ ├── ic_launcher_logo-playstore.png
│ │ │ ├── res
│ │ │ │ ├── drawable-xxhdpi
│ │ │ │ │ ├── donate.png
│ │ │ │ │ ├── ic_stat_name.png
│ │ │ │ │ ├── ic_stat_direct.png
│ │ │ │ │ ├── ic_stat_proxy.png
│ │ │ │ │ └── side_nav_bar.xml
│ │ │ │ ├── drawable
│ │ │ │ │ ├── nav_header_bg.png
│ │ │ │ │ ├── ic_shortcut_background.xml
│ │ │ │ │ ├── ic_rounded_corner_theme.xml
│ │ │ │ │ ├── ic_rounded_corner_grey.xml
│ │ │ │ │ ├── ic_fab_check.xml
│ │ │ │ │ ├── ic_add_white_24dp.xml
│ │ │ │ │ ├── ic_action_done.xml
│ │ │ │ │ ├── ic_info_black_24dp.xml
│ │ │ │ │ ├── ic_image_photo.xml
│ │ │ │ │ ├── ic_feedback_white_24dp.xml
│ │ │ │ │ ├── ic_close_grey_800_24dp.xml
│ │ │ │ │ ├── ic_copy_white.xml
│ │ │ │ │ ├── ic_outline_filter_alt_white_24.xml
│ │ │ │ │ ├── ic_description_black_24dp.xml
│ │ │ │ │ ├── ic_description_white_24dp.xml
│ │ │ │ │ ├── ic_edit_black_24dp.xml
│ │ │ │ │ ├── ic_save_white_24dp.xml
│ │ │ │ │ ├── ic_subscriptions_black_24dp.xml
│ │ │ │ │ ├── ic_subscriptions_white_24dp.xml
│ │ │ │ │ ├── ic_cloud_download_white_24dp.xml
│ │ │ │ │ ├── ic_logcat_white_24dp.xml
│ │ │ │ │ ├── baseline_calendar_month_24.xml
│ │ │ │ │ ├── ic_delete_black_24dp.xml
│ │ │ │ │ ├── ic_delete_white_24dp.xml
│ │ │ │ │ ├── ic_qu_switch_black_24dp.xml
│ │ │ │ │ ├── baseline_data_usage_24.xml
│ │ │ │ │ ├── baseline_data_usage_24_neu.xml
│ │ │ │ │ ├── ic_whatshot_black_24dp.xml
│ │ │ │ │ ├── ic_whatshot_white_24dp.xml
│ │ │ │ │ ├── ic_attach_money_black_24dp.xml
│ │ │ │ │ ├── ic_attach_money_white_24dp.xml
│ │ │ │ │ ├── ic_select_all_white_24dp.xml
│ │ │ │ │ ├── ic_share_black_24dp.xml
│ │ │ │ │ ├── ic_share_white_24dp.xml
│ │ │ │ │ ├── ic_scan_black_24dp.xml
│ │ │ │ │ ├── ic_qu_scan_black_24dp.xml
│ │ │ │ │ ├── round_update_24.xml
│ │ │ │ │ ├── ic_settings_white_24dp.xml
│ │ │ │ │ └── ic_file_white_24dp.xml
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ ├── ic_foot_print.png
│ │ │ │ │ ├── ic_launcher_logo.png
│ │ │ │ │ ├── ic_foot_print_eins.png
│ │ │ │ │ ├── ic_foot_print_weis.png
│ │ │ │ │ ├── ic_foot_print_zwei.png
│ │ │ │ │ ├── ic_launcher_round.png
│ │ │ │ │ ├── ic_foot_print_round.png
│ │ │ │ │ ├── ic_foot_print_weis_neu.png
│ │ │ │ │ ├── ic_foot_print_weis_neu2.png
│ │ │ │ │ ├── ic_launcher_foreground.png
│ │ │ │ │ ├── ic_launcher_logo_round.png
│ │ │ │ │ ├── ic_foot_print_eins_round.png
│ │ │ │ │ ├── ic_foot_print_weis_round.png
│ │ │ │ │ ├── ic_foot_print_zwei_round.png
│ │ │ │ │ ├── ic_foot_print_weis_neu_round.png
│ │ │ │ │ ├── ic_launcher_logo_foreground.png
│ │ │ │ │ └── ic_foot_print_weis_neu2_round.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ ├── ic_foot_print.png
│ │ │ │ │ ├── ic_launcher_logo.png
│ │ │ │ │ ├── ic_foot_print_eins.png
│ │ │ │ │ ├── ic_foot_print_weis.png
│ │ │ │ │ ├── ic_foot_print_zwei.png
│ │ │ │ │ ├── ic_launcher_round.png
│ │ │ │ │ ├── ic_foot_print_round.png
│ │ │ │ │ ├── ic_foot_print_weis_neu.png
│ │ │ │ │ ├── ic_foot_print_weis_neu2.png
│ │ │ │ │ ├── ic_launcher_foreground.png
│ │ │ │ │ ├── ic_launcher_logo_round.png
│ │ │ │ │ ├── ic_foot_print_eins_round.png
│ │ │ │ │ ├── ic_foot_print_weis_round.png
│ │ │ │ │ ├── ic_foot_print_zwei_round.png
│ │ │ │ │ ├── ic_foot_print_weis_neu_round.png
│ │ │ │ │ ├── ic_launcher_logo_foreground.png
│ │ │ │ │ └── ic_foot_print_weis_neu2_round.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ │ ├── ic_banner.png
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ ├── ic_foot_print.png
│ │ │ │ │ ├── ic_launcher_logo.png
│ │ │ │ │ ├── ic_launcher_round.png
│ │ │ │ │ ├── ic_banner_foreground.png
│ │ │ │ │ ├── ic_foot_print_eins.png
│ │ │ │ │ ├── ic_foot_print_round.png
│ │ │ │ │ ├── ic_foot_print_weis.png
│ │ │ │ │ ├── ic_foot_print_zwei.png
│ │ │ │ │ ├── ic_foot_print_weis_neu.png
│ │ │ │ │ ├── ic_launcher_foreground.png
│ │ │ │ │ ├── ic_launcher_logo_round.png
│ │ │ │ │ ├── ic_foot_print_eins_round.png
│ │ │ │ │ ├── ic_foot_print_weis_neu2.png
│ │ │ │ │ ├── ic_foot_print_weis_round.png
│ │ │ │ │ ├── ic_foot_print_zwei_round.png
│ │ │ │ │ ├── ic_launcher_logo_foreground.png
│ │ │ │ │ ├── ic_foot_print_weis_neu2_round.png
│ │ │ │ │ └── ic_foot_print_weis_neu_round.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ ├── ic_foot_print.png
│ │ │ │ │ ├── ic_launcher_logo.png
│ │ │ │ │ ├── ic_foot_print_eins.png
│ │ │ │ │ ├── ic_foot_print_round.png
│ │ │ │ │ ├── ic_foot_print_weis.png
│ │ │ │ │ ├── ic_foot_print_zwei.png
│ │ │ │ │ ├── ic_launcher_round.png
│ │ │ │ │ ├── ic_foot_print_eins_round.png
│ │ │ │ │ ├── ic_foot_print_weis_neu.png
│ │ │ │ │ ├── ic_foot_print_weis_neu2.png
│ │ │ │ │ ├── ic_foot_print_weis_round.png
│ │ │ │ │ ├── ic_foot_print_zwei_round.png
│ │ │ │ │ ├── ic_launcher_foreground.png
│ │ │ │ │ ├── ic_launcher_logo_round.png
│ │ │ │ │ ├── ic_foot_print_weis_neu2_round.png
│ │ │ │ │ ├── ic_foot_print_weis_neu_round.png
│ │ │ │ │ └── ic_launcher_logo_foreground.png
│ │ │ │ ├── drawable-hdpi
│ │ │ │ │ ├── ic_stat_direct.png
│ │ │ │ │ ├── ic_stat_name.png
│ │ │ │ │ └── ic_stat_proxy.png
│ │ │ │ ├── drawable-mdpi
│ │ │ │ │ ├── ic_stat_direct.png
│ │ │ │ │ ├── ic_stat_name.png
│ │ │ │ │ └── ic_stat_proxy.png
│ │ │ │ ├── drawable-xhdpi
│ │ │ │ │ ├── ic_stat_name.png
│ │ │ │ │ ├── ic_stat_proxy.png
│ │ │ │ │ └── ic_stat_direct.png
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ │ ├── ic_foot_print.png
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ ├── ic_foot_print_eins.png
│ │ │ │ │ ├── ic_foot_print_weis.png
│ │ │ │ │ ├── ic_foot_print_zwei.png
│ │ │ │ │ ├── ic_launcher_logo.png
│ │ │ │ │ ├── ic_launcher_round.png
│ │ │ │ │ ├── ic_foot_print_round.png
│ │ │ │ │ ├── ic_foot_print_weis_neu.png
│ │ │ │ │ ├── ic_foot_print_weis_neu2.png
│ │ │ │ │ ├── ic_launcher_foreground.png
│ │ │ │ │ ├── ic_launcher_logo_round.png
│ │ │ │ │ ├── ic_foot_print_eins_round.png
│ │ │ │ │ ├── ic_foot_print_weis_round.png
│ │ │ │ │ ├── ic_foot_print_zwei_round.png
│ │ │ │ │ ├── ic_foot_print_weis_neu_round.png
│ │ │ │ │ ├── ic_launcher_logo_foreground.png
│ │ │ │ │ └── ic_foot_print_weis_neu2_round.png
│ │ │ │ ├── drawable-xxxhdpi
│ │ │ │ │ ├── ic_stat_name.png
│ │ │ │ │ ├── ic_stat_proxy.png
│ │ │ │ │ └── ic_stat_direct.png
│ │ │ │ ├── values
│ │ │ │ │ ├── ic_banner_background.xml
│ │ │ │ │ ├── ic_launcher_background.xml
│ │ │ │ │ ├── attrs.xml
│ │ │ │ │ ├── dimens.xml
│ │ │ │ │ ├── colors.xml
│ │ │ │ │ └── styles.xml
│ │ │ │ ├── values-night
│ │ │ │ │ ├── colors.xml
│ │ │ │ │ └── styles.xml
│ │ │ │ ├── layout
│ │ │ │ │ ├── activity_none.xml
│ │ │ │ │ ├── activity_settings.xml
│ │ │ │ │ ├── nav_view.xml
│ │ │ │ │ ├── preference_with_help_link.xml
│ │ │ │ │ ├── item_qrcode.xml
│ │ │ │ │ ├── nav_toolbar.xml
│ │ │ │ │ ├── widget_switch.xml
│ │ │ │ │ ├── activity_routing_settings.xml
│ │ │ │ │ ├── activity_sub_setting.xml
│ │ │ │ │ ├── item_recycler_footer.xml
│ │ │ │ │ ├── activity_logcat.xml
│ │ │ │ │ ├── fragment_routing_settings.xml
│ │ │ │ │ ├── dialog_config_filter.xml
│ │ │ │ │ ├── activity_tasker.xml
│ │ │ │ │ ├── item_recycler_bypass_list.xml
│ │ │ │ │ ├── nav_header.xml
│ │ │ │ │ ├── item_recycler_user_asset.xml
│ │ │ │ │ ├── activity_server_custom_config.xml
│ │ │ │ │ ├── activity_bypass_list.xml
│ │ │ │ │ └── activity_sub_edit.xml
│ │ │ │ ├── mipmap-anydpi-v26
│ │ │ │ │ ├── ic_launcher_round.xml
│ │ │ │ │ ├── ic_foot_print.xml
│ │ │ │ │ ├── ic_foot_print_round.xml
│ │ │ │ │ ├── ic_launcher_logo.xml
│ │ │ │ │ ├── ic_launcher_logo_round.xml
│ │ │ │ │ ├── ic_foot_print_eins.xml
│ │ │ │ │ ├── ic_foot_print_weis.xml
│ │ │ │ │ ├── ic_foot_print_zwei.xml
│ │ │ │ │ ├── ic_foot_print_eins_round.xml
│ │ │ │ │ ├── ic_foot_print_weis_round.xml
│ │ │ │ │ ├── ic_foot_print_zwei_round.xml
│ │ │ │ │ ├── ic_foot_print_weis_neu.xml
│ │ │ │ │ ├── ic_foot_print_weis_neu2.xml
│ │ │ │ │ ├── ic_foot_print_weis_neu_round.xml
│ │ │ │ │ ├── ic_foot_print_weis_neu2_round.xml
│ │ │ │ │ ├── ic_banner.xml
│ │ │ │ │ └── ic_launcher.xml
│ │ │ │ ├── anim
│ │ │ │ │ ├── fade_in.xml
│ │ │ │ │ └── fade_out.xml
│ │ │ │ ├── xml
│ │ │ │ │ ├── app_widget_provider.xml
│ │ │ │ │ └── shortcuts.xml
│ │ │ │ ├── values-sw360dp-v13
│ │ │ │ │ └── values-preference.xml
│ │ │ │ ├── color
│ │ │ │ │ └── color_highlight_material.xml
│ │ │ │ ├── menu
│ │ │ │ │ ├── menu_scanner.xml
│ │ │ │ │ ├── menu_logcat.xml
│ │ │ │ │ ├── action_server.xml
│ │ │ │ │ ├── menu_asset.xml
│ │ │ │ │ ├── action_sub_setting.xml
│ │ │ │ │ ├── menu_routing.xml
│ │ │ │ │ ├── menu_bypass_list.xml
│ │ │ │ │ └── menu_drawer.xml
│ │ │ │ └── raw
│ │ │ │ │ └── licenses.xml
│ │ │ ├── ic_foot_print_eins-playstore.png
│ │ │ ├── ic_foot_print_weis-playstore.png
│ │ │ ├── ic_foot_print_zwei-playstore.png
│ │ │ ├── ic_foot_print_weis_neu-playstore.png
│ │ │ ├── ic_foot_print_weis_neu2-playstore.png
│ │ │ ├── kotlin
│ │ │ │ └── com
│ │ │ │ │ └── v2ray
│ │ │ │ │ └── ang
│ │ │ │ │ ├── dto
│ │ │ │ │ ├── ServersCache.kt
│ │ │ │ │ ├── ERoutingMode.kt
│ │ │ │ │ ├── SubscriptionItem.kt
│ │ │ │ │ ├── AppInfo.kt
│ │ │ │ │ ├── ServerAffiliationInfo.kt
│ │ │ │ │ ├── EConfigType.kt
│ │ │ │ │ ├── VmessQRCode.kt
│ │ │ │ │ ├── AngConfig.kt
│ │ │ │ │ └── ServerConfig.kt
│ │ │ │ │ ├── service
│ │ │ │ │ ├── ServiceControl.kt
│ │ │ │ │ ├── GetDateInterface.kt
│ │ │ │ │ ├── ApiUpdate.kt
│ │ │ │ │ ├── V2RayProxyOnlyService.kt
│ │ │ │ │ ├── V2RayTestService.kt
│ │ │ │ │ └── QSTileService.kt
│ │ │ │ │ ├── ui
│ │ │ │ │ ├── FragmentAdapter.kt
│ │ │ │ │ ├── ScSwitchActivity.kt
│ │ │ │ │ ├── BaseActivity.kt
│ │ │ │ │ ├── ScScannerActivity.kt
│ │ │ │ │ ├── RoutingSettingsActivity.kt
│ │ │ │ │ ├── UrlSchemeActivity.kt
│ │ │ │ │ ├── SubSettingActivity.kt
│ │ │ │ │ ├── PerAppProxyAdapter.kt
│ │ │ │ │ ├── LogcatActivity.kt
│ │ │ │ │ ├── TaskerActivity.kt
│ │ │ │ │ └── SubSettingRecyclerAdapter.kt
│ │ │ │ │ ├── AngApplication.kt
│ │ │ │ │ ├── util
│ │ │ │ │ ├── MyContextWrapper.kt
│ │ │ │ │ ├── MessageUtil.kt
│ │ │ │ │ └── AppManagerUtil.kt
│ │ │ │ │ ├── receiver
│ │ │ │ │ ├── TaskerReceiver.kt
│ │ │ │ │ └── WidgetProvider.kt
│ │ │ │ │ ├── extension
│ │ │ │ │ └── _Ext.kt
│ │ │ │ │ ├── viewmodel
│ │ │ │ │ └── SettingsViewModel.kt
│ │ │ │ │ └── AppConfig.kt
│ │ │ └── java
│ │ │ │ └── com
│ │ │ │ └── v2ray
│ │ │ │ └── ang
│ │ │ │ └── helper
│ │ │ │ ├── OnStartDragListener.java
│ │ │ │ ├── ItemTouchHelperViewHolder.java
│ │ │ │ └── ItemTouchHelperAdapter.java
│ │ ├── dev
│ │ │ └── res
│ │ │ │ └── values
│ │ │ │ └── strings.xml
│ │ ├── pre_release
│ │ │ └── res
│ │ │ │ └── values
│ │ │ │ └── strings.xml
│ │ ├── test
│ │ │ ├── java
│ │ │ │ └── com
│ │ │ │ │ └── v2ray
│ │ │ │ │ └── ang
│ │ │ │ │ └── ExampleUnitTest.java
│ │ │ └── kotlin
│ │ │ │ └── com
│ │ │ │ └── v2ray
│ │ │ │ └── ang
│ │ │ │ └── ExampleUnitTest.kt
│ │ └── androidTest
│ │ │ └── java
│ │ │ └── com
│ │ │ └── v2ray
│ │ │ └── ang
│ │ │ └── ApplicationTest.java
│ └── libs
│ │ ├── x86
│ │ └── libtun2socks.so
│ │ ├── x86_64
│ │ └── libtun2socks.so
│ │ ├── arm64-v8a
│ │ └── libtun2socks.so
│ │ └── armeabi-v7a
│ │ └── libtun2socks.so
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── .gitignore
├── build.gradle
├── gradle.properties
├── settings.gradle
└── gradlew.bat
├── .gitignore
├── .github
└── ISSUE_TEMPLATE
│ ├── config.yml
│ └── bug_cn.md
├── AndroidLibV2rayLite
└── README.md
├── CR.md
└── README.md
/V2rayNG/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/V2rayNG/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 | /google-services.json
3 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/assets/custom_routing_block:
--------------------------------------------------------------------------------
1 | geosite:category-ads-all,
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.dat
2 | *.jks
3 | V2rayNG/app/release/output.json
4 | .idea/
5 | .gradle/
6 |
--------------------------------------------------------------------------------
/V2rayNG/app/libs/x86/libtun2socks.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/libs/x86/libtun2socks.so
--------------------------------------------------------------------------------
/V2rayNG/app/libs/x86_64/libtun2socks.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/libs/x86_64/libtun2socks.so
--------------------------------------------------------------------------------
/V2rayNG/app/libs/arm64-v8a/libtun2socks.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/libs/arm64-v8a/libtun2socks.so
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/ic_launcher-web.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/ic_launcher-web.png
--------------------------------------------------------------------------------
/V2rayNG/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/V2rayNG/app/libs/armeabi-v7a/libtun2socks.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/libs/armeabi-v7a/libtun2socks.so
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/ic_foot_print-playstore.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/ic_foot_print-playstore.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/ic_launcher_logo-playstore.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/ic_launcher_logo-playstore.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/drawable-xxhdpi/donate.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/drawable-xxhdpi/donate.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/drawable/nav_header_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/drawable/nav_header_bg.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-xhdpi/ic_banner.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-xhdpi/ic_banner.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/ic_foot_print_eins-playstore.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/ic_foot_print_eins-playstore.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/ic_foot_print_weis-playstore.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/ic_foot_print_weis-playstore.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/ic_foot_print_zwei-playstore.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/ic_foot_print_zwei-playstore.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-hdpi/ic_foot_print.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-hdpi/ic_foot_print.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-mdpi/ic_foot_print.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-mdpi/ic_foot_print.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/ic_foot_print_weis_neu-playstore.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/ic_foot_print_weis_neu-playstore.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/drawable-hdpi/ic_stat_direct.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/drawable-hdpi/ic_stat_direct.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/drawable-hdpi/ic_stat_name.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/drawable-hdpi/ic_stat_name.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/drawable-hdpi/ic_stat_proxy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/drawable-hdpi/ic_stat_proxy.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/drawable-mdpi/ic_stat_direct.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/drawable-mdpi/ic_stat_direct.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/drawable-mdpi/ic_stat_name.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/drawable-mdpi/ic_stat_name.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/drawable-mdpi/ic_stat_proxy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/drawable-mdpi/ic_stat_proxy.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/drawable-xhdpi/ic_stat_name.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/drawable-xhdpi/ic_stat_name.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/drawable-xhdpi/ic_stat_proxy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/drawable-xhdpi/ic_stat_proxy.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/drawable-xxhdpi/ic_stat_name.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/drawable-xxhdpi/ic_stat_name.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-hdpi/ic_launcher_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-hdpi/ic_launcher_logo.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-mdpi/ic_launcher_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-mdpi/ic_launcher_logo.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-xhdpi/ic_foot_print.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-xhdpi/ic_foot_print.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-xxhdpi/ic_foot_print.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-xxhdpi/ic_foot_print.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-xxxhdpi/ic_foot_print.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-xxxhdpi/ic_foot_print.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/V2rayNG/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea
5 | .DS_Store
6 | /build
7 | /captures
8 | *.apk
9 | signing.properties
10 | *.aar
11 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/ic_foot_print_weis_neu2-playstore.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/ic_foot_print_weis_neu2-playstore.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/drawable-xhdpi/ic_stat_direct.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/drawable-xhdpi/ic_stat_direct.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/drawable-xxhdpi/ic_stat_direct.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/drawable-xxhdpi/ic_stat_direct.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/drawable-xxhdpi/ic_stat_proxy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/drawable-xxhdpi/ic_stat_proxy.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/drawable-xxxhdpi/ic_stat_name.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/drawable-xxxhdpi/ic_stat_name.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/drawable-xxxhdpi/ic_stat_proxy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/drawable-xxxhdpi/ic_stat_proxy.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-hdpi/ic_foot_print_eins.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-hdpi/ic_foot_print_eins.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-hdpi/ic_foot_print_weis.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-hdpi/ic_foot_print_weis.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-hdpi/ic_foot_print_zwei.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-hdpi/ic_foot_print_zwei.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-mdpi/ic_foot_print_eins.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-mdpi/ic_foot_print_eins.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-mdpi/ic_foot_print_weis.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-mdpi/ic_foot_print_weis.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-mdpi/ic_foot_print_zwei.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-mdpi/ic_foot_print_zwei.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-xhdpi/ic_launcher_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-xhdpi/ic_launcher_logo.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-xxhdpi/ic_launcher_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-xxhdpi/ic_launcher_logo.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/drawable-xxxhdpi/ic_stat_direct.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/drawable-xxxhdpi/ic_stat_direct.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-hdpi/ic_foot_print_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-hdpi/ic_foot_print_round.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-mdpi/ic_foot_print_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-mdpi/ic_foot_print_round.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-xhdpi/ic_banner_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-xhdpi/ic_banner_foreground.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-xhdpi/ic_foot_print_eins.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-xhdpi/ic_foot_print_eins.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-xhdpi/ic_foot_print_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-xhdpi/ic_foot_print_round.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-xhdpi/ic_foot_print_weis.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-xhdpi/ic_foot_print_weis.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-xhdpi/ic_foot_print_zwei.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-xhdpi/ic_foot_print_zwei.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-xxhdpi/ic_foot_print_eins.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-xxhdpi/ic_foot_print_eins.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-xxhdpi/ic_foot_print_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-xxhdpi/ic_foot_print_round.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-xxhdpi/ic_foot_print_weis.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-xxhdpi/ic_foot_print_weis.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-xxhdpi/ic_foot_print_zwei.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-xxhdpi/ic_foot_print_zwei.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-xxxhdpi/ic_foot_print_eins.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-xxxhdpi/ic_foot_print_eins.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-xxxhdpi/ic_foot_print_weis.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-xxxhdpi/ic_foot_print_weis.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-xxxhdpi/ic_foot_print_zwei.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-xxxhdpi/ic_foot_print_zwei.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-xxxhdpi/ic_launcher_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-xxxhdpi/ic_launcher_logo.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/dev/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | - v2rayNG (DEV)
4 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-hdpi/ic_foot_print_weis_neu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-hdpi/ic_foot_print_weis_neu.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-hdpi/ic_foot_print_weis_neu2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-hdpi/ic_foot_print_weis_neu2.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-hdpi/ic_launcher_logo_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-hdpi/ic_launcher_logo_round.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-mdpi/ic_foot_print_weis_neu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-mdpi/ic_foot_print_weis_neu.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-mdpi/ic_foot_print_weis_neu2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-mdpi/ic_foot_print_weis_neu2.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-mdpi/ic_launcher_logo_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-mdpi/ic_launcher_logo_round.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-xhdpi/ic_foot_print_weis_neu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-xhdpi/ic_foot_print_weis_neu.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-xhdpi/ic_launcher_logo_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-xhdpi/ic_launcher_logo_round.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-xxxhdpi/ic_foot_print_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-xxxhdpi/ic_foot_print_round.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-hdpi/ic_foot_print_eins_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-hdpi/ic_foot_print_eins_round.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-hdpi/ic_foot_print_weis_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-hdpi/ic_foot_print_weis_round.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-hdpi/ic_foot_print_zwei_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-hdpi/ic_foot_print_zwei_round.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-mdpi/ic_foot_print_eins_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-mdpi/ic_foot_print_eins_round.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-mdpi/ic_foot_print_weis_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-mdpi/ic_foot_print_weis_round.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-mdpi/ic_foot_print_zwei_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-mdpi/ic_foot_print_zwei_round.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-xhdpi/ic_foot_print_eins_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-xhdpi/ic_foot_print_eins_round.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-xhdpi/ic_foot_print_weis_neu2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-xhdpi/ic_foot_print_weis_neu2.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-xhdpi/ic_foot_print_weis_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-xhdpi/ic_foot_print_weis_round.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-xhdpi/ic_foot_print_zwei_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-xhdpi/ic_foot_print_zwei_round.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-xxhdpi/ic_foot_print_eins_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-xxhdpi/ic_foot_print_eins_round.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-xxhdpi/ic_foot_print_weis_neu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-xxhdpi/ic_foot_print_weis_neu.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-xxhdpi/ic_foot_print_weis_neu2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-xxhdpi/ic_foot_print_weis_neu2.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-xxhdpi/ic_foot_print_weis_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-xxhdpi/ic_foot_print_weis_round.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-xxhdpi/ic_foot_print_zwei_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-xxhdpi/ic_foot_print_zwei_round.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-xxhdpi/ic_launcher_logo_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-xxhdpi/ic_launcher_logo_round.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-xxxhdpi/ic_foot_print_weis_neu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-xxxhdpi/ic_foot_print_weis_neu.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-xxxhdpi/ic_foot_print_weis_neu2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-xxxhdpi/ic_foot_print_weis_neu2.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-xxxhdpi/ic_launcher_logo_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-xxxhdpi/ic_launcher_logo_round.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-hdpi/ic_foot_print_weis_neu_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-hdpi/ic_foot_print_weis_neu_round.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-hdpi/ic_launcher_logo_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-hdpi/ic_launcher_logo_foreground.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-mdpi/ic_foot_print_weis_neu_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-mdpi/ic_foot_print_weis_neu_round.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-mdpi/ic_launcher_logo_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-mdpi/ic_launcher_logo_foreground.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-xhdpi/ic_launcher_logo_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-xhdpi/ic_launcher_logo_foreground.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-xxxhdpi/ic_foot_print_eins_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-xxxhdpi/ic_foot_print_eins_round.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-xxxhdpi/ic_foot_print_weis_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-xxxhdpi/ic_foot_print_weis_round.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-xxxhdpi/ic_foot_print_zwei_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-xxxhdpi/ic_foot_print_zwei_round.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/values/ic_banner_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #FFFFFF
4 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-hdpi/ic_foot_print_weis_neu2_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-hdpi/ic_foot_print_weis_neu2_round.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-mdpi/ic_foot_print_weis_neu2_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-mdpi/ic_foot_print_weis_neu2_round.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-xhdpi/ic_foot_print_weis_neu2_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-xhdpi/ic_foot_print_weis_neu2_round.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-xhdpi/ic_foot_print_weis_neu_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-xhdpi/ic_foot_print_weis_neu_round.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-xxhdpi/ic_foot_print_weis_neu2_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-xxhdpi/ic_foot_print_weis_neu2_round.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-xxhdpi/ic_foot_print_weis_neu_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-xxhdpi/ic_foot_print_weis_neu_round.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-xxhdpi/ic_launcher_logo_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-xxhdpi/ic_launcher_logo_foreground.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-xxxhdpi/ic_foot_print_weis_neu_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-xxxhdpi/ic_foot_print_weis_neu_round.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-xxxhdpi/ic_launcher_logo_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-xxxhdpi/ic_launcher_logo_foreground.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/values/ic_launcher_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #FFFFFF
4 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-xxxhdpi/ic_foot_print_weis_neu2_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/4xmen/v2rayNG/HEAD/V2rayNG/app/src/main/res/mipmap-xxxhdpi/ic_foot_print_weis_neu2_round.png
--------------------------------------------------------------------------------
/V2rayNG/app/src/pre_release/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | v2rayNG (PR)
4 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/config.yml:
--------------------------------------------------------------------------------
1 | blank_issues_enabled: false
2 | contact_links:
3 | - name: V2Ray程序问题
4 | url: https://github.com/v2fly/v2ray-core/
5 | about: 如果您有V2Ray而非v2rayNG的问题,请至这个链接讨论。
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/values/attrs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/values-night/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #127C97
4 | #252525
5 | #CCCCCC
6 |
7 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/kotlin/com/v2ray/ang/dto/ServersCache.kt:
--------------------------------------------------------------------------------
1 | package com.v2ray.ang.dto
2 |
3 | data class ServersCache(
4 | val guid: String,
5 | val config: ServerConfig,
6 | var tapUsage: String = "Tap To Update",
7 | var tapExpire: String = "Tap To Update"
8 | )
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/layout/activity_none.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/V2rayNG/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Sun Jun 21 12:33:19 CST 2020
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
7 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/kotlin/com/v2ray/ang/dto/ERoutingMode.kt:
--------------------------------------------------------------------------------
1 | package com.v2ray.ang.dto
2 |
3 | enum class ERoutingMode(val value: String ) {
4 | GLOBAL_PROXY("0"),
5 | BYPASS_LAN("1"),
6 | BYPASS_MAINLAND("2"),
7 | BYPASS_LAN_MAINLAND("3"),
8 | GLOBAL_DIRECT("4");
9 | }
10 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/kotlin/com/v2ray/ang/dto/SubscriptionItem.kt:
--------------------------------------------------------------------------------
1 | package com.v2ray.ang.dto
2 |
3 | data class SubscriptionItem(
4 | var remarks: String = "",
5 | var url: String = "",
6 | var enabled: Boolean = true,
7 | val addedTime: Long = System.currentTimeMillis()) {
8 | }
9 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/drawable/ic_shortcut_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/V2rayNG/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 | plugins {
3 | id 'com.android.application' version '7.4.2' apply false
4 | id 'com.android.library' version '7.4.2' apply false
5 | id 'org.jetbrains.kotlin.android' version '1.8.0' apply false
6 | }
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/kotlin/com/v2ray/ang/service/ServiceControl.kt:
--------------------------------------------------------------------------------
1 | package com.v2ray.ang.service
2 |
3 | import android.app.Service
4 |
5 | interface ServiceControl {
6 | fun getService(): Service
7 |
8 | fun startService()
9 |
10 | fun stopService()
11 |
12 | fun vpnProtect(socket: Int): Boolean
13 | }
14 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/anim/fade_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-anydpi-v26/ic_foot_print.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/xml/app_widget_provider.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/anim/fade_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-anydpi-v26/ic_foot_print_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-anydpi-v26/ic_launcher_logo.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/drawable/ic_rounded_corner_theme.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-anydpi-v26/ic_launcher_logo_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/kotlin/com/v2ray/ang/dto/AppInfo.kt:
--------------------------------------------------------------------------------
1 | package com.v2ray.ang.dto
2 |
3 | import android.graphics.drawable.Drawable
4 |
5 | data class AppInfo(val appName: String,
6 | val packageName: String,
7 | val appIcon: Drawable,
8 | val isSystemApp: Boolean,
9 | var isSelected: Int)
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-anydpi-v26/ic_foot_print_eins.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-anydpi-v26/ic_foot_print_weis.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-anydpi-v26/ic_foot_print_zwei.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-anydpi-v26/ic_foot_print_eins_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-anydpi-v26/ic_foot_print_weis_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-anydpi-v26/ic_foot_print_zwei_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/V2rayNG/gradle.properties:
--------------------------------------------------------------------------------
1 |
2 | buildToolsVer=33.0.2
3 | compileSdkVer=33
4 | targetSdkVer=33
5 | kotlin.incremental=true
6 | android.useAndroidX=true
7 | android.enableJetifier=true
8 | kotlin.code.style=official
9 | android.nonTransitiveRClass=true
10 | org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
11 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-anydpi-v26/ic_foot_print_weis_neu.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/kotlin/com/v2ray/ang/dto/ServerAffiliationInfo.kt:
--------------------------------------------------------------------------------
1 | package com.v2ray.ang.dto
2 |
3 | data class ServerAffiliationInfo(var testDelayMillis: Long = 0L) {
4 | fun getTestDelayString(): String {
5 | if (testDelayMillis == 0L) {
6 | return ""
7 | }
8 | return testDelayMillis.toString() + "ms"
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/kotlin/com/v2ray/ang/service/GetDateInterface.kt:
--------------------------------------------------------------------------------
1 | package com.v2ray.ang.service
2 |
3 | import retrofit2.Call
4 | import retrofit2.http.Body
5 | import retrofit2.http.POST
6 |
7 | interface ApiService {
8 | @POST("cpsess7945419007/frontend/jupiter/api/v1/getData")
9 | fun login(@Body request: GetDataRequest): Call
10 | }
11 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/drawable-xxhdpi/side_nav_bar.xml:
--------------------------------------------------------------------------------
1 |
3 |
9 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/drawable/ic_rounded_corner_grey.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-anydpi-v26/ic_foot_print_weis_neu2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-anydpi-v26/ic_foot_print_weis_neu_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-anydpi-v26/ic_foot_print_weis_neu2_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-anydpi-v26/ic_banner.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/drawable/ic_fab_check.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/drawable/ic_add_white_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/values-sw360dp-v13/values-preference.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | false
4 | 0dp
5 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/color/color_highlight_material.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/drawable/ic_action_done.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/test/java/com/v2ray/ang/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.v2ray.ang;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.assertEquals;
6 |
7 | /**
8 | * To work on unit tests, switch the Test Artifact in the Build Variants view.
9 | */
10 | public class ExampleUnitTest {
11 | @Test
12 | public void addition_isCorrect() throws Exception {
13 | assertEquals(4, 2 + 2);
14 | }
15 | }
--------------------------------------------------------------------------------
/V2rayNG/settings.gradle:
--------------------------------------------------------------------------------
1 | pluginManagement {
2 | repositories {
3 | gradlePluginPortal()
4 | google()
5 | mavenCentral()
6 | }
7 | }
8 | dependencyResolutionManagement {
9 | repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
10 | repositories {
11 | google()
12 | mavenCentral()
13 | jcenter()
14 | }
15 | }
16 | rootProject.name = "V2rayNG"
17 | include ':app'
18 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/androidTest/java/com/v2ray/ang/ApplicationTest.java:
--------------------------------------------------------------------------------
1 | package com.v2ray.ang;
2 |
3 | import android.app.Application;
4 | import android.test.ApplicationTestCase;
5 |
6 | /**
7 | * Testing Fundamentals
8 | */
9 | public class ApplicationTest extends ApplicationTestCase {
10 | public ApplicationTest() {
11 | super(Application.class);
12 | }
13 | }
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/drawable/ic_info_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/layout/activity_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/layout/nav_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/drawable/ic_image_photo.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/drawable/ic_feedback_white_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/kotlin/com/v2ray/ang/dto/EConfigType.kt:
--------------------------------------------------------------------------------
1 | package com.v2ray.ang.dto
2 |
3 | enum class EConfigType(val value: Int, val protocolScheme: String) {
4 | VMESS(1, "vmess://"),
5 | CUSTOM(2, ""),
6 | SHADOWSOCKS(3, "ss://"),
7 | SOCKS(4, "socks://"),
8 | VLESS(5, "vless://"),
9 | TROJAN(6, "trojan://"),
10 | WIREGUARD(7, "wireguard://");
11 |
12 | companion object {
13 | fun fromInt(value: Int) = values().firstOrNull { it.value == value }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/drawable/ic_close_grey_800_24dp.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/drawable/ic_copy_white.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/drawable/ic_outline_filter_alt_white_24.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/drawable/ic_description_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/drawable/ic_description_white_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/drawable/ic_edit_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/drawable/ic_save_white_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/drawable/ic_subscriptions_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/drawable/ic_subscriptions_white_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug_cn.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: v2rayNG程序问题
3 | about: 创建一个报告来帮助我们改进
4 | ---
5 |
6 | 在提出问题前请先自行排除服务器端问题,同时也请通过搜索确认是否有人提出过相同问题。
7 |
8 |
9 | ### 预期行为
10 | 描述你认为应该发生什么
11 |
12 | ### 实际行为
13 | 描述实际发生了什么
14 |
15 | ### 复现方法
16 | 1.
17 | 2.
18 | 3.
19 |
20 | ### 日志信息
21 |
22 |
23 | 通过`adb logcat -s com.v2ray.ang GoLog V2rayConfigUtilGoLog Main`获取日志。请自行删减日志中可能出现的敏感信息。
24 |
25 | 如果问题可重现,建议先执行`adb logcat -c`清空系统日志再执行上述命令,再操作重现问题。
26 | ```
27 | 在这里粘贴日志
28 | ```
29 |
30 |
31 | ### 环境信息
32 |
33 | ### 额外信息(可选)
34 |
35 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/drawable/ic_cloud_download_white_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/drawable/ic_logcat_white_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/drawable/baseline_calendar_month_24.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/menu/menu_scanner.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/drawable/ic_delete_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/drawable/ic_delete_white_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/layout/preference_with_help_link.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/drawable/ic_qu_switch_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
17 |
18 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/menu/menu_logcat.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/layout/item_qrcode.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
15 |
16 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/FragmentAdapter.kt:
--------------------------------------------------------------------------------
1 | package com.v2ray.ang.ui
2 |
3 | import androidx.fragment.app.Fragment
4 | import androidx.fragment.app.FragmentActivity
5 | import androidx.viewpager2.adapter.FragmentStateAdapter
6 |
7 | class FragmentAdapter(fragmentActivity: FragmentActivity, private val mFragments: List) :
8 | FragmentStateAdapter(fragmentActivity) {
9 |
10 | override fun createFragment(position: Int): Fragment {
11 | return mFragments[position]
12 | }
13 |
14 | override fun getItemCount(): Int {
15 | return mFragments.size
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/menu/action_server.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/menu/menu_asset.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/kotlin/com/v2ray/ang/service/ApiUpdate.kt:
--------------------------------------------------------------------------------
1 | package com.v2ray.ang.service
2 |
3 | import com.google.gson.annotations.SerializedName
4 |
5 | data class GetDataRequest(val email: String, val password: String)
6 |
7 | data class GetDataResponse(
8 | val success: Boolean,
9 | val msg: String,
10 | val obj: GetDataResponseObject
11 | )
12 |
13 | data class GetDataResponseObject(
14 | val id: Int,
15 | @SerializedName("inboundId")
16 | val inboundID: Int,
17 | val enable: Boolean,
18 | val email: String,
19 | val up: Long,
20 | val down: Long,
21 | val expiryTime: Long,
22 | val total: Long
23 | )
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/drawable/baseline_data_usage_24.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/layout/nav_toolbar.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/drawable/baseline_data_usage_24_neu.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/layout/widget_switch.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
15 |
16 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/values-night/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
14 |
15 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/drawable/ic_whatshot_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/drawable/ic_whatshot_white_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/ScSwitchActivity.kt:
--------------------------------------------------------------------------------
1 | package com.v2ray.ang.ui
2 |
3 | import com.v2ray.ang.R
4 | import com.v2ray.ang.util.Utils
5 | import android.os.Bundle
6 | import com.v2ray.ang.service.V2RayServiceManager
7 |
8 | class ScSwitchActivity : BaseActivity() {
9 | override fun onCreate(savedInstanceState: Bundle?) {
10 | super.onCreate(savedInstanceState)
11 | moveTaskToBack(true)
12 |
13 | setContentView(R.layout.activity_none)
14 |
15 | if (V2RayServiceManager.v2rayPoint.isRunning) {
16 | Utils.stopVService(this)
17 | } else {
18 | Utils.startVServiceFromToggle(this)
19 | }
20 | finish()
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/assets/custom_routing_proxy:
--------------------------------------------------------------------------------
1 | geosite:google,
2 | geosite:github,
3 | geosite:netflix,
4 | geosite:steam,
5 | geosite:telegram,
6 | geosite:tumblr,
7 | geosite:speedtest,
8 | geosite:bbc,
9 | domain:gvt1.com,
10 | domain:textnow.com,
11 | domain:twitch.tv,
12 | domain:wikileaks.org,
13 | domain:naver.com,
14 | 91.108.4.0/22,
15 | 91.108.8.0/22,
16 | 91.108.12.0/22,
17 | 91.108.20.0/22,
18 | 91.108.36.0/23,
19 | 91.108.38.0/23,
20 | 91.108.56.0/22,
21 | 149.154.160.0/20,
22 | 149.154.164.0/22,
23 | 149.154.172.0/22,
24 | 74.125.0.0/16,
25 | 173.194.0.0/16,
26 | 172.217.0.0/16,
27 | 216.58.200.0/24,
28 | 216.58.220.0/24,
29 | 91.108.56.116,
30 | 91.108.56.0/24,
31 | 109.239.140.0/24,
32 | 149.154.167.0/24,
33 | 149.154.175.0/24,
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/layout/activity_routing_settings.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
11 |
12 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/drawable/ic_attach_money_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/drawable/ic_attach_money_white_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/drawable/ic_select_all_white_24dp.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 50dp
4 | 16dp
5 | 16dp
6 | 8dp
7 | 50dp
8 | 24dp
9 | 120dp
10 | 60dp
11 |
12 | 16dp
13 | 16dp
14 | 8dp
15 | 160dp
16 |
17 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/drawable/ic_share_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/drawable/ic_share_white_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/kotlin/com/v2ray/ang/dto/VmessQRCode.kt:
--------------------------------------------------------------------------------
1 | package com.v2ray.ang.dto
2 |
3 | data class VmessQRCode(var v: String = "",
4 | var ps: String = "",
5 | var add: String = "",
6 | var port: String = "",
7 | var id: String = "",
8 | var aid: String = "0",
9 | var scy: String = "",
10 | var net: String = "",
11 | var type: String = "",
12 | var host: String = "",
13 | var path: String = "",
14 | var tls: String = "",
15 | var sni: String = "",
16 | var alpn: String = "",
17 | var fp: String = "")
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/menu/action_sub_setting.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #009966
4 | #FF0099
5 | #247BA0
6 | #008080
7 | #999999
8 | #CFD8DC
9 | #212121
10 |
11 |
12 |
13 | #2B2B2B
14 | #161616
15 | #D81B60
16 | #FFFFFF
17 | #000000
18 |
19 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/drawable/ic_scan_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
10 |
14 |
19 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/drawable/ic_qu_scan_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
10 |
14 |
19 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/drawable/round_update_24.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/AndroidLibV2rayLite/README.md:
--------------------------------------------------------------------------------
1 | # AndroidLibV2rayLite
2 |
3 | ### Preparation
4 | - latest Ubuntu environment
5 | - At lease 30G free space
6 | - Get Repo [AndroidLibV2rayLite](https://github.com/2dust/AndroidLibV2rayLite) or [AndroidLibXrayLite](https://github.com/2dust/AndroidLibXrayLite)
7 | ### Prepare Go
8 | - Go to https://golang.org/doc/install and install latest go
9 | - Make sure `go version` works as expected
10 | ### Prepare gomobile
11 | - Go to https://pkg.go.dev/golang.org/x/mobile/cmd/gomobile and install gomobile
12 | - export PATH=$PATH:~/go/bin
13 | - Make sure `gomobile init` works as expected
14 | ### Prepare NDK
15 | - Go to https://developer.android.com/ndk/downloads and install latest NDK
16 | - export PATH=$PATH:
17 | - Make sure `ndk-build -v` works as expected
18 | ### Make
19 | - sudo apt install make
20 | - Read and understand [build script](https://github.com/2dust/AndroidLibV2rayLite/blob/master/Makefile)
21 |
--------------------------------------------------------------------------------
/CR.md:
--------------------------------------------------------------------------------
1 | v2rayNG 隐私条款
2 |
3 | 最后更新 2017-11-22
4 |
5 | v2rayNG 尊重并保护所有用户的个人隐私权,为此我们向大众公开这份隐私条款。**您使用 v2rayNG 即代表您以阅读并同意了这份条款,如果您不同意这份条款请立即停止使用并卸载 v2rayNG。**
6 |
7 | 1. 信息收集
8 |
9 | v2rayNG 软件自身不会发送任何信息到开发者,但是您下载软件的应用市场(如 Google Play)可能会收集关于应用运行状态的相关信息并提供给 v2rayNG 开发者。有关这些信息,请阅读您使用的应用市场所提供的隐私条款。
10 |
11 | v2rayNG 软件中可能包含需要通过 IAP 支付解锁的功能,您的支付信息将由相关的 IAP 渠道进行处理,而我们对支付信息没有访问权。
12 |
13 | 当您向 v2rayNG 开发者反馈软件运行中的错误时,开发者可能会要求您提供软件以及系统的日志以帮助确认问题的原因。因日志中可能包括敏感信息,此类信息只能由您自己操作发送。**我们不对任何传输服务的安全性和隐私性做任何明示或暗示的担保,请您在传送相关信息时选择可以您自身可以接受的方式。**
14 |
15 | 2. 信息共享
16 |
17 | 我们不会向任何第三方出售收集到的用户数据。我们可能向外部开发者提供信息以协助软件的开发,但是在提供信息之前我们会传达相关保密义务并确定其可以遵守。
18 |
19 | 3. 信息存留
20 |
21 | 除非有相关法律规定,我们会在 30 天内清除不需要继续使用的用户数据,或将统计数据整合为无法识别单个用户的综合报告。
22 |
23 | 4. 信息泄露
24 |
25 | 我们会使用合理的技术和安全手段尽力保护用户的数据,但是无法保证数据的绝对安全。如果我们确认数据发生了泄露,我们会在 7 天内通过可用的渠道通知用户。**您同意不向我们追责任何因不可抗力而造成的损失。**
26 |
27 | 5. 条款修改
28 |
29 | 我们保留修改这份隐私条款的权利,但是会确保在更新条款前至少 30 天通过我们的可用渠道和应用内提示来通知用户。**在新条款生效后继续使用软件即表示您同意修改后的隐私条款。**
30 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/BaseActivity.kt:
--------------------------------------------------------------------------------
1 | package com.v2ray.ang.ui
2 |
3 | import android.content.Context
4 | import android.os.Build
5 | import android.view.MenuItem
6 | import androidx.annotation.RequiresApi
7 | import androidx.appcompat.app.AppCompatActivity
8 | import com.v2ray.ang.util.MyContextWrapper
9 | import com.v2ray.ang.util.Utils
10 |
11 | abstract class BaseActivity : AppCompatActivity() {
12 | override fun onOptionsItemSelected(item: MenuItem) = when (item.itemId) {
13 | android.R.id.home -> {
14 | onBackPressed()
15 | true
16 | }
17 | else -> super.onOptionsItemSelected(item)
18 | }
19 |
20 | @RequiresApi(Build.VERSION_CODES.N)
21 | override fun attachBaseContext(newBase: Context?) {
22 | val context = newBase?.let {
23 | MyContextWrapper.wrap(newBase, Utils.getLocale(newBase))
24 | }
25 | super.attachBaseContext(context)
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/kotlin/com/v2ray/ang/AngApplication.kt:
--------------------------------------------------------------------------------
1 | package com.v2ray.ang
2 |
3 | import androidx.multidex.MultiDexApplication
4 | import androidx.preference.PreferenceManager
5 | import com.tencent.mmkv.MMKV
6 |
7 | class AngApplication : MultiDexApplication() {
8 | companion object {
9 | const val PREF_LAST_VERSION = "pref_last_version"
10 | }
11 |
12 | var firstRun = false
13 | private set
14 |
15 | override fun onCreate() {
16 | super.onCreate()
17 |
18 | // LeakCanary.install(this)
19 |
20 | val defaultSharedPreferences = PreferenceManager.getDefaultSharedPreferences(this)
21 | firstRun = defaultSharedPreferences.getInt(PREF_LAST_VERSION, 0) != BuildConfig.VERSION_CODE
22 | if (firstRun)
23 | defaultSharedPreferences.edit().putInt(PREF_LAST_VERSION, BuildConfig.VERSION_CODE).apply()
24 |
25 | //Logger.init().logLevel(if (BuildConfig.DEBUG) LogLevel.FULL else LogLevel.NONE)
26 | MMKV.initialize(this)
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/layout/activity_sub_setting.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
10 |
11 |
15 |
16 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/menu/menu_routing.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/java/com/v2ray/ang/helper/OnStartDragListener.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2015 Paul Burke
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.v2ray.ang.helper;
18 |
19 | import androidx.recyclerview.widget.RecyclerView;
20 |
21 | /**
22 | * Listener for manual initiation of a drag.
23 | */
24 | public interface OnStartDragListener {
25 |
26 | /**
27 | * Called when a view is requesting a start of a drag.
28 | *
29 | * @param viewHolder The holder of the view to drag.
30 | */
31 | void onStartDrag(RecyclerView.ViewHolder viewHolder);
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/drawable/ic_settings_white_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/drawable/ic_file_white_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
13 |
20 |
27 |
34 |
35 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/layout/item_recycler_footer.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
16 |
17 |
23 |
24 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/kotlin/com/v2ray/ang/util/MyContextWrapper.kt:
--------------------------------------------------------------------------------
1 | package com.v2ray.ang.util
2 |
3 | import android.content.Context
4 | import android.content.ContextWrapper
5 | import android.content.res.Configuration
6 | import android.content.res.Resources
7 | import android.os.Build
8 | import android.os.LocaleList
9 | import androidx.annotation.RequiresApi
10 | import java.util.*
11 |
12 | open class MyContextWrapper(base: Context?) : ContextWrapper(base) {
13 | companion object {
14 | @RequiresApi(Build.VERSION_CODES.N)
15 | fun wrap(context: Context, newLocale: Locale?): ContextWrapper {
16 | var mContext = context
17 | val res: Resources = mContext.resources
18 | val configuration: Configuration = res.configuration
19 | //注意 Android 7.0 前后的不同处理方法
20 | mContext = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
21 | configuration.setLocale(newLocale)
22 | val localeList = LocaleList(newLocale)
23 | LocaleList.setDefault(localeList)
24 | configuration.setLocales(localeList)
25 | mContext.createConfigurationContext(configuration)
26 | } else {
27 | configuration.setLocale(newLocale)
28 | mContext.createConfigurationContext(configuration)
29 | }
30 | return ContextWrapper(mContext)
31 | }
32 | }
33 | }
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/menu/menu_bypass_list.xml:
--------------------------------------------------------------------------------
1 |
2 |
35 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/java/com/v2ray/ang/helper/ItemTouchHelperViewHolder.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2015 Paul Burke
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.v2ray.ang.helper;
18 |
19 | import androidx.recyclerview.widget.ItemTouchHelper;
20 |
21 | /**
22 | * Interface to notify an item ViewHolder of relevant callbacks from {@link
23 | * ItemTouchHelper.Callback}.
24 | *
25 | * @author Paul Burke (ipaulpro)
26 | */
27 | public interface ItemTouchHelperViewHolder {
28 |
29 | /**
30 | * Called when the {@link ItemTouchHelper} first registers an item as being moved or swiped.
31 | * Implementations should update the item view to indicate it's active state.
32 | */
33 | void onItemSelected();
34 |
35 |
36 | /**
37 | * Called when the {@link ItemTouchHelper} has completed the move or swipe, and the active item
38 | * state should be cleared.
39 | */
40 | void onItemClear();
41 | }
42 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/test/kotlin/com/v2ray/ang/ExampleUnitTest.kt:
--------------------------------------------------------------------------------
1 | import org.junit.Assert.*
2 | import org.junit.Test
3 | import com.v2ray.ang.util.Utils
4 |
5 | class UtilTest {
6 |
7 | @Test
8 | fun test_parseInt() {
9 | assertEquals(Utils.parseInt("1234"), 1234)
10 | }
11 |
12 | @Test
13 | fun test_isIpAddress() {
14 | assertFalse(Utils.isIpAddress("114.113.112.266"))
15 | assertFalse(Utils.isIpAddress("666.666.666.666"))
16 | assertFalse(Utils.isIpAddress("256.0.0.0" ))
17 | assertFalse(Utils.isIpAddress("::ffff:127.0.0.0.1" ))
18 | assertFalse(Utils.isIpAddress("baidu.com"))
19 | assertFalse(Utils.isIpAddress(""))
20 |
21 | assertTrue(Utils.isIpAddress("127.0.0.1" ))
22 | assertTrue(Utils.isIpAddress("127.0.0.1:80" ))
23 | assertTrue(Utils.isIpAddress("::1" ))
24 | assertTrue(Utils.isIpAddress("[::1]:80" ))
25 | assertTrue(Utils.isIpAddress("2605:2700:0:3::4713:93e3" ))
26 | assertTrue(Utils.isIpAddress("[2605:2700:0:3::4713:93e3]:80" ))
27 | assertTrue(Utils.isIpAddress("::ffff:192.168.173.22" ))
28 | assertTrue(Utils.isIpAddress("[::ffff:192.168.173.22]:80" ))
29 | assertTrue(Utils.isIpAddress("1::" ))
30 | assertTrue(Utils.isIpAddress("::" ))
31 | assertTrue(Utils.isIpAddress("10.24.56.0/24" ))
32 | assertTrue(Utils.isIpAddress("2001:4321::1" ))
33 | assertTrue(Utils.isIpAddress("240e:1234:abcd:12::6666" ))
34 | assertTrue(Utils.isIpAddress("240e:1234:abcd:12::/64" ))
35 | }
36 | }
37 |
38 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/layout/activity_logcat.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
16 |
17 |
27 |
28 |
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/kotlin/com/v2ray/ang/dto/AngConfig.kt:
--------------------------------------------------------------------------------
1 | package com.v2ray.ang.dto
2 |
3 | data class AngConfig(
4 | var index: Int,
5 | var vmess: ArrayList,
6 | var subItem: ArrayList
7 | ) {
8 | data class VmessBean(var guid: String = "123456",
9 | var address: String = "v2ray.cool",
10 | var port: Int = 10086,
11 | var id: String = "a3482e88-686a-4a58-8126-99c9df64b7bf",
12 | var alterId: Int = 64,
13 | var security: String = "aes-128-cfb",
14 | var network: String = "tcp",
15 | var remarks: String = "def",
16 | var headerType: String = "",
17 | var requestHost: String = "",
18 | var path: String = "",
19 | var streamSecurity: String = "",
20 | var allowInsecure: String = "",
21 | var configType: Int = 1,
22 | var configVersion: Int = 1,
23 | var testResult: String = "",
24 | var subid: String = "",
25 | var flow: String = "",
26 | var sni: String = "")
27 |
28 | data class SubItemBean(var id: String = "",
29 | var remarks: String = "",
30 | var url: String = "",
31 | var enabled: Boolean = true)
32 | }
33 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/layout/fragment_routing_settings.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
10 |
11 |
17 |
18 |
23 |
24 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/kotlin/com/v2ray/ang/receiver/TaskerReceiver.kt:
--------------------------------------------------------------------------------
1 | package com.v2ray.ang.receiver
2 |
3 | import android.content.BroadcastReceiver
4 | import android.content.Context
5 | import android.content.Intent
6 | import android.text.TextUtils
7 | import com.tencent.mmkv.MMKV
8 | import com.v2ray.ang.AppConfig
9 | import com.v2ray.ang.service.V2RayServiceManager
10 | import com.v2ray.ang.util.MmkvManager
11 |
12 | import com.v2ray.ang.util.Utils
13 |
14 | class TaskerReceiver : BroadcastReceiver() {
15 | private val mainStorage by lazy { MMKV.mmkvWithID(MmkvManager.ID_MAIN, MMKV.MULTI_PROCESS_MODE) }
16 |
17 | override fun onReceive(context: Context, intent: Intent?) {
18 |
19 | try {
20 | val bundle = intent?.getBundleExtra(AppConfig.TASKER_EXTRA_BUNDLE)
21 | val switch = bundle?.getBoolean(AppConfig.TASKER_EXTRA_BUNDLE_SWITCH, false)
22 | val guid = bundle?.getString(AppConfig.TASKER_EXTRA_BUNDLE_GUID, "")
23 |
24 | if (switch == null || guid == null || TextUtils.isEmpty(guid)) {
25 | return
26 | } else if (switch) {
27 | if (guid == AppConfig.TASKER_DEFAULT_GUID) {
28 | Utils.startVServiceFromToggle(context)
29 | } else {
30 | mainStorage?.encode(MmkvManager.KEY_SELECTED_SERVER, guid)
31 | V2RayServiceManager.startV2Ray(context)
32 | }
33 | } else {
34 | Utils.stopVService(context)
35 | }
36 | } catch (e: Exception) {
37 | e.printStackTrace()
38 | }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/kotlin/com/v2ray/ang/util/MessageUtil.kt:
--------------------------------------------------------------------------------
1 | package com.v2ray.ang.util
2 |
3 | import android.content.ComponentName
4 | import android.content.Context
5 | import android.content.Intent
6 | import com.v2ray.ang.AppConfig
7 | import com.v2ray.ang.service.V2RayTestService
8 | import java.io.Serializable
9 |
10 |
11 | object MessageUtil {
12 |
13 | fun sendMsg2Service(ctx: Context, what: Int, content: Serializable) {
14 | sendMsg(ctx, AppConfig.BROADCAST_ACTION_SERVICE, what, content)
15 | }
16 |
17 | fun sendMsg2UI(ctx: Context, what: Int, content: Serializable) {
18 | sendMsg(ctx, AppConfig.BROADCAST_ACTION_ACTIVITY, what, content)
19 | }
20 |
21 | fun sendMsg2TestService(ctx: Context, what: Int, content: Serializable) {
22 | try {
23 | val intent = Intent()
24 | intent.component = ComponentName(ctx, V2RayTestService::class.java)
25 | intent.putExtra("key", what)
26 | intent.putExtra("content", content)
27 | ctx.startService(intent)
28 | } catch (e: Exception) {
29 | e.printStackTrace()
30 | }
31 | }
32 |
33 | private fun sendMsg(ctx: Context, action: String, what: Int, content: Serializable) {
34 | try {
35 | val intent = Intent()
36 | intent.action = action
37 | intent.`package` = AppConfig.ANG_PACKAGE
38 | intent.putExtra("key", what)
39 | intent.putExtra("content", content)
40 | ctx.sendBroadcast(intent)
41 | } catch (e: Exception) {
42 | e.printStackTrace()
43 | }
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/ScScannerActivity.kt:
--------------------------------------------------------------------------------
1 | package com.v2ray.ang.ui
2 |
3 | import android.Manifest
4 | import android.content.*
5 | import com.tbruyelle.rxpermissions.RxPermissions
6 | import com.v2ray.ang.R
7 | import com.v2ray.ang.util.AngConfigManager
8 | import android.os.Bundle
9 | import androidx.activity.result.contract.ActivityResultContracts
10 | import com.v2ray.ang.extension.toast
11 |
12 | class ScScannerActivity : BaseActivity() {
13 |
14 | override fun onCreate(savedInstanceState: Bundle?) {
15 | super.onCreate(savedInstanceState)
16 | setContentView(R.layout.activity_none)
17 | importQRcode()
18 | }
19 |
20 | fun importQRcode(): Boolean {
21 | RxPermissions(this)
22 | .request(Manifest.permission.CAMERA)
23 | .subscribe {
24 | if (it)
25 | scanQRCode.launch(Intent(this, ScannerActivity::class.java))
26 | else
27 | toast(R.string.toast_permission_denied)
28 | }
29 |
30 | return true
31 | }
32 |
33 | private val scanQRCode = registerForActivityResult(ActivityResultContracts.StartActivityForResult()) {
34 | if (it.resultCode == RESULT_OK) {
35 | val count = AngConfigManager.importBatchConfig(it.data?.getStringExtra("SCAN_RESULT"), "", false)
36 | if (count > 0) {
37 | toast(R.string.toast_success)
38 | } else {
39 | toast(R.string.toast_failure)
40 | }
41 | startActivity(Intent(this, MainActivity::class.java))
42 | }
43 | finish()
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/kotlin/com/v2ray/ang/service/V2RayProxyOnlyService.kt:
--------------------------------------------------------------------------------
1 | package com.v2ray.ang.service
2 |
3 | import android.app.Service
4 | import android.content.Context
5 | import android.content.Intent
6 | import android.os.Build
7 | import android.os.IBinder
8 | import androidx.annotation.RequiresApi
9 | import com.v2ray.ang.util.MyContextWrapper
10 | import com.v2ray.ang.util.Utils
11 | import java.lang.ref.SoftReference
12 |
13 | class V2RayProxyOnlyService : Service(), ServiceControl {
14 | override fun onCreate() {
15 | super.onCreate()
16 | V2RayServiceManager.serviceControl = SoftReference(this)
17 | }
18 |
19 | override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
20 | V2RayServiceManager.startV2rayPoint()
21 | return START_STICKY
22 | }
23 |
24 | override fun onDestroy() {
25 | super.onDestroy()
26 | V2RayServiceManager.stopV2rayPoint()
27 | }
28 |
29 | override fun getService(): Service {
30 | return this
31 | }
32 |
33 | override fun startService() {
34 | // do nothing
35 | }
36 |
37 | override fun stopService() {
38 | stopSelf()
39 | }
40 |
41 | override fun vpnProtect(socket: Int): Boolean {
42 | return true
43 | }
44 |
45 | override fun onBind(intent: Intent?): IBinder? {
46 | return null
47 | }
48 |
49 | @RequiresApi(Build.VERSION_CODES.N)
50 | override fun attachBaseContext(newBase: Context?) {
51 | val context = newBase?.let {
52 | MyContextWrapper.wrap(newBase, Utils.getLocale(newBase))
53 | }
54 | super.attachBaseContext(context)
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/kotlin/com/v2ray/ang/util/AppManagerUtil.kt:
--------------------------------------------------------------------------------
1 | package com.v2ray.ang.util
2 |
3 | import android.Manifest
4 | import android.content.Context
5 | import android.content.pm.ApplicationInfo
6 | import android.content.pm.PackageInfo
7 | import android.content.pm.PackageManager
8 | import com.v2ray.ang.dto.AppInfo
9 | import rx.Observable
10 | import java.util.*
11 |
12 | object AppManagerUtil {
13 | fun loadNetworkAppList(ctx: Context): ArrayList {
14 | val packageManager = ctx.packageManager
15 | val packages = packageManager.getInstalledPackages(PackageManager.GET_PERMISSIONS)
16 | val apps = ArrayList()
17 |
18 | for (pkg in packages) {
19 | if (!pkg.hasInternetPermission && pkg.packageName != "android") continue
20 |
21 | val applicationInfo = pkg.applicationInfo
22 |
23 | val appName = applicationInfo.loadLabel(packageManager).toString()
24 | val appIcon = applicationInfo.loadIcon(packageManager)
25 | val isSystemApp = (applicationInfo.flags and ApplicationInfo.FLAG_SYSTEM) > 0
26 |
27 | val appInfo = AppInfo(appName, pkg.packageName, appIcon, isSystemApp, 0)
28 | apps.add(appInfo)
29 | }
30 |
31 | return apps
32 | }
33 |
34 | fun rxLoadNetworkAppList(ctx: Context): Observable> = Observable.unsafeCreate {
35 | it.onNext(loadNetworkAppList(ctx))
36 | }
37 |
38 | val PackageInfo.hasInternetPermission: Boolean
39 | get() {
40 | val permissions = requestedPermissions
41 | return permissions?.any { it == Manifest.permission.INTERNET } ?: false
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/RoutingSettingsActivity.kt:
--------------------------------------------------------------------------------
1 | package com.v2ray.ang.ui
2 |
3 | import android.os.Bundle
4 | import com.v2ray.ang.R
5 | import androidx.fragment.app.Fragment
6 | import com.google.android.material.tabs.TabLayoutMediator
7 | import com.v2ray.ang.AppConfig
8 | import com.v2ray.ang.databinding.ActivityRoutingSettingsBinding
9 |
10 | class RoutingSettingsActivity : BaseActivity() {
11 | private lateinit var binding: ActivityRoutingSettingsBinding
12 |
13 | private val titles: Array by lazy {
14 | resources.getStringArray(R.array.routing_tag)
15 | }
16 |
17 | override fun onCreate(savedInstanceState: Bundle?) {
18 | super.onCreate(savedInstanceState)
19 | binding = ActivityRoutingSettingsBinding.inflate(layoutInflater)
20 | val view = binding.root
21 | setContentView(view)
22 |
23 | title = getString(R.string.title_pref_routing_custom)
24 | supportActionBar?.setDisplayHomeAsUpEnabled(true)
25 |
26 | val fragments = ArrayList()
27 | fragments.add(RoutingSettingsFragment().newInstance(AppConfig.PREF_V2RAY_ROUTING_AGENT))
28 | fragments.add(RoutingSettingsFragment().newInstance(AppConfig.PREF_V2RAY_ROUTING_DIRECT))
29 | fragments.add(RoutingSettingsFragment().newInstance(AppConfig.PREF_V2RAY_ROUTING_BLOCKED))
30 |
31 | val adapter = FragmentAdapter(this, fragments)
32 | binding.viewpager.adapter = adapter
33 | //tablayout.setTabTextColors(Color.BLACK, Color.RED)
34 | TabLayoutMediator(binding.tablayout, binding.viewpager) { tab, position ->
35 | tab.text = titles[position]
36 | }.attach()
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/menu/menu_drawer.xml:
--------------------------------------------------------------------------------
1 |
2 |
42 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/layout/dialog_config_filter.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
11 |
12 |
17 |
18 |
22 |
23 |
24 |
25 |
30 |
31 |
35 |
36 |
41 |
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/kotlin/com/v2ray/ang/service/V2RayTestService.kt:
--------------------------------------------------------------------------------
1 | package com.v2ray.ang.service
2 |
3 | import android.app.Service
4 | import android.content.Intent
5 | import android.os.IBinder
6 | import com.v2ray.ang.AppConfig.MSG_MEASURE_CONFIG
7 | import com.v2ray.ang.AppConfig.MSG_MEASURE_CONFIG_CANCEL
8 | import com.v2ray.ang.AppConfig.MSG_MEASURE_CONFIG_SUCCESS
9 | import com.v2ray.ang.util.MessageUtil
10 | import com.v2ray.ang.util.SpeedtestUtil
11 | import com.v2ray.ang.util.Utils
12 | import go.Seq
13 | import kotlinx.coroutines.*
14 | import libv2ray.Libv2ray
15 | import java.util.concurrent.Executors
16 |
17 | class V2RayTestService : Service() {
18 | private val realTestScope by lazy { CoroutineScope(Executors.newFixedThreadPool(10).asCoroutineDispatcher()) }
19 |
20 | override fun onCreate() {
21 | super.onCreate()
22 | Seq.setContext(this)
23 | Libv2ray.initV2Env(Utils.userAssetPath(this))
24 | }
25 |
26 | override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
27 | when (intent?.getIntExtra("key", 0)) {
28 | MSG_MEASURE_CONFIG -> {
29 | val contentPair = intent.getSerializableExtra("content") as Pair
30 | realTestScope.launch {
31 | val result = SpeedtestUtil.realPing(contentPair.second)
32 | MessageUtil.sendMsg2UI(this@V2RayTestService, MSG_MEASURE_CONFIG_SUCCESS, Pair(contentPair.first, result))
33 | }
34 | }
35 | MSG_MEASURE_CONFIG_CANCEL -> {
36 | realTestScope.coroutineContext[Job]?.cancelChildren()
37 | }
38 | }
39 | return super.onStartCommand(intent, flags, startId)
40 | }
41 |
42 | override fun onBind(intent: Intent?): IBinder? {
43 | return null
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/UrlSchemeActivity.kt:
--------------------------------------------------------------------------------
1 | package com.v2ray.ang.ui
2 |
3 | import android.content.Intent
4 | import android.net.Uri
5 | import android.os.Bundle
6 | import com.v2ray.ang.R
7 | import com.v2ray.ang.databinding.ActivityLogcatBinding
8 | import com.v2ray.ang.extension.toast
9 | import com.v2ray.ang.util.AngConfigManager
10 |
11 | class UrlSchemeActivity : BaseActivity() {
12 | private lateinit var binding: ActivityLogcatBinding
13 |
14 | override fun onCreate(savedInstanceState: Bundle?) {
15 | super.onCreate(savedInstanceState)
16 | binding = ActivityLogcatBinding.inflate(layoutInflater)
17 | val view = binding.root
18 | setContentView(view)
19 |
20 | var shareUrl: String = ""
21 | try {
22 | intent?.apply {
23 | when (action) {
24 | Intent.ACTION_SEND -> {
25 | if ("text/plain" == type) {
26 | intent.getStringExtra(Intent.EXTRA_TEXT)?.let {
27 | shareUrl = it
28 | }
29 | }
30 | }
31 | Intent.ACTION_VIEW -> {
32 | val uri: Uri? = intent.data
33 | shareUrl = uri?.getQueryParameter("url")!!
34 | }
35 | }
36 | }
37 | toast(shareUrl)
38 | val count = AngConfigManager.importBatchConfig(shareUrl, "", false)
39 | if (count > 0) {
40 | toast(R.string.toast_success)
41 | } else {
42 | toast(R.string.toast_failure)
43 | }
44 | startActivity(Intent(this, MainActivity::class.java))
45 | finish()
46 | } catch (e: Exception) {
47 | e.printStackTrace()
48 | }
49 | }
50 | }
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
12 |
13 |
17 |
18 |
19 |
25 |
26 |
31 |
32 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/layout/activity_tasker.xml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
12 |
13 |
21 |
22 |
32 |
33 |
34 |
35 |
40 |
41 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/SubSettingActivity.kt:
--------------------------------------------------------------------------------
1 | package com.v2ray.ang.ui
2 |
3 | import android.content.Intent
4 | import androidx.recyclerview.widget.LinearLayoutManager
5 | import android.view.Menu
6 | import android.view.MenuItem
7 | import com.v2ray.ang.R
8 | import android.os.Bundle
9 | import com.v2ray.ang.databinding.ActivitySubSettingBinding
10 | import com.v2ray.ang.dto.SubscriptionItem
11 | import com.v2ray.ang.util.MmkvManager
12 |
13 | class SubSettingActivity : BaseActivity() {
14 | private lateinit var binding: ActivitySubSettingBinding
15 |
16 | var subscriptions:List> = listOf()
17 | private val adapter by lazy { SubSettingRecyclerAdapter(this) }
18 |
19 | override fun onCreate(savedInstanceState: Bundle?) {
20 | super.onCreate(savedInstanceState)
21 | binding = ActivitySubSettingBinding.inflate(layoutInflater)
22 | val view = binding.root
23 | setContentView(view)
24 |
25 | title = getString(R.string.title_sub_setting)
26 |
27 | binding.recyclerView.setHasFixedSize(true)
28 | binding.recyclerView.layoutManager = LinearLayoutManager(this)
29 | binding.recyclerView.adapter = adapter
30 |
31 | supportActionBar?.setDisplayHomeAsUpEnabled(true)
32 | }
33 |
34 | override fun onResume() {
35 | super.onResume()
36 | subscriptions = MmkvManager.decodeSubscriptions()
37 | adapter.notifyDataSetChanged()
38 | }
39 |
40 | override fun onCreateOptionsMenu(menu: Menu): Boolean {
41 | menuInflater.inflate(R.menu.action_sub_setting, menu)
42 | menu.findItem(R.id.del_config)?.isVisible = false
43 | menu.findItem(R.id.save_config)?.isVisible = false
44 |
45 | return super.onCreateOptionsMenu(menu)
46 | }
47 |
48 | override fun onOptionsItemSelected(item: MenuItem) = when (item.itemId) {
49 | R.id.add_config -> {
50 | startActivity(Intent(this, SubEditActivity::class.java))
51 | true
52 | }
53 | else -> super.onOptionsItemSelected(item)
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/raw/licenses.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Android Compatibility Library v4
4 | http://source.android.com
5 | Copyright(C) 2008-2011 The Android Open Source Project
6 | Apache Software License 2.0
7 |
8 |
9 | Android Compatibility Library v7
10 | http://source.android.com
11 | Copyright(C) 2008-2011 The Android Open Source Project
12 | Apache Software License 2.0
13 |
14 |
15 | Android Design Library
16 | http://source.android.com
17 | Copyright(C) 2008-2011 The Android Open Source Project
18 | Apache Software License 2.0
19 |
20 |
21 | Google Gson
22 | https://github.com/google/gson
23 | Copyright 2008-2011 Google Inc.
24 | Apache Software License 2.0
25 |
26 |
27 | kotlin
28 | http://kotlinlang.org/
29 | Copyright 2010-2016 JetBrains s.r.o.
30 | Apache Software License 2.0
31 |
32 |
33 | Logger
34 | https://github.com/orhanobut/logger
35 | Copyright 2015 Orhan Obut
36 | Apache Software License 2.0
37 |
38 |
39 | LeakCanary
40 | https://github.com/square/leakcanary
41 | Copyright 2015 Square, Inc.
42 | Apache Software License 2.0
43 |
44 |
45 | RxPermissions
46 | https://github.com/tbruyelle/RxPermissions
47 | Apache Software License 2.0
48 |
49 |
50 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/layout/item_recycler_bypass_list.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
18 |
19 |
27 |
28 |
32 |
33 |
38 |
39 |
40 |
41 |
51 |
52 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/xml/shortcuts.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
10 |
11 |
15 |
16 |
17 |
24 |
25 |
29 |
30 |
31 |
38 |
39 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/assets/v2ray_config.json:
--------------------------------------------------------------------------------
1 | {
2 | "stats":{},
3 | "log": {
4 | "loglevel": "warning"
5 | },
6 | "policy":{
7 | "levels": {
8 | "8": {
9 | "handshake": 4,
10 | "connIdle": 300,
11 | "uplinkOnly": 1,
12 | "downlinkOnly": 1
13 | }
14 | },
15 | "system": {
16 | "statsOutboundUplink": true,
17 | "statsOutboundDownlink": true
18 | }
19 | },
20 | "inbounds": [{
21 | "tag": "socks",
22 | "port": 10808,
23 | "protocol": "socks",
24 | "settings": {
25 | "auth": "noauth",
26 | "udp": true,
27 | "userLevel": 8
28 | },
29 | "sniffing": {
30 | "enabled": true,
31 | "destOverride": [
32 | "http",
33 | "tls"
34 | ]
35 | }
36 | },
37 | {
38 | "tag": "http",
39 | "port": 10809,
40 | "protocol": "http",
41 | "settings": {
42 | "userLevel": 8
43 | }
44 | }
45 | ],
46 | "outbounds": [{
47 | "tag": "proxy",
48 | "protocol": "vmess",
49 | "settings": {
50 | "vnext": [
51 | {
52 | "address": "v2ray.cool",
53 | "port": 10086,
54 | "users": [
55 | {
56 | "id": "a3482e88-686a-4a58-8126-99c9df64b7bf",
57 | "alterId": 0,
58 | "security": "auto",
59 | "level": 8
60 | }
61 | ]
62 | }
63 | ],
64 | "servers": [
65 | {
66 | "address": "v2ray.cool",
67 | "method": "chacha20",
68 | "ota": false,
69 | "password": "123456",
70 | "port": 10086,
71 | "level": 8
72 | }
73 | ]
74 | },
75 | "streamSettings": {
76 | "network": "tcp"
77 | },
78 | "mux": {
79 | "enabled": false
80 | }
81 | },
82 | {
83 | "protocol": "freedom",
84 | "settings": {},
85 | "tag": "direct"
86 | },
87 | {
88 | "protocol": "blackhole",
89 | "tag": "block",
90 | "settings": {
91 | "response": {
92 | "type": "http"
93 | }
94 | }
95 | }
96 | ],
97 | "routing": {
98 | "domainStrategy": "IPIfNonMatch",
99 | "rules": []
100 | },
101 | "dns": {
102 | "hosts": {},
103 | "servers": []
104 | }
105 | }
106 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/kotlin/com/v2ray/ang/extension/_Ext.kt:
--------------------------------------------------------------------------------
1 | package com.v2ray.ang.extension
2 |
3 | import android.content.Context
4 | import android.os.Build
5 | import android.widget.Toast
6 | import com.v2ray.ang.AngApplication
7 | import me.drakeet.support.toast.ToastCompat
8 | import org.json.JSONObject
9 | import java.net.URI
10 | import java.net.URLConnection
11 |
12 | /**
13 | * Some extensions
14 | */
15 |
16 | val Context.v2RayApplication: AngApplication
17 | get() = applicationContext as AngApplication
18 |
19 | fun Context.toast(message: Int): Toast = ToastCompat
20 | .makeText(this, message, Toast.LENGTH_SHORT)
21 | .apply {
22 | show()
23 | }
24 |
25 | fun Context.toast(message: CharSequence): Toast = ToastCompat
26 | .makeText(this, message, Toast.LENGTH_SHORT)
27 | .apply {
28 | show()
29 | }
30 |
31 | fun JSONObject.putOpt(pair: Pair) = putOpt(pair.first, pair.second)
32 | fun JSONObject.putOpt(pairs: Map) = pairs.forEach { putOpt(it.key to it.value) }
33 |
34 | const val threshold = 1000
35 | const val divisor = 1024F
36 |
37 | fun Long.toSpeedString() = toTrafficString() + "/s"
38 |
39 | fun Long.toTrafficString(): String {
40 | if (this == 0L)
41 | return "\t\t\t0\t B"
42 |
43 | if (this < threshold)
44 | return "${this.toFloat().toShortString()}\t B"
45 |
46 | val kib = this / divisor
47 | if (kib < threshold)
48 | return "${kib.toShortString()}\t KB"
49 |
50 | val mib = kib / divisor
51 | if (mib < threshold)
52 | return "${mib.toShortString()}\t MB"
53 |
54 | val gib = mib / divisor
55 | if (gib < threshold)
56 | return "${gib.toShortString()}\t GB"
57 |
58 | val tib = gib / divisor
59 | if (tib < threshold)
60 | return "${tib.toShortString()}\t TB"
61 |
62 | val pib = tib / divisor
63 | if (pib < threshold)
64 | return "${pib.toShortString()}\t PB"
65 |
66 | return "∞"
67 | }
68 |
69 | private fun Float.toShortString(): String {
70 | val s = "%.2f".format(this)
71 | if (s.length <= 4)
72 | return s
73 | return s.substring(0, 4).removeSuffix(".")
74 | }
75 |
76 | val URLConnection.responseLength: Long
77 | get() = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) contentLengthLong else contentLength.toLong()
78 |
79 | val URI.idnHost: String
80 | get() = (host!!).replace("[", "").replace("]", "")
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/java/com/v2ray/ang/helper/ItemTouchHelperAdapter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2015 Paul Burke
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.v2ray.ang.helper;
18 |
19 | import androidx.recyclerview.widget.RecyclerView;
20 | import androidx.recyclerview.widget.ItemTouchHelper;
21 |
22 | /**
23 | * Interface to listen for a move or dismissal event from a {@link ItemTouchHelper.Callback}.
24 | *
25 | * @author Paul Burke (ipaulpro)
26 | */
27 | public interface ItemTouchHelperAdapter {
28 |
29 | /**
30 | * Called when an item has been dragged far enough to trigger a move. This is called every time
31 | * an item is shifted, and not at the end of a "drop" event.
32 | *
33 | * Implementations should call {@link RecyclerView.Adapter#notifyItemMoved(int, int)} after
34 | * adjusting the underlying data to reflect this move.
35 | *
36 | * @param fromPosition The start position of the moved item.
37 | * @param toPosition Then resolved position of the moved item.
38 | * @return True if the item was moved to the new adapter position.
39 | *
40 | * @see RecyclerView#getAdapterPositionFor(RecyclerView.ViewHolder)
41 | * @see RecyclerView.ViewHolder#getAdapterPosition()
42 | */
43 | boolean onItemMove(int fromPosition, int toPosition);
44 |
45 |
46 | void onItemMoveCompleted();
47 |
48 | /**
49 | * Called when an item has been dismissed by a swipe.
50 | *
51 | * Implementations should call {@link RecyclerView.Adapter#notifyItemRemoved(int)} after
52 | * adjusting the underlying data to reflect this removal.
53 | *
54 | * @param position The position of the item dismissed.
55 | *
56 | * @see RecyclerView#getAdapterPositionFor(RecyclerView.ViewHolder)
57 | * @see RecyclerView.ViewHolder#getAdapterPosition()
58 | */
59 | void onItemDismiss(int position);
60 | }
61 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/layout/nav_header.xml:
--------------------------------------------------------------------------------
1 |
2 |
14 |
15 |
19 |
20 |
24 |
25 |
41 |
42 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # v2rayNG
2 |
3 | A V2Ray client for Android, support [Xray core](https://github.com/XTLS/Xray-core) and [v2fly core](https://github.com/v2fly/v2ray-core)
4 |
5 | [](https://developer.android.com/about/versions/lollipop)
6 | [](https://kotlinlang.org)
7 | [](https://github.com/2dust/v2rayNG/commits/master)
8 | [](https://www.codefactor.io/repository/github/2dust/v2rayng)
9 | [](https://github.com/2dust/v2rayNG/releases)
10 | [](https://t.me/v2rayn)
11 |
12 |
13 |
14 |
15 |
16 | ### Telegram Channel
17 | [github_2dust](https://t.me/github_2dust)
18 |
19 | ### Usage
20 |
21 | #### Geoip and Geosite
22 | - geoip.dat and geosite.dat files are in `Android/data/com.v2ray.ang/files/assets` (path may differ on some Android device)
23 | - download feature will get enhanced version in this [repo](https://github.com/Loyalsoldier/v2ray-rules-dat) (Note it need a working proxy)
24 | - latest official [domain list](https://github.com/v2fly/domain-list-community) and [ip list](https://github.com/v2fly/geoip) can be imported manually
25 | - possible to use third party dat file in the same folder, like [h2y](https://guide.v2fly.org/routing/sitedata.html#%E5%A4%96%E7%BD%AE%E7%9A%84%E5%9F%9F%E5%90%8D%E6%96%87%E4%BB%B6)
26 |
27 | ### More in our [wiki](https://github.com/2dust/v2rayNG/wiki)
28 |
29 | ### Development guide
30 |
31 | Android project under V2rayNG folder can be compiled directly in Android Studio, or using Gradle wrapper. But the v2ray core inside the aar is (probably) outdated.
32 | The aar can be compiled from the Golang project [AndroidLibV2rayLite](https://github.com/2dust/AndroidLibV2rayLite) or [AndroidLibXrayLite](https://github.com/2dust/AndroidLibXrayLite).
33 | For a quick start, read guide for [Go Mobile](https://github.com/golang/go/wiki/Mobile) and [Makefiles for Go Developers](https://tutorialedge.net/golang/makefiles-for-go-developers/)
34 |
35 | v2rayNG can run on Android Emulators. For WSA, VPN permission need to be granted via
36 | `appops set [package name] ACTIVATE_VPN allow`
37 |
--------------------------------------------------------------------------------
/V2rayNG/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/layout/item_recycler_user_asset.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
13 |
14 |
20 |
21 |
26 |
27 |
33 |
34 |
41 |
42 |
43 |
51 |
52 |
57 |
58 |
59 |
60 |
61 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/kotlin/com/v2ray/ang/viewmodel/SettingsViewModel.kt:
--------------------------------------------------------------------------------
1 | package com.v2ray.ang.viewmodel
2 |
3 | import android.app.Application
4 | import android.content.SharedPreferences
5 | import android.util.Log
6 | import androidx.lifecycle.AndroidViewModel
7 | import androidx.preference.PreferenceManager
8 | import com.tencent.mmkv.MMKV
9 | import com.v2ray.ang.AppConfig
10 | import com.v2ray.ang.util.MmkvManager
11 |
12 | class SettingsViewModel(application: Application) : AndroidViewModel(application), SharedPreferences.OnSharedPreferenceChangeListener {
13 |
14 | private val settingsStorage by lazy { MMKV.mmkvWithID(MmkvManager.ID_SETTING, MMKV.MULTI_PROCESS_MODE) }
15 |
16 | fun startListenPreferenceChange() {
17 | PreferenceManager.getDefaultSharedPreferences(getApplication()).registerOnSharedPreferenceChangeListener(this)
18 | }
19 |
20 | override fun onCleared() {
21 | PreferenceManager.getDefaultSharedPreferences(getApplication()).unregisterOnSharedPreferenceChangeListener(this)
22 | Log.i(AppConfig.ANG_PACKAGE, "Settings ViewModel is cleared")
23 | super.onCleared()
24 | }
25 |
26 | override fun onSharedPreferenceChanged(sharedPreferences: SharedPreferences, key: String?) {
27 | Log.d(AppConfig.ANG_PACKAGE, "Observe settings changed: $key")
28 | when(key) {
29 | AppConfig.PREF_MODE,
30 | AppConfig.PREF_VPN_DNS,
31 | AppConfig.PREF_REMOTE_DNS,
32 | AppConfig.PREF_DOMESTIC_DNS,
33 | AppConfig.PREF_LOCAL_DNS_PORT,
34 | AppConfig.PREF_SOCKS_PORT,
35 | AppConfig.PREF_HTTP_PORT,
36 | AppConfig.PREF_LOGLEVEL,
37 | AppConfig.PREF_LANGUAGE,
38 | AppConfig.PREF_ROUTING_DOMAIN_STRATEGY,
39 | AppConfig.PREF_ROUTING_MODE,
40 | AppConfig.PREF_V2RAY_ROUTING_AGENT,
41 | AppConfig.PREF_V2RAY_ROUTING_BLOCKED,
42 | AppConfig.PREF_V2RAY_ROUTING_DIRECT, -> {
43 | settingsStorage?.encode(key, sharedPreferences.getString(key, ""))
44 | }
45 | AppConfig.PREF_SPEED_ENABLED,
46 | AppConfig.PREF_PROXY_SHARING,
47 | AppConfig.PREF_LOCAL_DNS_ENABLED,
48 | AppConfig.PREF_FAKE_DNS_ENABLED,
49 | AppConfig.PREF_ALLOW_INSECURE,
50 | AppConfig.PREF_PREFER_IPV6,
51 | AppConfig.PREF_PER_APP_PROXY,
52 | AppConfig.PREF_BYPASS_APPS,
53 | AppConfig.PREF_CONFIRM_REMOVE,
54 | AppConfig.PREF_START_SCAN_IMMEDIATE, -> {
55 | settingsStorage?.encode(key, sharedPreferences.getBoolean(key, false))
56 | }
57 | AppConfig.PREF_SNIFFING_ENABLED -> {
58 | settingsStorage?.encode(key, sharedPreferences.getBoolean(key, true))
59 | }
60 | AppConfig.PREF_PER_APP_PROXY_SET -> {
61 | settingsStorage?.encode(key, sharedPreferences.getStringSet(key, setOf()))
62 | }
63 | }
64 | }
65 | }
66 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/kotlin/com/v2ray/ang/dto/ServerConfig.kt:
--------------------------------------------------------------------------------
1 | package com.v2ray.ang.dto
2 |
3 | import com.v2ray.ang.AppConfig.TAG_AGENT
4 | import com.v2ray.ang.AppConfig.TAG_BLOCKED
5 | import com.v2ray.ang.AppConfig.TAG_DIRECT
6 | import com.v2ray.ang.util.Utils
7 |
8 | data class ServerConfig(
9 | val configVersion: Int = 3,
10 | val configType: EConfigType,
11 | var subscriptionId: String = "",
12 | val addedTime: Long = System.currentTimeMillis(),
13 | var remarks: String = "",
14 | val outboundBean: V2rayConfig.OutboundBean? = null,
15 | var fullConfig: V2rayConfig? = null
16 | ) {
17 | companion object {
18 | fun create(configType: EConfigType): ServerConfig {
19 | when(configType) {
20 | EConfigType.VMESS, EConfigType.VLESS ->
21 | return ServerConfig(
22 | configType = configType,
23 | outboundBean = V2rayConfig.OutboundBean(
24 | protocol = configType.name.lowercase(),
25 | settings = V2rayConfig.OutboundBean.OutSettingsBean(
26 | vnext = listOf(V2rayConfig.OutboundBean.OutSettingsBean.VnextBean(
27 | users = listOf(V2rayConfig.OutboundBean.OutSettingsBean.VnextBean.UsersBean())))),
28 | streamSettings = V2rayConfig.OutboundBean.StreamSettingsBean()))
29 | EConfigType.CUSTOM, EConfigType.WIREGUARD ->
30 | return ServerConfig(configType = configType)
31 | EConfigType.SHADOWSOCKS, EConfigType.SOCKS, EConfigType.TROJAN ->
32 | return ServerConfig(
33 | configType = configType,
34 | outboundBean = V2rayConfig.OutboundBean(
35 | protocol = configType.name.lowercase(),
36 | settings = V2rayConfig.OutboundBean.OutSettingsBean(
37 | servers = listOf(V2rayConfig.OutboundBean.OutSettingsBean.ServersBean())),
38 | streamSettings = V2rayConfig.OutboundBean.StreamSettingsBean()))
39 | }
40 | }
41 | }
42 |
43 | fun getProxyOutbound(): V2rayConfig.OutboundBean? {
44 | if (configType != EConfigType.CUSTOM) {
45 | return outboundBean
46 | }
47 | return fullConfig?.getProxyOutbound()
48 | }
49 |
50 | fun getAllOutboundTags(): MutableList {
51 | if (configType != EConfigType.CUSTOM) {
52 | return mutableListOf(TAG_AGENT, TAG_DIRECT, TAG_BLOCKED)
53 | }
54 | fullConfig?.let { config ->
55 | return config.outbounds.map { it.tag }.toMutableList()
56 | }
57 | return mutableListOf()
58 | }
59 |
60 | fun getV2rayPointDomainAndPort(): String {
61 | val address = getProxyOutbound()?.getServerAddress().orEmpty()
62 | val port = getProxyOutbound()?.getServerPort()
63 | return if (Utils.isIpv6Address(address)) {
64 | String.format("[%s]:%s", address, port)
65 | } else {
66 | String.format("%s:%s", address, port)
67 | }
68 | }
69 | }
70 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/assets/custom_routing_direct:
--------------------------------------------------------------------------------
1 | domain:12306.com,
2 | domain:51ym.me,
3 | domain:52pojie.cn,
4 | domain:8686c.com,
5 | domain:abercrombie.com,
6 | domain:adobesc.com,
7 | domain:air-matters.com,
8 | domain:air-matters.io,
9 | domain:airtable.com,
10 | domain:akadns.net,
11 | domain:apache.org,
12 | domain:api.crisp.chat,
13 | domain:api.termius.com,
14 | domain:appshike.com,
15 | domain:appstore.com,
16 | domain:aweme.snssdk.com,
17 | domain:bababian.com,
18 | domain:battle.net,
19 | domain:beatsbydre.com,
20 | domain:bet365.com,
21 | domain:bilibili.cn,
22 | domain:ccgslb.com,
23 | domain:ccgslb.net,
24 | domain:chunbo.com,
25 | domain:chunboimg.com,
26 | domain:clashroyaleapp.com,
27 | domain:cloudsigma.com,
28 | domain:cloudxns.net,
29 | domain:cmfu.com,
30 | domain:culturedcode.com,
31 | domain:dct-cloud.com,
32 | domain:didialift.com,
33 | domain:douyutv.com,
34 | domain:duokan.com,
35 | domain:dytt8.net,
36 | domain:easou.com,
37 | domain:ecitic.net,
38 | domain:eclipse.org,
39 | domain:eudic.net,
40 | domain:ewqcxz.com,
41 | domain:fir.im,
42 | domain:frdic.com,
43 | domain:fresh-ideas.cc,
44 | domain:godic.net,
45 | domain:goodread.com,
46 | domain:haibian.com,
47 | domain:hdslb.net,
48 | domain:hollisterco.com,
49 | domain:hongxiu.com,
50 | domain:hxcdn.net,
51 | domain:images.unsplash.com,
52 | domain:img4me.com,
53 | domain:ipify.org,
54 | domain:ixdzs.com,
55 | domain:jd.hk,
56 | domain:jianshuapi.com,
57 | domain:jomodns.com,
58 | domain:jsboxbbs.com,
59 | domain:knewone.com,
60 | domain:kuaidi100.com,
61 | domain:lemicp.com,
62 | domain:letvcloud.com,
63 | domain:lizhi.io,
64 | domain:localizecdn.com,
65 | domain:lucifr.com,
66 | domain:luoo.net,
67 | domain:mai.tn,
68 | domain:maven.org,
69 | domain:miwifi.com,
70 | domain:moji.com,
71 | domain:moke.com,
72 | domain:mtalk.google.com,
73 | domain:mxhichina.com,
74 | domain:myqcloud.com,
75 | domain:myunlu.com,
76 | domain:netease.com,
77 | domain:nfoservers.com,
78 | domain:nssurge.com,
79 | domain:nuomi.com,
80 | domain:ourdvs.com,
81 | domain:overcast.fm,
82 | domain:paypal.com,
83 | domain:paypalobjects.com,
84 | domain:pgyer.com,
85 | domain:qdaily.com,
86 | domain:qdmm.com,
87 | domain:qin.io,
88 | domain:qingmang.me,
89 | domain:qingmang.mobi,
90 | domain:qqurl.com,
91 | domain:rarbg.to,
92 | domain:rrmj.tv,
93 | domain:ruguoapp.com,
94 | domain:sm.ms,
95 | domain:snwx.com,
96 | domain:soku.com,
97 | domain:startssl.com,
98 | domain:store.steampowered.com,
99 | domain:symcd.com,
100 | domain:teamviewer.com,
101 | domain:tmzvps.com,
102 | domain:trello.com,
103 | domain:trellocdn.com,
104 | domain:ttmeiju.com,
105 | domain:udache.com,
106 | domain:uxengine.net,
107 | domain:weather.bjango.com,
108 | domain:weather.com,
109 | domain:webqxs.com,
110 | domain:weico.cc,
111 | domain:wenku8.net,
112 | domain:werewolf.53site.com,
113 | domain:windowsupdate.com,
114 | domain:wkcdn.com,
115 | domain:workflowy.com,
116 | domain:xdrig.com,
117 | domain:xiaojukeji.com,
118 | domain:xiaomi.net,
119 | domain:xiaomicp.com,
120 | domain:ximalaya.com,
121 | domain:xitek.com,
122 | domain:xmcdn.com,
123 | domain:xslb.net,
124 | domain:xteko.com,
125 | domain:yach.me,
126 | domain:yixia.com,
127 | domain:yunjiasu-cdn.net,
128 | domain:zealer.com,
129 | domain:zgslb.net,
130 | domain:zimuzu.tv,
131 | domain:zmz002.com,
132 | domain:samsungdm.com,
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/kotlin/com/v2ray/ang/service/QSTileService.kt:
--------------------------------------------------------------------------------
1 | package com.v2ray.ang.service
2 |
3 | import android.annotation.TargetApi
4 | import android.content.BroadcastReceiver
5 | import android.content.Context
6 | import android.content.Intent
7 | import android.content.IntentFilter
8 | import android.graphics.drawable.Icon
9 | import android.os.Build
10 | import android.service.quicksettings.Tile
11 | import android.service.quicksettings.TileService
12 | import com.v2ray.ang.AppConfig
13 | import com.v2ray.ang.R
14 | import com.v2ray.ang.util.MessageUtil
15 | import com.v2ray.ang.util.Utils
16 | import java.lang.ref.SoftReference
17 |
18 | @TargetApi(Build.VERSION_CODES.N)
19 | class QSTileService : TileService() {
20 |
21 | fun setState(state: Int) {
22 | if (state == Tile.STATE_INACTIVE) {
23 | qsTile?.state = Tile.STATE_INACTIVE
24 | qsTile?.label = getString(R.string.app_name)
25 | qsTile?.icon = Icon.createWithResource(applicationContext, R.drawable.ic_stat_name)
26 | } else if (state == Tile.STATE_ACTIVE) {
27 | qsTile?.state = Tile.STATE_ACTIVE
28 | qsTile?.label = V2RayServiceManager.currentConfig?.remarks
29 | qsTile?.icon = Icon.createWithResource(applicationContext, R.drawable.ic_stat_name)
30 | }
31 |
32 | qsTile?.updateTile()
33 | }
34 |
35 | override fun onStartListening() {
36 | super.onStartListening()
37 | setState(Tile.STATE_INACTIVE)
38 | mMsgReceive = ReceiveMessageHandler(this)
39 | registerReceiver(mMsgReceive, IntentFilter(AppConfig.BROADCAST_ACTION_ACTIVITY))
40 | MessageUtil.sendMsg2Service(this, AppConfig.MSG_REGISTER_CLIENT, "")
41 | }
42 |
43 | override fun onStopListening() {
44 | super.onStopListening()
45 |
46 | unregisterReceiver(mMsgReceive)
47 | mMsgReceive = null
48 | }
49 |
50 | override fun onClick() {
51 | super.onClick()
52 | when (qsTile.state) {
53 | Tile.STATE_INACTIVE -> {
54 | Utils.startVServiceFromToggle(this)
55 | }
56 | Tile.STATE_ACTIVE -> {
57 | Utils.stopVService(this)
58 | }
59 | }
60 | }
61 |
62 | private var mMsgReceive: BroadcastReceiver? = null
63 |
64 | private class ReceiveMessageHandler(context: QSTileService) : BroadcastReceiver() {
65 | internal var mReference: SoftReference = SoftReference(context)
66 | override fun onReceive(ctx: Context?, intent: Intent?) {
67 | val context = mReference.get()
68 | when (intent?.getIntExtra("key", 0)) {
69 | AppConfig.MSG_STATE_RUNNING -> {
70 | context?.setState(Tile.STATE_ACTIVE)
71 | }
72 | AppConfig.MSG_STATE_NOT_RUNNING -> {
73 | context?.setState(Tile.STATE_INACTIVE)
74 | }
75 | AppConfig.MSG_STATE_START_SUCCESS -> {
76 | context?.setState(Tile.STATE_ACTIVE)
77 | }
78 | AppConfig.MSG_STATE_START_FAILURE -> {
79 | context?.setState(Tile.STATE_INACTIVE)
80 | }
81 | AppConfig.MSG_STATE_STOP_SUCCESS -> {
82 | context?.setState(Tile.STATE_INACTIVE)
83 | }
84 | }
85 | }
86 | }
87 | }
88 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/layout/activity_server_custom_config.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
12 |
13 |
18 |
19 |
25 |
26 |
27 |
32 |
33 |
38 |
39 |
40 |
45 |
46 |
50 |
51 |
56 |
57 |
58 |
59 |
63 |
64 |
70 |
71 |
77 |
78 |
79 |
80 |
81 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/PerAppProxyAdapter.kt:
--------------------------------------------------------------------------------
1 | package com.v2ray.ang.ui
2 |
3 | import android.view.LayoutInflater
4 | import androidx.recyclerview.widget.RecyclerView
5 | import android.view.View
6 | import android.view.ViewGroup
7 | import com.v2ray.ang.R
8 | import com.v2ray.ang.databinding.ItemRecyclerBypassListBinding
9 | import com.v2ray.ang.dto.AppInfo
10 | import java.util.*
11 |
12 | class PerAppProxyAdapter(val activity: BaseActivity, val apps: List, blacklist: MutableSet?) :
13 | RecyclerView.Adapter() {
14 |
15 | companion object {
16 | private const val VIEW_TYPE_HEADER = 0
17 | private const val VIEW_TYPE_ITEM = 1
18 | }
19 |
20 | val blacklist = if (blacklist == null) HashSet() else HashSet(blacklist)
21 |
22 | override fun onBindViewHolder(holder: BaseViewHolder, position: Int) {
23 | if (holder is AppViewHolder) {
24 | val appInfo = apps[position - 1]
25 | holder.bind(appInfo)
26 | }
27 | }
28 |
29 | override fun getItemCount() = apps.size + 1
30 |
31 | override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): BaseViewHolder {
32 | val ctx = parent.context
33 |
34 | return when (viewType) {
35 | VIEW_TYPE_HEADER -> {
36 | val view = View(ctx)
37 | view.layoutParams = ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
38 | ctx.resources.getDimensionPixelSize(R.dimen.bypass_list_header_height) * 0)
39 | BaseViewHolder(view)
40 | }
41 | // VIEW_TYPE_ITEM -> AppViewHolder(ctx.layoutInflater
42 | // .inflate(R.layout.item_recycler_bypass_list, parent, false))
43 |
44 | else -> AppViewHolder(ItemRecyclerBypassListBinding.inflate(LayoutInflater.from(ctx), parent, false))
45 |
46 | }
47 | }
48 |
49 | override fun getItemViewType(position: Int) = if (position == 0) VIEW_TYPE_HEADER else VIEW_TYPE_ITEM
50 |
51 | open class BaseViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView)
52 |
53 | inner class AppViewHolder(private val itemBypassBinding: ItemRecyclerBypassListBinding) : BaseViewHolder(itemBypassBinding.root),
54 | View.OnClickListener {
55 | private val inBlacklist: Boolean get() = blacklist.contains(appInfo.packageName)
56 | private lateinit var appInfo: AppInfo
57 |
58 | fun bind(appInfo: AppInfo) {
59 | this.appInfo = appInfo
60 |
61 | itemBypassBinding.icon.setImageDrawable(appInfo.appIcon)
62 | // name.text = appInfo.appName
63 |
64 | itemBypassBinding.checkBox.isChecked = inBlacklist
65 | itemBypassBinding.packageName.text = appInfo.packageName
66 | if (appInfo.isSystemApp) {
67 | itemBypassBinding.name.text = String.format("** %1s", appInfo.appName)
68 | //name.textColor = Color.RED
69 | } else {
70 | itemBypassBinding.name.text = appInfo.appName
71 | //name.textColor = Color.DKGRAY
72 | }
73 |
74 | itemView.setOnClickListener(this)
75 | }
76 |
77 | override fun onClick(v: View?) {
78 | if (inBlacklist) {
79 | blacklist.remove(appInfo.packageName)
80 | itemBypassBinding.checkBox.isChecked = false
81 | } else {
82 | blacklist.add(appInfo.packageName)
83 | itemBypassBinding.checkBox.isChecked = true
84 | }
85 | }
86 | }
87 | }
88 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/LogcatActivity.kt:
--------------------------------------------------------------------------------
1 | package com.v2ray.ang.ui
2 |
3 | import android.os.Handler
4 | import android.os.Looper
5 | import android.os.Bundle
6 | import android.text.method.ScrollingMovementMethod
7 | import android.view.Menu
8 | import android.view.MenuItem
9 | import android.view.View
10 | import androidx.lifecycle.lifecycleScope
11 | import com.v2ray.ang.AppConfig.ANG_PACKAGE
12 | import com.v2ray.ang.R
13 | import com.v2ray.ang.databinding.ActivityLogcatBinding
14 | import com.v2ray.ang.extension.toast
15 | import com.v2ray.ang.util.Utils
16 | import kotlinx.coroutines.Dispatchers
17 | import kotlinx.coroutines.GlobalScope
18 | import kotlinx.coroutines.launch
19 |
20 | import java.io.IOException
21 | import java.util.LinkedHashSet
22 |
23 | class LogcatActivity : BaseActivity() {
24 | private lateinit var binding: ActivityLogcatBinding
25 |
26 | override fun onCreate(savedInstanceState: Bundle?) {
27 | super.onCreate(savedInstanceState)
28 | binding = ActivityLogcatBinding.inflate(layoutInflater)
29 | val view = binding.root
30 | setContentView(view)
31 |
32 | title = getString(R.string.title_logcat)
33 |
34 | supportActionBar?.setDisplayHomeAsUpEnabled(true)
35 | logcat(false)
36 | }
37 |
38 | private fun logcat(shouldFlushLog: Boolean) {
39 |
40 | try {
41 | binding.pbWaiting.visibility = View.VISIBLE
42 |
43 | lifecycleScope.launch(Dispatchers.Default) {
44 | if (shouldFlushLog) {
45 | val lst = LinkedHashSet()
46 | lst.add("logcat")
47 | lst.add("-c")
48 | val process = Runtime.getRuntime().exec(lst.toTypedArray())
49 | process.waitFor()
50 | }
51 | val lst = LinkedHashSet()
52 | lst.add("logcat")
53 | lst.add("-d")
54 | lst.add("-v")
55 | lst.add("time")
56 | lst.add("-s")
57 | lst.add("GoLog,tun2socks,${ANG_PACKAGE},AndroidRuntime,System.err")
58 | val process = Runtime.getRuntime().exec(lst.toTypedArray())
59 | // val bufferedReader = BufferedReader(
60 | // InputStreamReader(process.inputStream))
61 | // val allText = bufferedReader.use(BufferedReader::readText)
62 | val allText = process.inputStream.bufferedReader().use { it.readText() }
63 | launch(Dispatchers.Main) {
64 | binding.tvLogcat.text = allText
65 | binding.tvLogcat.movementMethod = ScrollingMovementMethod()
66 | binding.pbWaiting.visibility = View.GONE
67 | Handler(Looper.getMainLooper()).post { binding.svLogcat.fullScroll(View.FOCUS_DOWN) }
68 | }
69 | }
70 | } catch (e: IOException) {
71 | e.printStackTrace()
72 | }
73 | }
74 |
75 | override fun onCreateOptionsMenu(menu: Menu): Boolean {
76 | menuInflater.inflate(R.menu.menu_logcat, menu)
77 | return super.onCreateOptionsMenu(menu)
78 | }
79 |
80 | override fun onOptionsItemSelected(item: MenuItem) = when (item.itemId) {
81 | R.id.copy_all -> {
82 | Utils.setClipboard(this, binding.tvLogcat.text.toString())
83 | toast(R.string.toast_success)
84 | true
85 | }
86 | R.id.clear_all -> {
87 | logcat(true)
88 | true
89 | }
90 | else -> super.onOptionsItemSelected(item)
91 | }
92 | }
93 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/kotlin/com/v2ray/ang/receiver/WidgetProvider.kt:
--------------------------------------------------------------------------------
1 | package com.v2ray.ang.receiver
2 |
3 | import android.app.PendingIntent
4 | import android.appwidget.AppWidgetManager
5 | import android.appwidget.AppWidgetProvider
6 | import android.content.ComponentName
7 | import android.content.Context
8 | import android.content.Intent
9 | import android.os.Build
10 | import android.widget.RemoteViews
11 | import com.v2ray.ang.R
12 | import com.v2ray.ang.AppConfig
13 | import com.v2ray.ang.service.V2RayServiceManager
14 | import com.v2ray.ang.util.Utils
15 |
16 | class WidgetProvider : AppWidgetProvider() {
17 | /**
18 | * 每次窗口小部件被更新都调用一次该方法
19 | */
20 | override fun onUpdate(context: Context, appWidgetManager: AppWidgetManager, appWidgetIds: IntArray) {
21 | super.onUpdate(context, appWidgetManager, appWidgetIds)
22 | updateWidgetBackground(context, appWidgetManager, appWidgetIds, V2RayServiceManager.v2rayPoint.isRunning)
23 | }
24 |
25 |
26 | private fun updateWidgetBackground(context: Context, appWidgetManager: AppWidgetManager, appWidgetIds: IntArray, isRunning: Boolean) {
27 | val remoteViews = RemoteViews(context.packageName, R.layout.widget_switch)
28 | val intent = Intent(context, WidgetProvider::class.java)
29 | intent.action = AppConfig.BROADCAST_ACTION_WIDGET_CLICK
30 | val pendingIntent = PendingIntent.getBroadcast(
31 | context,
32 | R.id.layout_switch,
33 | intent,
34 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
35 | PendingIntent.FLAG_IMMUTABLE or PendingIntent.FLAG_UPDATE_CURRENT
36 | } else {
37 | PendingIntent.FLAG_UPDATE_CURRENT
38 | })
39 | remoteViews.setOnClickPendingIntent(R.id.layout_switch, pendingIntent)
40 | if (isRunning) {
41 | remoteViews.setInt(
42 | R.id.layout_switch,
43 | "setBackgroundResource",
44 | R.drawable.ic_rounded_corner_theme
45 | )
46 | } else {
47 | remoteViews.setInt(
48 | R.id.layout_switch,
49 | "setBackgroundResource",
50 | R.drawable.ic_rounded_corner_grey
51 | )
52 | }
53 |
54 | for (appWidgetId in appWidgetIds) {
55 | appWidgetManager.updateAppWidget(appWidgetId, remoteViews)
56 | }
57 | }
58 |
59 | /**
60 | * 接收窗口小部件发送的广播
61 | */
62 | override fun onReceive(context: Context, intent: Intent) {
63 | super.onReceive(context, intent)
64 | if (AppConfig.BROADCAST_ACTION_WIDGET_CLICK == intent.action) {
65 | if (V2RayServiceManager.v2rayPoint.isRunning) {
66 | Utils.stopVService(context)
67 | } else {
68 | Utils.startVServiceFromToggle(context)
69 | }
70 | } else if (AppConfig.BROADCAST_ACTION_ACTIVITY == intent.action) {
71 | AppWidgetManager.getInstance(context)?.let { manager ->
72 | when (intent.getIntExtra("key", 0)) {
73 | AppConfig.MSG_STATE_RUNNING, AppConfig.MSG_STATE_START_SUCCESS -> {
74 | updateWidgetBackground(context, manager, manager.getAppWidgetIds(ComponentName(context, WidgetProvider::class.java)),
75 | true)
76 | }
77 | AppConfig.MSG_STATE_NOT_RUNNING, AppConfig.MSG_STATE_START_FAILURE, AppConfig.MSG_STATE_STOP_SUCCESS -> {
78 | updateWidgetBackground(context, manager, manager.getAppWidgetIds(ComponentName(context, WidgetProvider::class.java)),
79 | false)
80 | }
81 | }
82 | }
83 | }
84 | }
85 | }
86 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/layout/activity_bypass_list.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
16 |
17 |
21 |
22 |
26 |
27 |
35 |
36 |
41 |
42 |
47 |
48 |
49 |
50 |
58 |
59 |
65 |
66 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
84 |
85 |
91 |
92 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/TaskerActivity.kt:
--------------------------------------------------------------------------------
1 | package com.v2ray.ang.ui
2 |
3 | import android.app.Activity
4 | import android.os.Bundle
5 | import android.view.View
6 | import android.widget.ArrayAdapter
7 | import android.widget.ListView
8 | import java.util.ArrayList
9 | import com.v2ray.ang.R
10 | import android.content.Intent
11 | import android.text.TextUtils
12 | import android.view.Menu
13 | import android.view.MenuItem
14 | import com.tencent.mmkv.MMKV
15 | import com.v2ray.ang.AppConfig
16 | import com.v2ray.ang.databinding.ActivityTaskerBinding
17 | import com.v2ray.ang.util.MmkvManager
18 |
19 | class TaskerActivity : BaseActivity() {
20 | private lateinit var binding: ActivityTaskerBinding
21 |
22 | private var listview: ListView? = null
23 | private var lstData: ArrayList = ArrayList()
24 | private var lstGuid: ArrayList = ArrayList()
25 |
26 | private val serverStorage by lazy { MMKV.mmkvWithID(MmkvManager.ID_SERVER_CONFIG, MMKV.MULTI_PROCESS_MODE) }
27 |
28 | override fun onCreate(savedInstanceState: Bundle?) {
29 | super.onCreate(savedInstanceState)
30 | binding = ActivityTaskerBinding.inflate(layoutInflater)
31 | val view = binding.root
32 | setContentView(view)
33 |
34 | //add def value
35 | lstData.add("Default")
36 | lstGuid.add(AppConfig.TASKER_DEFAULT_GUID)
37 |
38 | serverStorage?.allKeys()?.forEach { key ->
39 | MmkvManager.decodeServerConfig(key)?.let { config ->
40 | lstData.add(config.remarks)
41 | lstGuid.add(key)
42 | }
43 | }
44 | val adapter = ArrayAdapter(this,
45 | android.R.layout.simple_list_item_single_choice, lstData)
46 | listview = findViewById(R.id.listview) as ListView
47 | listview!!.adapter = adapter
48 |
49 | init()
50 | }
51 |
52 | private fun init() {
53 | try {
54 | val bundle = intent?.getBundleExtra(AppConfig.TASKER_EXTRA_BUNDLE)
55 | val switch = bundle?.getBoolean(AppConfig.TASKER_EXTRA_BUNDLE_SWITCH, false)
56 | val guid = bundle?.getString(AppConfig.TASKER_EXTRA_BUNDLE_GUID, "")
57 |
58 | if (switch == null || TextUtils.isEmpty(guid)) {
59 | return
60 | } else {
61 | binding.switchStartService.isChecked = switch
62 | val pos = lstGuid.indexOf(guid.toString())
63 | if (pos >= 0) {
64 | listview?.setItemChecked(pos, true)
65 | }
66 | }
67 | } catch (e: Exception) {
68 | e.printStackTrace()
69 |
70 | }
71 | }
72 |
73 | private fun confirmFinish() {
74 | val position = listview?.checkedItemPosition
75 | if (position == null || position < 0) {
76 | return
77 | }
78 |
79 | val extraBundle = Bundle()
80 | extraBundle.putBoolean(AppConfig.TASKER_EXTRA_BUNDLE_SWITCH, binding.switchStartService.isChecked)
81 | extraBundle.putString(AppConfig.TASKER_EXTRA_BUNDLE_GUID, lstGuid[position])
82 | val intent = Intent()
83 |
84 | val remarks = lstData[position]
85 | val blurb = if (binding.switchStartService.isChecked) {
86 | "Start $remarks"
87 | } else {
88 | "Stop $remarks"
89 | }
90 |
91 | intent.putExtra(AppConfig.TASKER_EXTRA_BUNDLE, extraBundle)
92 | intent.putExtra(AppConfig.TASKER_EXTRA_STRING_BLURB, blurb)
93 | setResult(Activity.RESULT_OK, intent)
94 | finish()
95 | }
96 |
97 | override fun onCreateOptionsMenu(menu: Menu): Boolean {
98 | menuInflater.inflate(R.menu.action_server, menu)
99 | val del_config = menu.findItem(R.id.del_config)
100 | del_config?.isVisible = false
101 | return super.onCreateOptionsMenu(menu)
102 | }
103 |
104 | override fun onOptionsItemSelected(item: MenuItem) = when (item.itemId) {
105 | R.id.del_config -> {
106 | true
107 | }
108 | R.id.save_config -> {
109 | confirmFinish()
110 | true
111 | }
112 | else -> super.onOptionsItemSelected(item)
113 | }
114 |
115 | }
116 |
117 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/kotlin/com/v2ray/ang/AppConfig.kt:
--------------------------------------------------------------------------------
1 | package com.v2ray.ang
2 |
3 | /**
4 | *
5 | * App Config Const
6 | */
7 | object AppConfig {
8 | const val ANG_PACKAGE = "com.v2ray.ang"
9 | const val DIR_ASSETS = "assets"
10 |
11 | // legacy
12 | const val ANG_CONFIG = "ang_config"
13 | const val PREF_INAPP_BUY_IS_PREMIUM = "pref_inapp_buy_is_premium"
14 | const val PREF_ROUTING_CUSTOM = "pref_routing_custom"
15 |
16 | // Preferences mapped to MMKV
17 | const val PREF_MODE = "pref_mode"
18 | const val PREF_SPEED_ENABLED = "pref_speed_enabled"
19 | const val PREF_SNIFFING_ENABLED = "pref_sniffing_enabled"
20 | const val PREF_PROXY_SHARING = "pref_proxy_sharing_enabled"
21 | const val PREF_LOCAL_DNS_ENABLED = "pref_local_dns_enabled"
22 | const val PREF_FAKE_DNS_ENABLED = "pref_fake_dns_enabled"
23 | const val PREF_VPN_DNS = "pref_vpn_dns"
24 | const val PREF_REMOTE_DNS = "pref_remote_dns"
25 | const val PREF_DOMESTIC_DNS = "pref_domestic_dns"
26 | const val PREF_LOCAL_DNS_PORT = "pref_local_dns_port"
27 | const val PREF_ALLOW_INSECURE = "pref_allow_insecure"
28 | const val PREF_SOCKS_PORT = "pref_socks_port"
29 | const val PREF_HTTP_PORT = "pref_http_port"
30 | const val PREF_LOGLEVEL = "pref_core_loglevel"
31 | const val PREF_LANGUAGE = "pref_language"
32 | const val PREF_PREFER_IPV6 = "pref_prefer_ipv6"
33 | const val PREF_ROUTING_DOMAIN_STRATEGY = "pref_routing_domain_strategy"
34 | const val PREF_ROUTING_MODE = "pref_routing_mode"
35 | const val PREF_V2RAY_ROUTING_AGENT = "pref_v2ray_routing_agent"
36 | const val PREF_V2RAY_ROUTING_DIRECT = "pref_v2ray_routing_direct"
37 | const val PREF_V2RAY_ROUTING_BLOCKED = "pref_v2ray_routing_blocked"
38 | const val PREF_PER_APP_PROXY = "pref_per_app_proxy"
39 | const val PREF_PER_APP_PROXY_SET = "pref_per_app_proxy_set"
40 | const val PREF_BYPASS_APPS = "pref_bypass_apps"
41 | const val PREF_CONFIRM_REMOVE = "pref_confirm_remove"
42 | const val PREF_START_SCAN_IMMEDIATE = "pref_start_scan_immediate"
43 |
44 | const val HTTP_PROTOCOL: String = "http://"
45 | const val HTTPS_PROTOCOL: String = "https://"
46 |
47 | const val BROADCAST_ACTION_SERVICE = "com.v2ray.ang.action.service"
48 | const val BROADCAST_ACTION_ACTIVITY = "com.v2ray.ang.action.activity"
49 | const val BROADCAST_ACTION_WIDGET_CLICK = "com.v2ray.ang.action.widget.click"
50 |
51 | const val TASKER_EXTRA_BUNDLE = "com.twofortyfouram.locale.intent.extra.BUNDLE"
52 | const val TASKER_EXTRA_STRING_BLURB = "com.twofortyfouram.locale.intent.extra.BLURB"
53 | const val TASKER_EXTRA_BUNDLE_SWITCH = "tasker_extra_bundle_switch"
54 | const val TASKER_EXTRA_BUNDLE_GUID = "tasker_extra_bundle_guid"
55 | const val TASKER_DEFAULT_GUID = "Default"
56 |
57 | const val TAG_AGENT = "proxy"
58 | const val TAG_DIRECT = "direct"
59 | const val TAG_BLOCKED = "block"
60 |
61 | const val androidpackagenamelistUrl = "https://raw.githubusercontent.com/2dust/androidpackagenamelist/master/proxy.txt"
62 | const val v2rayCustomRoutingListUrl = "https://raw.githubusercontent.com/2dust/v2rayCustomRoutingList/master/"
63 | const val v2rayNGIssues = "https://github.com/4xmen/v2rayNG/issues"
64 | const val v2rayNGWikiMode = "https://github.com/4xmen/v2rayNG/wiki/Mode"
65 | const val promotionUrl = "aHR0cHM6Ly85LjIzNDQ1Ni54eXovYWJjLmh0bWw="
66 | const val geoUrl = "https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/";
67 |
68 | const val DNS_AGENT = "1.1.1.1"
69 | const val DNS_DIRECT = "223.5.5.5"
70 |
71 | const val PORT_LOCAL_DNS = "10853"
72 | const val PORT_SOCKS = "10808"
73 | const val PORT_HTTP = "10809"
74 |
75 | const val MSG_REGISTER_CLIENT = 1
76 | const val MSG_STATE_RUNNING = 11
77 | const val MSG_STATE_NOT_RUNNING = 12
78 | const val MSG_UNREGISTER_CLIENT = 2
79 | const val MSG_STATE_START = 3
80 | const val MSG_STATE_START_SUCCESS = 31
81 | const val MSG_STATE_START_FAILURE = 32
82 | const val MSG_STATE_STOP = 4
83 | const val MSG_STATE_STOP_SUCCESS = 41
84 | const val MSG_STATE_RESTART = 5
85 | const val MSG_MEASURE_DELAY = 6
86 | const val MSG_MEASURE_DELAY_SUCCESS = 61
87 | const val MSG_MEASURE_CONFIG = 7
88 | const val MSG_MEASURE_CONFIG_SUCCESS = 71
89 | const val MSG_MEASURE_CONFIG_CANCEL = 72
90 | }
91 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/res/layout/activity_sub_edit.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
12 |
13 |
18 |
19 |
23 |
24 |
29 |
30 |
31 |
36 |
37 |
41 |
42 |
47 |
48 |
49 |
50 |
55 |
56 |
61 |
62 |
63 |
69 |
70 |
71 |
72 |
77 |
78 |
82 |
83 |
84 |
94 |
95 |
96 |
97 |
98 |
99 |
105 |
106 |
107 |
--------------------------------------------------------------------------------
/V2rayNG/app/src/main/kotlin/com/v2ray/ang/ui/SubSettingRecyclerAdapter.kt:
--------------------------------------------------------------------------------
1 | package com.v2ray.ang.ui
2 |
3 | import android.content.Intent
4 | import android.graphics.Color
5 | import android.text.TextUtils
6 | import android.view.LayoutInflater
7 | import android.view.View
8 | import androidx.recyclerview.widget.RecyclerView
9 | import android.view.ViewGroup
10 | import androidx.appcompat.app.AlertDialog
11 | import com.google.gson.Gson
12 | import com.tencent.mmkv.MMKV
13 | import com.v2ray.ang.R
14 | import com.v2ray.ang.databinding.ItemQrcodeBinding
15 | import com.v2ray.ang.databinding.ItemRecyclerSubSettingBinding
16 | import com.v2ray.ang.dto.EConfigType
17 | import com.v2ray.ang.extension.toast
18 | import com.v2ray.ang.util.AngConfigManager
19 | import com.v2ray.ang.util.MmkvManager
20 | import com.v2ray.ang.util.QRCodeDecoder
21 | import com.v2ray.ang.util.Utils
22 |
23 | class SubSettingRecyclerAdapter(val activity: SubSettingActivity) :
24 | RecyclerView.Adapter() {
25 |
26 | private var mActivity: SubSettingActivity = activity
27 | private val subStorage by lazy { MMKV.mmkvWithID(MmkvManager.ID_SUB, MMKV.MULTI_PROCESS_MODE) }
28 |
29 | private val share_method: Array by lazy {
30 | mActivity.resources.getStringArray(R.array.share_sub_method)
31 | }
32 |
33 | override fun getItemCount() = mActivity.subscriptions.size
34 |
35 | override fun onBindViewHolder(holder: MainViewHolder, position: Int) {
36 | val subId = mActivity.subscriptions[position].first
37 | val subItem = mActivity.subscriptions[position].second
38 | holder.itemSubSettingBinding.tvName.text = subItem.remarks
39 | holder.itemSubSettingBinding.tvUrl.text = subItem.url
40 | if (subItem.enabled) {
41 | holder.itemSubSettingBinding.chkEnable.setBackgroundResource(R.color.colorSelected)
42 | } else {
43 | holder.itemSubSettingBinding.chkEnable.setBackgroundResource(R.color.colorUnselected)
44 | }
45 | holder.itemView.setBackgroundColor(Color.TRANSPARENT)
46 |
47 | holder.itemSubSettingBinding.layoutEdit.setOnClickListener {
48 | mActivity.startActivity(
49 | Intent(mActivity, SubEditActivity::class.java)
50 | .putExtra("subId", subId)
51 | )
52 | }
53 | holder.itemSubSettingBinding.infoContainer.setOnClickListener {
54 | subItem.enabled = !subItem.enabled
55 | subStorage?.encode(subId, Gson().toJson(subItem))
56 | notifyItemChanged(position)
57 | }
58 |
59 | if (TextUtils.isEmpty(subItem.url)) {
60 | holder.itemSubSettingBinding.layoutShare.visibility = View.INVISIBLE
61 | } else {
62 | holder.itemSubSettingBinding.layoutShare.setOnClickListener {
63 | AlertDialog.Builder(mActivity)
64 | .setItems(share_method.asList().toTypedArray()) { _, i ->
65 | try {
66 | when (i) {
67 | 0 -> {
68 | val ivBinding =
69 | ItemQrcodeBinding.inflate(LayoutInflater.from(mActivity))
70 | ivBinding.ivQcode.setImageBitmap(
71 | QRCodeDecoder.createQRCode(
72 | subItem.url
73 |
74 | )
75 | )
76 | AlertDialog.Builder(mActivity).setView(ivBinding.root).show()
77 | }
78 |
79 | 1 -> {
80 | Utils.setClipboard(mActivity, subItem.url)
81 | }
82 |
83 | else -> mActivity.toast("else")
84 | }
85 | } catch (e: Exception) {
86 | e.printStackTrace()
87 | }
88 | }.show()
89 | }
90 | }
91 | }
92 |
93 | override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): MainViewHolder {
94 | return MainViewHolder(
95 | ItemRecyclerSubSettingBinding.inflate(
96 | LayoutInflater.from(parent.context),
97 | parent,
98 | false
99 | )
100 | )
101 | }
102 |
103 | class MainViewHolder(val itemSubSettingBinding: ItemRecyclerSubSettingBinding) :
104 | RecyclerView.ViewHolder(itemSubSettingBinding.root)
105 | }
106 |
--------------------------------------------------------------------------------