feat: add donate dialog shown on app startup

This commit is contained in:
zarazaex69
2026-05-24 15:19:43 +03:00
parent 0adcbfcaf5
commit 35f2a1079b
5 changed files with 667 additions and 102 deletions
@@ -78,6 +78,10 @@ object AppConfig {
const val PREF_DYNAMIC_COLORS = "pref_dynamic_colors"
const val PREF_SUBSCRIPTIONS_BOTTOM = "pref_subscriptions_bottom"
/** Donate dialog flags. */
const val PREF_DONATE_DIALOG_DISMISSED = "pref_donate_dialog_dismissed"
const val PREF_DONATE_DIALOG_POSTPONE_UNTIL = "pref_donate_dialog_postpone_until"
/** Cache keys. */
const val CACHE_SUBSCRIPTION_ID = "cache_subscription_id"
@@ -199,6 +199,7 @@ class MainActivity : HelperBaseActivity(), NavigationView.OnNavigationItemSelect
}
checkForUpdatesOnStartup()
showDonateDialogIfNeeded()
}
private fun setupViewModel() {
@@ -851,6 +852,68 @@ class MainActivity : HelperBaseActivity(), NavigationView.OnNavigationItemSelect
}
}
private fun showDonateDialogIfNeeded() {
if (MmkvManager.decodeSettingsBool(AppConfig.PREF_DONATE_DIALOG_DISMISSED)) return
val postponeUntil = MmkvManager.decodeSettingsLong(AppConfig.PREF_DONATE_DIALOG_POSTPONE_UNTIL, 0L)
if (System.currentTimeMillis() < postponeUntil) return
// Откладываем на следующий тик, чтобы Activity полностью отрисовался
binding.root.post { showDonateDialog() }
}
private fun showDonateDialog() {
val view = layoutInflater.inflate(R.layout.dialog_donate, null)
val tonValue = view.findViewById<TextView>(R.id.donate_ton_value)
val trcValue = view.findViewById<TextView>(R.id.donate_trc_value)
val btcValue = view.findViewById<TextView>(R.id.donate_btc_value)
val openCard = View.OnClickListener { openUrl(getString(R.string.donate_card_link_url)) }
view.findViewById<View>(R.id.donate_card_row).setOnClickListener(openCard)
view.findViewById<View>(R.id.donate_card_open).setOnClickListener(openCard)
view.findViewById<View>(R.id.donate_ton_copy).setOnClickListener {
copyToClipboard(tonValue.text.toString())
}
view.findViewById<View>(R.id.donate_trc_copy).setOnClickListener {
copyToClipboard(trcValue.text.toString())
}
view.findViewById<View>(R.id.donate_btc_copy).setOnClickListener {
copyToClipboard(btcValue.text.toString())
}
MaterialAlertDialogBuilder(this)
.setTitle(R.string.donate_dialog_title)
.setView(view)
.setNegativeButton(R.string.donate_btn_dont_show) { dialog, _ ->
MmkvManager.encodeSettings(AppConfig.PREF_DONATE_DIALOG_DISMISSED, true)
dialog.dismiss()
}
.setPositiveButton(R.string.donate_btn_postpone) { dialog, _ ->
val postponeUntil = System.currentTimeMillis() + 24L * 60 * 60 * 1000
MmkvManager.encodeSettings(AppConfig.PREF_DONATE_DIALOG_POSTPONE_UNTIL, postponeUntil)
dialog.dismiss()
}
.setCancelable(true)
.show()
}
private fun copyToClipboard(text: String) {
val clipboard = getSystemService(android.content.Context.CLIPBOARD_SERVICE) as android.content.ClipboardManager
clipboard.setPrimaryClip(android.content.ClipData.newPlainText("addr", text))
toast(R.string.donate_toast_copied)
}
private fun openUrl(url: String) {
try {
val intent = Intent(Intent.ACTION_VIEW, Uri.parse(url))
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
startActivity(intent)
} catch (e: Exception) {
Log.w("MainActivity", "Failed to open url: $url", e)
}
}
private fun delAllConfig() {
MaterialAlertDialogBuilder(this).setMessage(R.string.del_config_comfirm)
.setPositiveButton(android.R.string.ok) { _, _ ->
@@ -0,0 +1,243 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingHorizontal="24dp"
android:paddingTop="4dp"
android:paddingBottom="8dp">
<!-- Карта / СБП -->
<com.google.android.material.card.MaterialCardView
android:id="@+id/donate_card_row"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:clickable="true"
android:focusable="true"
app:cardBackgroundColor="?attr/colorSurfaceContainerHigh"
app:cardCornerRadius="14dp"
app:cardElevation="0dp"
app:strokeWidth="0dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingStart="14dp"
android:paddingEnd="6dp"
android:paddingTop="10dp"
android:paddingBottom="10dp">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/donate_label_card"
android:textAppearance="@style/TextAppearance.Material3.TitleSmall"
android:textColor="?attr/colorOnSurface" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:ellipsize="end"
android:maxLines="1"
android:text="@string/donate_card_url"
android:textAppearance="@style/TextAppearance.Material3.BodySmall"
android:textColor="?attr/colorOnSurfaceVariant"
android:typeface="monospace" />
</LinearLayout>
<com.google.android.material.button.MaterialButton
android:id="@+id/donate_card_open"
style="@style/Widget.Material3.Button.IconButton"
android:layout_width="40dp"
android:layout_height="40dp"
android:contentDescription="@string/donate_open_link"
app:icon="@drawable/ic_share_24dp"
app:iconSize="20dp"
app:iconTint="?attr/colorOnSurfaceVariant" />
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
<!-- TON -->
<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
app:cardBackgroundColor="?attr/colorSurfaceContainerHigh"
app:cardCornerRadius="14dp"
app:cardElevation="0dp"
app:strokeWidth="0dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingStart="14dp"
android:paddingEnd="6dp"
android:paddingTop="10dp"
android:paddingBottom="10dp">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/donate_label_ton"
android:textAppearance="@style/TextAppearance.Material3.TitleSmall"
android:textColor="?attr/colorOnSurface" />
<TextView
android:id="@+id/donate_ton_value"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:ellipsize="middle"
android:maxLines="1"
android:text="@string/donate_addr_ton"
android:textAppearance="@style/TextAppearance.Material3.BodySmall"
android:textColor="?attr/colorOnSurfaceVariant"
android:typeface="monospace" />
</LinearLayout>
<com.google.android.material.button.MaterialButton
android:id="@+id/donate_ton_copy"
style="@style/Widget.Material3.Button.IconButton"
android:layout_width="40dp"
android:layout_height="40dp"
android:contentDescription="@string/donate_copy"
app:icon="@drawable/ic_copy"
app:iconSize="20dp"
app:iconTint="?attr/colorOnSurfaceVariant" />
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
<!-- TRC20 -->
<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
app:cardBackgroundColor="?attr/colorSurfaceContainerHigh"
app:cardCornerRadius="14dp"
app:cardElevation="0dp"
app:strokeWidth="0dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingStart="14dp"
android:paddingEnd="6dp"
android:paddingTop="10dp"
android:paddingBottom="10dp">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/donate_label_trc20"
android:textAppearance="@style/TextAppearance.Material3.TitleSmall"
android:textColor="?attr/colorOnSurface" />
<TextView
android:id="@+id/donate_trc_value"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:ellipsize="middle"
android:maxLines="1"
android:text="@string/donate_addr_trc20"
android:textAppearance="@style/TextAppearance.Material3.BodySmall"
android:textColor="?attr/colorOnSurfaceVariant"
android:typeface="monospace" />
</LinearLayout>
<com.google.android.material.button.MaterialButton
android:id="@+id/donate_trc_copy"
style="@style/Widget.Material3.Button.IconButton"
android:layout_width="40dp"
android:layout_height="40dp"
android:contentDescription="@string/donate_copy"
app:icon="@drawable/ic_copy"
app:iconSize="20dp"
app:iconTint="?attr/colorOnSurfaceVariant" />
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
<!-- BTC -->
<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardBackgroundColor="?attr/colorSurfaceContainerHigh"
app:cardCornerRadius="14dp"
app:cardElevation="0dp"
app:strokeWidth="0dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingStart="14dp"
android:paddingEnd="6dp"
android:paddingTop="10dp"
android:paddingBottom="10dp">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/donate_label_btc"
android:textAppearance="@style/TextAppearance.Material3.TitleSmall"
android:textColor="?attr/colorOnSurface" />
<TextView
android:id="@+id/donate_btc_value"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:ellipsize="middle"
android:maxLines="1"
android:text="@string/donate_addr_btc"
android:textAppearance="@style/TextAppearance.Material3.BodySmall"
android:textColor="?attr/colorOnSurfaceVariant"
android:typeface="monospace" />
</LinearLayout>
<com.google.android.material.button.MaterialButton
android:id="@+id/donate_btc_copy"
style="@style/Widget.Material3.Button.IconButton"
android:layout_width="40dp"
android:layout_height="40dp"
android:contentDescription="@string/donate_copy"
app:icon="@drawable/ic_copy"
app:iconSize="20dp"
app:iconTint="?attr/colorOnSurfaceVariant" />
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
</LinearLayout>
@@ -678,4 +678,16 @@
<item>WebDAV</item>
</string-array>
<!-- Donate dialog -->
<string name="donate_dialog_title">Поддержите нас</string>
<string name="donate_label_card">Карта</string>
<string name="donate_label_ton">TON</string>
<string name="donate_label_trc20">TRC20</string>
<string name="donate_label_btc">BTC</string>
<string name="donate_copy">Копировать</string>
<string name="donate_open_link">Открыть</string>
<string name="donate_btn_dont_show">Не показывать</string>
<string name="donate_btn_postpone">Позже</string>
<string name="donate_toast_copied">Скопировано</string>
</resources>
+345 -102
View File
@@ -1,22 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8" ?>
<resources>
<string name="app_name" translatable="false">olcng</string>
<string name="app_widget_name">Switch</string>
<string name="app_tile_name">Switch</string>
<string name="app_tile_first_use">First use of this feature, please use the app to add server</string>
<string
name="app_tile_first_use"
>First use of this feature, please use the app to add server</string>
<string name="navigation_drawer_open">Open navigation drawer</string>
<string name="navigation_drawer_close">Close navigation drawer</string>
<string name="migration_success">Data migration success!</string>
<string name="drawer_forked_text" translatable="false">forked from <a href="https://github.com/2dust/v2rayng">V2RayNG</a></string>
<string name="drawer_developed_text" translatable="false">developed by developers from <a href="https://t.me/openlibrecommunity">Olc</a></string>
<string name="drawer_forked_text" translatable="false">forked from <a
href="https://github.com/2dust/v2rayng"
>V2RayNG</a></string>
<string
name="drawer_developed_text"
translatable="false"
>developed by developers from <a
href="https://t.me/openlibrecommunity"
>Olc</a></string>
<string name="action_stop_service">Stop service</string>
<string name="migration_fail">Data migration failed!</string>
<string name="pull_down_to_refresh">Please pull down to refresh!</string>
<!-- Notifications -->
<string name="notification_action_stop_v2ray">Stop</string>
<string name="toast_permission_denied">Unable to obtain the permission</string>
<string name="toast_permission_denied_notification">Unable to obtain the notification permission</string>
<string
name="toast_permission_denied"
>Unable to obtain the permission</string>
<string
name="toast_permission_denied_notification"
>Unable to obtain the notification permission</string>
<string name="notification_action_more">Click for more</string>
<string name="toast_services_start">Start Services</string>
<string name="toast_services_stop">Stop Services</string>
@@ -30,19 +43,31 @@
<string name="menu_item_edit_config">Edit config</string>
<string name="menu_item_del_config">Delete config</string>
<string name="menu_item_import_config_qrcode">Import from QRcode</string>
<string name="menu_item_import_config_clipboard">Import from Clipboard</string>
<string
name="menu_item_import_config_clipboard"
>Import from Clipboard</string>
<string name="menu_item_import_config_local">Import from locally</string>
<string name="menu_item_import_config_policy_group">Add [Policy group]</string>
<string
name="menu_item_import_config_policy_group"
>Add [Policy group]</string>
<string name="menu_item_import_config_manually_vmess">Add [VMess]</string>
<string name="menu_item_import_config_manually_vless">Add [VLESS]</string>
<string name="menu_item_import_config_manually_ss">Add [Shadowsocks]</string>
<string
name="menu_item_import_config_manually_ss"
>Add [Shadowsocks]</string>
<string name="menu_item_import_config_manually_socks">Add [SOCKS]</string>
<string name="menu_item_import_config_manually_http">Add [HTTP]</string>
<string name="menu_item_import_config_manually_trojan">Add [Trojan]</string>
<string name="menu_item_import_config_manually_wireguard">Add [Wireguard]</string>
<string name="menu_item_import_config_manually_hysteria2">Add [Hysteria2]</string>
<string
name="menu_item_import_config_manually_wireguard"
>Add [Wireguard]</string>
<string
name="menu_item_import_config_manually_hysteria2"
>Add [Hysteria2]</string>
<string name="del_config_comfirm">Confirm delete ?</string>
<string name="del_invalid_config_comfirm">Please test before deleting! Confirm delete ?</string>
<string
name="del_invalid_config_comfirm"
>Please test before deleting! Confirm delete ?</string>
<string name="server_lab_remarks">remarks</string>
<string name="server_lab_address">address</string>
<string name="server_lab_port">port</string>
@@ -70,7 +95,10 @@
<string name="server_lab_path_kcp">kcp seed</string>
<string name="server_lab_path_grpc">gRPC serviceName</string>
<string name="server_lab_stream_security">TLS</string>
<string name="server_lab_stream_fingerprint" translatable="false">Fingerprint</string>
<string
name="server_lab_stream_fingerprint"
translatable="false"
>Fingerprint</string>
<string name="server_lab_stream_alpn">Alpn</string>
<string name="server_lab_allow_insecure">allowInsecure</string>
<string name="server_lab_sni">SNI</string>
@@ -88,8 +116,12 @@
<string name="server_lab_spider_x">SpiderX</string>
<string name="server_lab_mldsa65_verify">Mldsa65Verify</string>
<string name="server_lab_secret_key">SecretKey</string>
<string name="server_lab_reserved">Reserved(Optional, separated by commas)</string>
<string name="server_lab_local_address">Local address (optional IPv4/IPv6, separated by commas)</string>
<string
name="server_lab_reserved"
>Reserved(Optional, separated by commas)</string>
<string
name="server_lab_local_address"
>Local address (optional IPv4/IPv6, separated by commas)</string>
<string name="server_lab_local_mtu">Mtu(optional, default 1420)</string>
<string name="toast_success">Success</string>
<string name="toast_failure">Failure</string>
@@ -97,31 +129,53 @@
<string name="toast_incorrect_protocol">Incorrect protocol</string>
<string name="toast_decoding_failed">Decoding failed</string>
<string name="title_file_chooser">Select a config</string>
<string name="toast_require_file_manager">Please install a File Manager.</string>
<string
name="toast_require_file_manager"
>Please install a File Manager.</string>
<string name="server_customize_config">Customize config</string>
<string name="toast_config_file_invalid">Invalid config</string>
<string name="server_lab_content">Content</string>
<string name="toast_none_data_clipboard">There is no data in the clipboard</string>
<string
name="toast_none_data_clipboard"
>There is no data in the clipboard</string>
<string name="toast_invalid_url">Invalid URL</string>
<string name="toast_insecure_url_protocol">Please do not use the insecure HTTP protocol subscription address</string>
<string name="server_lab_need_inbound">Ensure inbounds port is consistent with the settings</string>
<string
name="toast_insecure_url_protocol"
>Please do not use the insecure HTTP protocol subscription address</string>
<string
name="server_lab_need_inbound"
>Ensure inbounds port is consistent with the settings</string>
<string name="toast_malformed_josn">Config malformed</string>
<string name="server_lab_request_host6">Host(SNI)(Optional)</string>
<string name="toast_action_not_allowed">Action not allowed</string>
<string name="server_obfs_password">Obfs password</string>
<string name="server_lab_port_hop">Port Hopping(will override the port)</string>
<string
name="server_lab_port_hop"
>Port Hopping(will override the port)</string>
<string name="server_lab_port_hop_interval">Port Hopping Interval</string>
<string name="server_lab_bandwidth_down">Bandwidth down (Supported units: k/m/g/t)</string>
<string name="server_lab_bandwidth_up">Bandwidth up (Supported units: k/m/g/t)</string>
<string
name="server_lab_bandwidth_down"
>Bandwidth down (Supported units: k/m/g/t)</string>
<string
name="server_lab_bandwidth_up"
>Bandwidth up (Supported units: k/m/g/t)</string>
<string name="server_lab_xhttp_mode">XHTTP Mode</string>
<string name="server_lab_xhttp_extra">XHTTP Extra raw JSON, format: { XHTTPObject }</string>
<string name="server_lab_final_mask">finalMask raw JSON, format: { FinalMaskObject }</string>
<string
name="server_lab_xhttp_extra"
>XHTTP Extra raw JSON, format: { XHTTPObject }</string>
<string
name="server_lab_final_mask"
>finalMask raw JSON, format: { FinalMaskObject }</string>
<string name="server_lab_ech_config_list">EchConfigList</string>
<string name="server_lab_ech_force_query">EchForceQuery</string>
<string name="server_lab_pinned_ca256">Certificate fingerprint (SHA-256)</string>
<string
name="server_lab_pinned_ca256"
>Certificate fingerprint (SHA-256)</string>
<!-- UserAssetActivity -->
<string name="toast_asset_copy_failed">File copy failed, please use File Manager</string>
<string
name="toast_asset_copy_failed"
>File copy failed, please use File Manager</string>
<string name="menu_item_add_asset">Add asset</string>
<string name="menu_item_add_file">Add files</string>
<string name="menu_item_add_url">Add URL</string>
@@ -146,7 +200,9 @@
<string name="menu_item_import_proxy_app">Import from Clipboard</string>
<string name="per_app_proxy_settings">Раздельное туннелирование</string>
<string name="per_app_proxy_settings_enable">Включить</string>
<string name="split_tunneling_description">Выберите приложения, которые будут использовать VPN — остальные приложения, например банки, будут идти напрямую через ваш домашний интернет.\n\nВ режиме обхода всё зеркально — выбранные приложения не используют VPN.</string>
<string
name="split_tunneling_description"
>Выберите приложения, которые будут использовать VPN — остальные приложения, например банки, будут идти напрямую через ваш домашний интернет.\n\nВ режиме обхода всё зеркально — выбранные приложения не используют VPN.</string>
<!-- Preferences -->
<string name="title_settings">Settings</string>
@@ -154,24 +210,44 @@
<string name="title_core_settings">Core Settings</string>
<string name="title_vpn_settings">VPN Settings</string>
<string name="title_pref_per_app_proxy">Per-app proxy</string>
<string name="summary_pref_per_app_proxy">General: Checked apps use proxy, unchecked apps connect directly; \nBypass mode: checked apps connect directly, unchecked apps use proxy. \nThe option to automatically select proxy applications is in the menu</string>
<string
name="summary_pref_per_app_proxy"
>General: Checked apps use proxy, unchecked apps connect directly; \nBypass mode: checked apps connect directly, unchecked apps use proxy. \nThe option to automatically select proxy applications is in the menu</string>
<string name="title_pref_is_booted">Auto connect at startup</string>
<string name="summary_pref_is_booted">Automatically connects to the selected server at startup, which may be unsuccessful</string>
<string
name="summary_pref_is_booted"
>Automatically connects to the selected server at startup, which may be unsuccessful</string>
<string name="title_pref_auto_sort_after_test">Auto sort after testing</string>
<string name="summary_pref_auto_sort_after_test">Test results may not be accurate;</string>
<string
name="title_pref_auto_sort_after_test"
>Auto sort after testing</string>
<string
name="summary_pref_auto_sort_after_test"
>Test results may not be accurate;</string>
<string name="title_pref_show_copy_button">Show copy button</string>
<string name="summary_pref_show_copy_button">Show button to copy server configuration to clipboard</string>
<string
name="summary_pref_show_copy_button"
>Show button to copy server configuration to clipboard</string>
<string name="title_pref_show_server_ip">Show server IP / host</string>
<string name="summary_pref_show_server_ip">Display the server IP address or host under the server name</string>
<string
name="summary_pref_show_server_ip"
>Display the server IP address or host under the server name</string>
<string name="title_mux_settings">Mux Settings</string>
<string name="title_pref_mux_enabled">Enable Mux</string>
<string name="summary_pref_mux_enabled">Faster, but it may cause unstable connectivity\nCustomize how to handle TCP, UDP and QUIC below</string>
<string name="title_pref_mux_concurency">TCP connections(range -1 to 1024)</string>
<string name="title_pref_mux_xudp_concurency">XUDP connections(range -1 to 1024)</string>
<string name="title_pref_mux_xudp_quic">Handling of QUIC in mux tunnel</string>
<string
name="summary_pref_mux_enabled"
>Faster, but it may cause unstable connectivity\nCustomize how to handle TCP, UDP and QUIC below</string>
<string
name="title_pref_mux_concurency"
>TCP connections(range -1 to 1024)</string>
<string
name="title_pref_mux_xudp_concurency"
>XUDP connections(range -1 to 1024)</string>
<string
name="title_pref_mux_xudp_quic"
>Handling of QUIC in mux tunnel</string>
<string-array name="mux_xudp_quic_entries">
<item>reject</item>
<item>allow</item>
@@ -179,30 +255,46 @@
</string-array>
<string name="title_pref_speed_enabled">Enable speed display</string>
<string name="summary_pref_speed_enabled">Display current speed in the notification.\nNotification icon would change based on
<string
name="summary_pref_speed_enabled"
>Display current speed in the notification.\nNotification icon would change based on
usage.</string>
<string name="title_pref_sniffing_enabled">Enable Sniffing</string>
<string name="summary_pref_sniffing_enabled">Try sniff domain from the packet (default on)</string>
<string
name="summary_pref_sniffing_enabled"
>Try sniff domain from the packet (default on)</string>
<string name="title_pref_route_only_enabled">Enable routeOnly</string>
<string name="summary_pref_route_only_enabled">Use the sniffed domain name for routing only, and keep the target address as the IP address.</string>
<string
name="summary_pref_route_only_enabled"
>Use the sniffed domain name for routing only, and keep the target address as the IP address.</string>
<string name="title_pref_local_dns_enabled">Enable local DNS</string>
<string name="summary_pref_local_dns_enabled">DNS processed by core‘s DNS module (Recommended if you need routing bypassing LAN and mainland addresses)</string>
<string
name="summary_pref_local_dns_enabled"
>DNS processed by core‘s DNS module (Recommended if you need routing bypassing LAN and mainland addresses)</string>
<string name="title_pref_fake_dns_enabled">Enable fake DNS</string>
<string name="summary_pref_fake_dns_enabled">Local DNS returns fake IP addresses (faster, but it may not work for some apps)</string>
<string
name="summary_pref_fake_dns_enabled"
>Local DNS returns fake IP addresses (faster, but it may not work for some apps)</string>
<string name="title_pref_prefer_ipv6">Prefer IPv6</string>
<string name="summary_pref_prefer_ipv6">Enable IPv6 routes and Prefer IPv6 addresses</string>
<string
name="summary_pref_prefer_ipv6"
>Enable IPv6 routes and Prefer IPv6 addresses</string>
<string name="title_pref_remote_dns">Remote DNS (udp/tcp/https/quic)(Optional)</string>
<string
name="title_pref_remote_dns"
>Remote DNS (udp/tcp/https/quic)(Optional)</string>
<string name="summary_pref_remote_dns">DNS</string>
<string name="title_pref_vpn_dns">VPN DNS (only IPv4/v6)</string>
<string name="title_pref_vpn_bypass_lan">Does VPN bypass LAN</string>
<string name="title_pref_vpn_interface_address">VPN Interface Address</string>
<string
name="title_pref_vpn_interface_address"
>VPN Interface Address</string>
<string name="title_pref_vpn_mtu">VPN MTU (default 1500)</string>
@@ -210,21 +302,33 @@
<string name="title_pref_domestic_dns">Domestic DNS (Optional)</string>
<string name="summary_pref_domestic_dns">DNS</string>
<string name="title_pref_dns_hosts">DNS hosts (Format: domain:address,…)</string>
<string
name="title_pref_dns_hosts"
>DNS hosts (Format: domain:address,…)</string>
<string name="summary_pref_dns_hosts">domain:address,…</string>
<string name="title_pref_delay_test_url">True delay test url </string>
<string name="summary_pref_delay_test_url">Url</string>
<string name="title_pref_ip_api_url">Current connection info test url</string>
<string
name="title_pref_ip_api_url"
>Current connection info test url</string>
<string name="summary_pref_ip_api_url">Url</string>
<string name="title_pref_proxy_sharing_enabled">Allow connections from the LAN</string>
<string name="summary_pref_proxy_sharing_enabled">Other devices can connect to proxy by your IP address through local proxy. Only enable in trusted networks to avoid unauthorized connections</string>
<string name="toast_warning_pref_proxysharing_short">Allow connections from the LAN. Make sure you are in a trusted network</string>
<string
name="title_pref_proxy_sharing_enabled"
>Allow connections from the LAN</string>
<string
name="summary_pref_proxy_sharing_enabled"
>Other devices can connect to proxy by your IP address through local proxy. Only enable in trusted networks to avoid unauthorized connections</string>
<string
name="toast_warning_pref_proxysharing_short"
>Allow connections from the LAN. Make sure you are in a trusted network</string>
<string name="title_pref_allow_insecure">allowInsecure</string>
<string name="summary_pref_allow_insecure">When TLS is selected, allow insecure connections by default</string>
<string
name="summary_pref_allow_insecure"
>When TLS is selected, allow insecure connections by default</string>
<string name="title_pref_socks_port">Local proxy port</string>
<string name="summary_pref_socks_port">Local proxy port</string>
@@ -233,23 +337,41 @@
<string name="summary_pref_local_dns_port">Local DNS port</string>
<string name="title_pref_confirm_remove">Delete config confirmation</string>
<string name="summary_pref_confirm_remove">Whether deleting a config requires a second confirmation by the user</string>
<string
name="summary_pref_confirm_remove"
>Whether deleting a config requires a second confirmation by the user</string>
<string name="title_pref_start_scan_immediate">Start scanning immediately</string>
<string name="summary_pref_start_scan_immediate">Open the camera to scan immediately at startup, otherwise you can choose to scan the code or select a photo in the toolbar</string>
<string
name="title_pref_start_scan_immediate"
>Start scanning immediately</string>
<string
name="summary_pref_start_scan_immediate"
>Open the camera to scan immediately at startup, otherwise you can choose to scan the code or select a photo in the toolbar</string>
<string name="title_pref_append_http_proxy">Append HTTP Proxy to VPN</string>
<string name="summary_pref_append_http_proxy">HTTP proxy will be used directly from (browser/ some supported apps), without going through the virtual NIC device (Android 10+)</string>
<string
name="title_pref_append_http_proxy"
>Append HTTP Proxy to VPN</string>
<string
name="summary_pref_append_http_proxy"
>HTTP proxy will be used directly from (browser/ some supported apps), without going through the virtual NIC device (Android 10+)</string>
<string name="title_pref_double_column_display">Enable double column display</string>
<string name="summary_pref_double_column_display">The profile list is displayed in double columns, allowing more content to be displayed on the screen. You need to restart the application to take effect.</string>
<string
name="title_pref_double_column_display"
>Enable double column display</string>
<string
name="summary_pref_double_column_display"
>The profile list is displayed in double columns, allowing more content to be displayed on the screen. You need to restart the application to take effect.</string>
<string name="title_pref_group_all_display">Enable show all groups</string>
<string name="summary_pref_group_all_display">Add an extra "All Tabs" page</string>
<string
name="summary_pref_group_all_display"
>Add an extra "All Tabs" page</string>
<!-- AboutActivity -->
<string name="title_pref_feedback">Feedback</string>
<string name="summary_pref_feedback">Feedback enhancements or bugs to GitHub</string>
<string
name="summary_pref_feedback"
>Feedback enhancements or bugs to GitHub</string>
<string name="summary_pref_tg_group">Join Telegram Group</string>
<string name="toast_tg_app_not_found">Telegram app not found</string>
<string name="title_privacy_policy">Privacy policy</string>
@@ -261,25 +383,45 @@
<string name="title_pref_promotion">Promotion</string>
<string name="title_pref_auto_update_subscription">Automatic update subscriptions</string>
<string name="summary_pref_auto_update_subscription">Update your subscriptions automatically at set intervals in the background. Depending on the device, this feature may not always work</string>
<string name="title_pref_auto_update_interval">Auto Update Interval (Minutes, Min value 15)</string>
<string
name="title_pref_auto_update_subscription"
>Automatic update subscriptions</string>
<string
name="summary_pref_auto_update_subscription"
>Update your subscriptions automatically at set intervals in the background. Depending on the device, this feature may not always work</string>
<string
name="title_pref_auto_update_interval"
>Auto Update Interval (Minutes, Min value 15)</string>
<string name="title_core_loglevel">Log Level</string>
<string name="title_outbound_domain_resolve_method">Outbound domain pre-resolve method</string>
<string
name="title_outbound_domain_resolve_method"
>Outbound domain pre-resolve method</string>
<string name="title_mode">Mode</string>
<string name="title_mode_help">Click me for more help</string>
<string name="title_language">Language</string>
<string name="title_ui_settings">UI settings</string>
<string name="title_pref_ui_mode_night">UI mode settings</string>
<string name="title_pref_dynamic_colors">Dynamic colors (Material You)</string>
<string name="summary_pref_dynamic_colors">Use wallpaper-based colors (Android 12+). Requires app restart.</string>
<string name="title_pref_subscriptions_bottom">Subscriptions panel at the bottom</string>
<string name="summary_pref_subscriptions_bottom">Move the subscription tabs below the server list</string>
<string
name="title_pref_dynamic_colors"
>Dynamic colors (Material You)</string>
<string
name="summary_pref_dynamic_colors"
>Use wallpaper-based colors (Android 12+). Requires app restart.</string>
<string
name="title_pref_subscriptions_bottom"
>Subscriptions panel at the bottom</string>
<string
name="summary_pref_subscriptions_bottom"
>Move the subscription tabs below the server list</string>
<string name="title_pref_use_hev_tunnel">Enable Hev TUN Feature</string>
<string name="summary_pref_use_hev_tunnel">When enabled, TUN will use hev-socks5-tunnel; otherwise, it will use xray-core.</string>
<string
name="summary_pref_use_hev_tunnel"
>When enabled, TUN will use hev-socks5-tunnel; otherwise, it will use xray-core.</string>
<string name="title_pref_hev_tunnel_loglevel">Hev Tun Log Level</string>
<string name="title_pref_hev_tunnel_rw_timeout">Hev Tun read/write timeout (seconds) (tcp,udp default 300,60)</string>
<string
name="title_pref_hev_tunnel_rw_timeout"
>Hev Tun read/write timeout (seconds) (tcp,udp default 300,60)</string>
<string name="restart_required">Restart required to apply changes</string>
<string name="title_logcat">Logcat</string>
@@ -298,9 +440,13 @@
<string name="sub_setting_enable">Enable update</string>
<string name="sub_auto_update">Enable automatic update</string>
<string name="sub_allow_insecure_url">Allow insecure HTTP address</string>
<string name="sub_setting_pre_profile">Previous proxy config remarks</string>
<string
name="sub_setting_pre_profile"
>Previous proxy config remarks</string>
<string name="sub_setting_next_profile">Next proxy config remarks</string>
<string name="sub_setting_pre_profile_tip">The config remarks exist and are unique</string>
<string
name="sub_setting_pre_profile_tip"
>The config remarks exist and are unique</string>
<string name="title_sub_update">Update subscription</string>
<string name="title_ping_all_server">Tcping config</string>
<string name="title_real_ping_all_server">Real delay config</string>
@@ -308,17 +454,29 @@
<string name="title_sort_by_test_results">Sorting by test results</string>
<string name="title_filter_config">Filter config</string>
<string name="filter_config_all">All</string>
<string name="title_del_duplicate_config_count">Delete %d duplicate configs</string>
<string
name="title_del_duplicate_config_count"
>Delete %d duplicate configs</string>
<string name="title_del_config_count">Delete %d configs</string>
<string name="title_import_config_count">Import %d configs</string>
<string name="title_export_config_count">Export %d configs</string>
<string name="title_update_config_count">Update %d configs</string>
<string name="title_updating">Updating…</string>
<string name="title_update_subscription_result">Updated %1$d configs (%2$d success, %3$d failed, %4$d skipped)</string>
<string name="title_update_subscription_no_subscription">No subscriptions</string>
<string name="toast_server_not_found_in_group">Selected server not found in current group</string>
<string name="toast_fragment_not_available">Unable to locate current view</string>
<string name="title_locate_selected_config">Locate the selected config</string>
<string
name="title_update_subscription_result"
>Updated %1$d configs (%2$d success, %3$d failed, %4$d skipped)</string>
<string
name="title_update_subscription_no_subscription"
>No subscriptions</string>
<string
name="toast_server_not_found_in_group"
>Selected server not found in current group</string>
<string
name="toast_fragment_not_available"
>Unable to locate current view</string>
<string
name="title_locate_selected_config"
>Locate the selected config</string>
<string name="tasker_start_service">Start Service</string>
<string name="tasker_setting_confirm">Confirm</string>
@@ -326,64 +484,117 @@
<!-- RoutingSettingActivity -->
<string name="routing_settings_domain_strategy">Domain strategy</string>
<string name="routing_settings_title">Routing Settings</string>
<string name="routing_settings_tips">Separated by commas(,), choose domain or ip</string>
<string
name="routing_settings_tips"
>Separated by commas(,), choose domain or ip</string>
<string name="routing_settings_save">Save</string>
<string name="routing_settings_delete">Clear</string>
<string name="routing_settings_rule_title">Routing Rule Settings</string>
<string name="routing_settings_add_rule">Add rule</string>
<string name="routing_settings_import_predefined_rulesets">Import predefined rulesets</string>
<string name="routing_settings_import_rulesets_tip">Existing rulesets will be deleted, are you sure to continue?</string>
<string name="routing_settings_import_rulesets_from_clipboard">Import ruleset from clipboard</string>
<string name="routing_settings_import_rulesets_from_qrcode">Import ruleset from QRcode</string>
<string name="routing_settings_export_rulesets_to_clipboard">Export ruleset to clipboard</string>
<string name="routing_settings_locked">Locked, keep this rule when import presets</string>
<string
name="routing_settings_import_predefined_rulesets"
>Import predefined rulesets</string>
<string
name="routing_settings_import_rulesets_tip"
>Existing rulesets will be deleted, are you sure to continue?</string>
<string
name="routing_settings_import_rulesets_from_clipboard"
>Import ruleset from clipboard</string>
<string
name="routing_settings_import_rulesets_from_qrcode"
>Import ruleset from QRcode</string>
<string
name="routing_settings_export_rulesets_to_clipboard"
>Export ruleset to clipboard</string>
<string
name="routing_settings_locked"
>Locked, keep this rule when import presets</string>
<string name="routing_settings_domain" translatable="false">domain</string>
<string name="routing_settings_ip" translatable="false">ip</string>
<string name="routing_settings_port" translatable="false">port</string>
<string name="routing_settings_protocol" translatable="false">protocol</string>
<string name="routing_settings_protocol_tip" translatable="false">[http,tls,bittorrent]</string>
<string name="routing_settings_network" translatable="false">network</string>
<string name="routing_settings_network_tip" translatable="false">[udp|tcp]</string>
<string name="routing_settings_outbound_tag" translatable="false">outboundTag</string>
<string
name="routing_settings_protocol"
translatable="false"
>protocol</string>
<string
name="routing_settings_protocol_tip"
translatable="false"
>[http,tls,bittorrent]</string>
<string
name="routing_settings_network"
translatable="false"
>network</string>
<string
name="routing_settings_network_tip"
translatable="false"
>[udp|tcp]</string>
<string
name="routing_settings_outbound_tag"
translatable="false"
>outboundTag</string>
<string name="connection_test_pending">Check Connectivity</string>
<string name="connection_test_testing">Testing…</string>
<string name="connection_test_testing_count">Тестирование %d серверов…</string>
<string name="connection_test_available">Success: Connection took %dms</string>
<string name="connection_test_error">Fail to detect internet connection: %s</string>
<string
name="connection_test_testing_count"
>Тестирование %d серверов…</string>
<string
name="connection_test_available"
>Success: Connection took %dms</string>
<string
name="connection_test_error"
>Fail to detect internet connection: %s</string>
<string name="connection_test_fail">Internet Unavailable</string>
<string name="connection_test_error_status_code">Error code: #%d</string>
<string name="connection_connected">Connected, tap to check connection</string>
<string
name="connection_connected"
>Connected, tap to check connection</string>
<string name="connection_not_connected">Готово к подключению</string>
<string name="connection_updating_profiles">Updating profiles…</string>
<string name="connection_runing_task_left">Проверено %s</string>
<string name="import_subscription_success">Subscription imported Successfully</string>
<string name="import_subscription_failure">Import subscription failed</string>
<string
name="import_subscription_success"
>Subscription imported Successfully</string>
<string
name="import_subscription_failure"
>Import subscription failed</string>
<string name="title_fragment_settings">Fragment Settings</string>
<string name="title_pref_fragment_packets">Fragment Packets</string>
<string name="title_pref_fragment_length">Fragment Length (min-max)</string>
<string name="title_pref_fragment_interval">Fragment Interval (min-max)</string>
<string
name="title_pref_fragment_interval"
>Fragment Interval (min-max)</string>
<string name="title_pref_fragment_enabled">Enable Fragment</string>
<string name="update_check_for_update">Check for update</string>
<string name="update_already_latest_version">Already on the latest version</string>
<string
name="update_already_latest_version"
>Already on the latest version</string>
<string name="update_new_version_found">New version found: %s</string>
<string name="update_now">Update now</string>
<string name="update_check_pre_release">Check Pre-release</string>
<string name="update_checking_for_update">Checking for update…</string>
<string name="title_policy_group_type">Policy group type</string>
<string name="title_policy_group_subscription_id">From subscription group</string>
<string name="title_policy_group_subscription_filter">Remarks regular filter</string>
<string
name="title_policy_group_subscription_id"
>From subscription group</string>
<string
name="title_policy_group_subscription_filter"
>Remarks regular filter</string>
<!-- BackupActivity -->
<string name="title_configuration_backup_restore">Backup &amp; Restore</string>
<string
name="title_configuration_backup_restore"
>Backup &amp; Restore</string>
<string name="title_configuration_backup">Backup config</string>
<string name="title_configuration_restore">Restore config</string>
<string name="title_configuration_share">Share config</string>
<string name="title_webdav_config_setting">WebDAV Settings</string>
<string name="title_webdav_config_setting_unknown">Please configure WebDAV first.</string>
<string
name="title_webdav_config_setting_unknown"
>Please configure WebDAV first.</string>
<string name="title_webdav_url">WebDAV server URL</string>
<string name="title_webdav_user">Username</string>
<string name="title_webdav_pass">Password</string>
@@ -451,4 +662,36 @@
<item>WebDAV</item>
</string-array>
<!-- Donate dialog -->
<string name="donate_dialog_title">Поддержите нас</string>
<string name="donate_label_card">Карта</string>
<string name="donate_label_ton">TON</string>
<string name="donate_label_trc20">TRC20</string>
<string name="donate_label_btc">BTC</string>
<string
name="donate_card_url"
translatable="false"
>pay.cloudtips.ru/p/28c476e5</string>
<string
name="donate_addr_ton"
translatable="false"
>UQD_Qc2cxLGe1P4wANi46cKdEvvzyJRrJTYPvGX2KAZDnsDh</string>
<string
name="donate_addr_trc20"
translatable="false"
>TYQqdACH5PrScvsMowSyS8JjaaF5wvFf5Q</string>
<string
name="donate_addr_btc"
translatable="false"
>bc1qvw0ts0jk5e5dfj9fdez76j9ck95lqz04fpf02a</string>
<string name="donate_copy">Копировать</string>
<string name="donate_open_link">Открыть</string>
<string
name="donate_card_link_url"
translatable="false"
>https://pay.cloudtips.ru/p/28c476e5</string>
<string name="donate_btn_dont_show">Не показывать</string>
<string name="donate_btn_postpone">Позже</string>
<string name="donate_toast_copied">Скопировано</string>
</resources>