From: Soren Stoutner Date: Fri, 15 Jul 2022 22:19:00 +0000 (-0700) Subject: Block trackers listed at privacytests.org. https://redmine.stoutner.com/issues/863 X-Git-Tag: v3.11~12 X-Git-Url: https://gitweb.stoutner.com/?a=commitdiff_plain;h=0b2da52fc661cf302cd94105620e54340d269f1d;p=PrivacyBrowserAndroid.git Block trackers listed at privacytests.org. https://redmine.stoutner.com/issues/863 --- diff --git a/app/build.gradle b/app/build.gradle index 1abaa0e3..2ab5953c 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -23,7 +23,7 @@ plugins { } android { - compileSdk 31 + compileSdk 32 defaultConfig { minSdk 23 @@ -70,10 +70,10 @@ dependencies { // Include the following AndroidX libraries. implementation 'androidx.arch.core:core-common:2.1.0' implementation 'androidx.arch.core:core-runtime:2.1.0' - implementation 'androidx.appcompat:appcompat:1.4.1' + implementation 'androidx.appcompat:appcompat:1.4.2' implementation 'androidx.cardview:cardview:1.0.0' implementation 'androidx.coordinatorlayout:coordinatorlayout:1.2.0' - implementation 'androidx.core:core-ktx:1.7.0' + implementation 'androidx.core:core-ktx:1.8.0' implementation 'androidx.drawerlayout:drawerlayout:1.1.1' implementation 'androidx.preference:preference-ktx:1.2.0' implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0' @@ -81,8 +81,8 @@ dependencies { implementation 'androidx.webkit:webkit:1.4.0' // Include the Kotlin standard library. This should be the same version number listed in project build.gradle. - implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.21' + implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.10' // Include the Google material library. - implementation 'com.google.android.material:material:1.6.0' + implementation 'com.google.android.material:material:1.6.1' } \ No newline at end of file diff --git a/app/src/main/assets/blocklists/ultraprivacy.txt b/app/src/main/assets/blocklists/ultraprivacy.txt index 77d9c6d2..3bbd70c0 100644 --- a/app/src/main/assets/blocklists/ultraprivacy.txt +++ b/app/src/main/assets/blocklists/ultraprivacy.txt @@ -1,12 +1,14 @@ [Adblock Plus 2.0] ! Version: 2 ! Title: UltraPrivacy -! Last modified: 22 May 2019 18:11 UTC +! Last modified: 2 June 2022 17:37 UTC ! Expires: 90 days (update frequency) -! Homepage: https://www.stoutner.com/privacy-browser/blocklists/ultraprivacy/ +! Homepage: https://www.stoutner.com/privacy-browser-android/blocklists/ultraprivacy/ ! Licence: GPLv3+ http://www.gnu.org/licenses/gpl-3.0.html ! -! I can't imagine that anything that includes `analytics` is good for your privacy. https://redmine.stoutner.com/issues/312. +! I can't imagine that anything that includes `analytics` is good for your privacy. analytics -! Block Google Tag Services. https://redmine.stoutner.com/issues/449 +! Block Google Tag Services. googletagservices +! There shall be no connecting to Facebook on the backend. +connect.facebook \ No newline at end of file diff --git a/app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.java b/app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.java index 9bea7991..13d81cb9 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.java +++ b/app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.java @@ -118,7 +118,6 @@ import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; import androidx.viewpager.widget.ViewPager; import androidx.webkit.WebSettingsCompat; import androidx.webkit.WebViewFeature; -import kotlin.Pair; import com.google.android.material.appbar.AppBarLayout; import com.google.android.material.floatingactionbutton.FloatingActionButton; @@ -153,6 +152,7 @@ import com.stoutner.privacybrowser.helpers.BlocklistHelper; import com.stoutner.privacybrowser.helpers.BookmarksDatabaseHelper; import com.stoutner.privacybrowser.helpers.DomainsDatabaseHelper; import com.stoutner.privacybrowser.helpers.ProxyHelper; +import com.stoutner.privacybrowser.helpers.SanitizeUrlHelper; import com.stoutner.privacybrowser.views.NestedScrollWebView; import java.io.ByteArrayInputStream; @@ -183,6 +183,8 @@ import java.util.Set; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; +import kotlin.Pair; + public class MainWebViewActivity extends AppCompatActivity implements CreateBookmarkDialog.CreateBookmarkListener, CreateBookmarkFolderDialog.CreateBookmarkFolderListener, EditBookmarkFolderDialog.EditBookmarkFolderListener, FontSizeDialog.UpdateFontSizeListener, NavigationView.OnNavigationItemSelectedListener, OpenDialog.OpenListener, PinnedMismatchDialog.PinnedMismatchListener, PopulateBlocklists.PopulateBlocklistsListener, SaveDialog.SaveListener, UrlHistoryDialog.NavigateHistoryListener, @@ -273,13 +275,13 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook private int defaultProgressViewStartOffset; private int defaultProgressViewEndOffset; - // The URL sanitizers are set in `applyAppSettings()` and used in `sanitizeUrl()`. - private boolean sanitizeGoogleAnalytics; - private boolean sanitizeFacebookClickIds; - private boolean sanitizeTwitterAmpRedirects; + // Declare the helpers. + private BookmarksDatabaseHelper bookmarksDatabaseHelper; + private DomainsDatabaseHelper domainsDatabaseHelper; + private ProxyHelper proxyHelper; + private SanitizeUrlHelper sanitizeUrlHelper; // Declare the class variables - private BookmarksDatabaseHelper bookmarksDatabaseHelper; private boolean bottomAppBar; private boolean displayingFullScreenVideo; private boolean downloadWithExternalApp; @@ -289,9 +291,10 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook private boolean inFullScreenBrowsingMode; private boolean loadingNewIntent; private BroadcastReceiver orbotStatusBroadcastReceiver; - private ProxyHelper proxyHelper; private boolean reapplyAppSettingsOnRestart; private boolean reapplyDomainSettingsOnRestart; + private boolean sanitizeAmpRedirects; + private boolean sanitizeTrackingQueries; private boolean scrollAppBar; private boolean waitingForProxy; private String webViewDefaultUserAgent; @@ -600,8 +603,11 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook // Store up to 100 tabs in memory. webViewPager.setOffscreenPageLimit(100); - // Instantiate the proxy helper. + // Instantiate the helpers. + bookmarksDatabaseHelper = new BookmarksDatabaseHelper(this); + domainsDatabaseHelper = new DomainsDatabaseHelper(this); proxyHelper = new ProxyHelper(); + sanitizeUrlHelper = new SanitizeUrlHelper(); // Initialize the app. initializeApp(); @@ -1952,9 +1958,6 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook Uri currentUri = Uri.parse(currentWebView.getUrl()); String currentDomain = currentUri.getHost(); - // Initialize the database handler. - DomainsDatabaseHelper domainsDatabaseHelper = new DomainsDatabaseHelper(this); - // Create the domain and store the database ID. int newDomainDatabaseId = domainsDatabaseHelper.addDomain(currentDomain); @@ -3382,9 +3385,6 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook drawerLayout.setDrawerTitle(GravityCompat.START, getString(R.string.navigation_drawer)); drawerLayout.setDrawerTitle(GravityCompat.END, getString(R.string.bookmarks)); - // Initialize the bookmarks database helper. - bookmarksDatabaseHelper = new BookmarksDatabaseHelper(this); - // Initialize `currentBookmarksFolder`. `""` is the home folder in the database. currentBookmarksFolder = ""; @@ -3519,9 +3519,8 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook // Store the values from the shared preferences in variables. incognitoModeEnabled = sharedPreferences.getBoolean("incognito_mode", false); - sanitizeGoogleAnalytics = sharedPreferences.getBoolean("google_analytics", true); - sanitizeFacebookClickIds = sharedPreferences.getBoolean("facebook_click_ids", true); - sanitizeTwitterAmpRedirects = sharedPreferences.getBoolean("twitter_amp_redirects", true); + sanitizeTrackingQueries = sharedPreferences.getBoolean(getString(R.string.tracking_queries_key), true); + sanitizeAmpRedirects = sharedPreferences.getBoolean(getString(R.string.amp_redirects_key), true); proxyMode = sharedPreferences.getString("proxy", getString(R.string.proxy_default_value)); fullScreenBrowsingModeEnabled = sharedPreferences.getBoolean("full_screen_browsing_mode", false); downloadWithExternalApp = sharedPreferences.getBoolean(getString(R.string.download_with_external_app_key), false); @@ -3737,10 +3736,7 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook } } - // Initialize the database handler. - DomainsDatabaseHelper domainsDatabaseHelper = new DomainsDatabaseHelper(this); - - // Get a full cursor from `domainsDatabaseHelper`. + // Get a full domain name cursor. Cursor domainNameCursor = domainsDatabaseHelper.getDomainNameCursorOrderedByDomain(); // Initialize `domainSettingsSet`. @@ -4498,49 +4494,13 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook } private String sanitizeUrl(String url) { - // Sanitize Google Analytics. - if (sanitizeGoogleAnalytics) { - // Remove `?utm_`. - if (url.contains("?utm_")) { - url = url.substring(0, url.indexOf("?utm_")); - } + // Sanitize tracking queries. + if (sanitizeTrackingQueries) + url = sanitizeUrlHelper.sanitizeTrackingQueries(url); - // Remove `&utm_`. - if (url.contains("&utm_")) { - url = url.substring(0, url.indexOf("&utm_")); - } - } - - // Sanitize Facebook Click IDs. - if (sanitizeFacebookClickIds) { - // Remove `?fbclid=`. - if (url.contains("?fbclid=")) { - url = url.substring(0, url.indexOf("?fbclid=")); - } - - // Remove `&fbclid=`. - if (url.contains("&fbclid=")) { - url = url.substring(0, url.indexOf("&fbclid=")); - } - - // Remove `?fbadid=`. - if (url.contains("?fbadid=")) { - url = url.substring(0, url.indexOf("?fbadid=")); - } - - // Remove `&fbadid=`. - if (url.contains("&fbadid=")) { - url = url.substring(0, url.indexOf("&fbadid=")); - } - } - - // Sanitize Twitter AMP redirects. - if (sanitizeTwitterAmpRedirects) { - // Remove `?amp=1`. - if (url.contains("?amp=1")) { - url = url.substring(0, url.indexOf("?amp=1")); - } - } + // Sanitize AMP redirects. + if (sanitizeAmpRedirects) + url = sanitizeUrlHelper.sanitizeAmpRedirects(url); // Return the sanitized URL. return url; diff --git a/app/src/main/java/com/stoutner/privacybrowser/dialogs/SslCertificateErrorDialog.kt b/app/src/main/java/com/stoutner/privacybrowser/dialogs/SslCertificateErrorDialog.kt index d146de53..04ff8982 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/dialogs/SslCertificateErrorDialog.kt +++ b/app/src/main/java/com/stoutner/privacybrowser/dialogs/SslCertificateErrorDialog.kt @@ -322,6 +322,7 @@ class SslCertificateErrorDialog : DialogFragment() { private val activityWeakReference: WeakReference = WeakReference(activity) private val alertDialogWeakReference: WeakReference = WeakReference(alertDialog) + @Deprecated("Deprecated in Java") override fun doInBackground(vararg domainName: String): SpannableStringBuilder { // Get handles for the activity and the alert dialog. val activity = activityWeakReference.get() @@ -372,6 +373,7 @@ class SslCertificateErrorDialog : DialogFragment() { } // `onPostExecute()` operates on the UI thread. + @Deprecated("Deprecated in Java") override fun onPostExecute(ipAddresses: SpannableStringBuilder) { // Get handles for the activity and the alert dialog. val activity = activityWeakReference.get() diff --git a/app/src/main/java/com/stoutner/privacybrowser/fragments/SettingsFragment.java b/app/src/main/java/com/stoutner/privacybrowser/fragments/SettingsFragment.java index e17f8272..bf864c11 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/fragments/SettingsFragment.java +++ b/app/src/main/java/com/stoutner/privacybrowser/fragments/SettingsFragment.java @@ -75,9 +75,8 @@ public class SettingsFragment extends PreferenceFragmentCompat { private Preference ultraListPreference; private Preference ultraPrivacyPreference; private Preference blockAllThirdPartyRequestsPreference; - private Preference googleAnalyticsPreference; - private Preference facebookClickIdsPreference; - private Preference twitterAmpRedirectsPreference; + private Preference trackingQueriesPreference; + private Preference ampRedirectsPreference; private Preference searchPreference; private Preference searchCustomURLPreference; private Preference proxyPreference; @@ -142,9 +141,8 @@ public class SettingsFragment extends PreferenceFragmentCompat { ultraListPreference = findPreference("ultralist"); ultraPrivacyPreference = findPreference("ultraprivacy"); blockAllThirdPartyRequestsPreference = findPreference("block_all_third_party_requests"); - googleAnalyticsPreference = findPreference("google_analytics"); - facebookClickIdsPreference = findPreference("facebook_click_ids"); - twitterAmpRedirectsPreference = findPreference("twitter_amp_redirects"); + trackingQueriesPreference = findPreference(getString(R.string.tracking_queries_key)); + ampRedirectsPreference = findPreference(getString(R.string.amp_redirects_key)); searchPreference = findPreference("search"); searchCustomURLPreference = findPreference("search_custom_url"); proxyPreference = findPreference("proxy"); @@ -186,9 +184,8 @@ public class SettingsFragment extends PreferenceFragmentCompat { assert ultraListPreference != null; assert ultraPrivacyPreference != null; assert blockAllThirdPartyRequestsPreference != null; - assert googleAnalyticsPreference != null; - assert facebookClickIdsPreference != null; - assert twitterAmpRedirectsPreference != null; + assert trackingQueriesPreference != null; + assert ampRedirectsPreference != null; assert searchPreference != null; assert searchCustomURLPreference != null; assert proxyPreference != null; @@ -516,25 +513,18 @@ public class SettingsFragment extends PreferenceFragmentCompat { blockAllThirdPartyRequestsPreference.setIcon(R.drawable.block_all_third_party_requests_disabled); } - // Set the Google Analytics icon. - if (sharedPreferences.getBoolean("google_analytics", true)) { - googleAnalyticsPreference.setIcon(R.drawable.modify_url_enabled); + // Set the Tracking Queries icon. + if (sharedPreferences.getBoolean(getString(R.string.tracking_queries_key), true)) { + trackingQueriesPreference.setIcon(R.drawable.modify_url_enabled); } else { - googleAnalyticsPreference.setIcon(R.drawable.modify_url_disabled); + trackingQueriesPreference.setIcon(R.drawable.modify_url_disabled); } - // Set the Facebook Click IDs icon. - if (sharedPreferences.getBoolean("facebook_click_ids", true)) { - facebookClickIdsPreference.setIcon(R.drawable.modify_url_enabled); + // Set the AMP Redirects icon. + if (sharedPreferences.getBoolean(getString(R.string.amp_redirects_key), true)) { + ampRedirectsPreference.setIcon(R.drawable.modify_url_enabled); } else { - facebookClickIdsPreference.setIcon(R.drawable.modify_url_disabled); - } - - // Set the Twitter AMP redirects icon. - if (sharedPreferences.getBoolean("twitter_amp_redirects", true)) { - twitterAmpRedirectsPreference.setIcon(R.drawable.modify_url_enabled); - } else { - twitterAmpRedirectsPreference.setIcon(R.drawable.modify_url_disabled); + ampRedirectsPreference.setIcon(R.drawable.modify_url_disabled); } // Set the search custom URL icon. @@ -952,30 +942,21 @@ public class SettingsFragment extends PreferenceFragmentCompat { } break; - case "google_analytics": - // Update the icon. - if (sharedPreferences.getBoolean("google_analytics", true)) { - googleAnalyticsPreference.setIcon(R.drawable.modify_url_enabled); - } else { - googleAnalyticsPreference.setIcon(R.drawable.modify_url_disabled); - } - break; - - case "facebook_click_ids": + case "tracking_queries": // Update the icon. - if (sharedPreferences.getBoolean("facebook_click_ids", true)) { - facebookClickIdsPreference.setIcon(R.drawable.modify_url_enabled); + if (sharedPreferences.getBoolean(context.getString(R.string.tracking_queries_key), true)) { + trackingQueriesPreference.setIcon(R.drawable.modify_url_enabled); } else { - facebookClickIdsPreference.setIcon(R.drawable.modify_url_disabled); + trackingQueriesPreference.setIcon(R.drawable.modify_url_disabled); } break; - case "twitter_amp_redirects": + case "amp_redirects": // Update the icon. - if (sharedPreferences.getBoolean("twitter_amp_redirects", true)) { - twitterAmpRedirectsPreference.setIcon(R.drawable.modify_url_enabled); + if (sharedPreferences.getBoolean(context.getString(R.string.amp_redirects_key), true)) { + ampRedirectsPreference.setIcon(R.drawable.modify_url_enabled); } else { - twitterAmpRedirectsPreference.setIcon(R.drawable.modify_url_disabled); + ampRedirectsPreference.setIcon(R.drawable.modify_url_disabled); } break; diff --git a/app/src/main/java/com/stoutner/privacybrowser/helpers/BookmarksDatabaseHelper.kt b/app/src/main/java/com/stoutner/privacybrowser/helpers/BookmarksDatabaseHelper.kt index 135827ec..fac7001a 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/helpers/BookmarksDatabaseHelper.kt +++ b/app/src/main/java/com/stoutner/privacybrowser/helpers/BookmarksDatabaseHelper.kt @@ -46,14 +46,14 @@ class BookmarksDatabaseHelper(context: Context) : SQLiteOpenHelper(context, BOOK const val FAVORITE_ICON = "favoriteicon" // Define the public table creation constant. - const val CREATE_BOOKMARKS_TABLE = "CREATE TABLE " + BOOKMARKS_TABLE + " (" + - ID + " INTEGER PRIMARY KEY, " + - BOOKMARK_NAME + " TEXT, " + - BOOKMARK_URL + " TEXT, " + - PARENT_FOLDER + " TEXT, " + - DISPLAY_ORDER + " INTEGER, " + - IS_FOLDER + " BOOLEAN, " + - FAVORITE_ICON + " BLOB)" + const val CREATE_BOOKMARKS_TABLE = "CREATE TABLE $BOOKMARKS_TABLE (" + + "$ID INTEGER PRIMARY KEY, " + + "$BOOKMARK_NAME TEXT, " + + "$BOOKMARK_URL TEXT, " + + "$PARENT_FOLDER TEXT, " + + "$DISPLAY_ORDER INTEGER, " + + "$IS_FOLDER BOOLEAN, " + + "$FAVORITE_ICON BLOB)" } override fun onCreate(bookmarksDatabase: SQLiteDatabase) { diff --git a/app/src/main/java/com/stoutner/privacybrowser/helpers/CheckPinnedMismatchHelper.kt b/app/src/main/java/com/stoutner/privacybrowser/helpers/CheckPinnedMismatchHelper.kt index 8fa8369f..b67a7f3f 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/helpers/CheckPinnedMismatchHelper.kt +++ b/app/src/main/java/com/stoutner/privacybrowser/helpers/CheckPinnedMismatchHelper.kt @@ -16,6 +16,7 @@ * You should have received a copy of the GNU General Public License * along with Privacy Browser Android. If not, see . */ + package com.stoutner.privacybrowser.helpers import android.app.Activity diff --git a/app/src/main/java/com/stoutner/privacybrowser/helpers/DomainsDatabaseHelper.kt b/app/src/main/java/com/stoutner/privacybrowser/helpers/DomainsDatabaseHelper.kt index 53a3cbe4..9d58eef0 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/helpers/DomainsDatabaseHelper.kt +++ b/app/src/main/java/com/stoutner/privacybrowser/helpers/DomainsDatabaseHelper.kt @@ -80,37 +80,37 @@ class DomainsDatabaseHelper(private val appContext: Context) : SQLiteOpenHelper( const val IP_ADDRESSES = "ip_addresses" // The table creation constant. - const val CREATE_DOMAINS_TABLE = "CREATE TABLE " + DOMAINS_TABLE + " (" + - ID + " INTEGER PRIMARY KEY, " + - DOMAIN_NAME + " TEXT, " + - ENABLE_JAVASCRIPT + " BOOLEAN, " + - COOKIES + " BOOLEAN, " + - ENABLE_DOM_STORAGE + " BOOLEAN, " + - ENABLE_FORM_DATA + " BOOLEAN, " + - ENABLE_EASYLIST + " BOOLEAN, " + - ENABLE_EASYPRIVACY + " BOOLEAN, " + - ENABLE_FANBOYS_ANNOYANCE_LIST + " BOOLEAN, " + - ENABLE_FANBOYS_SOCIAL_BLOCKING_LIST + " BOOLEAN, " + - ULTRALIST + " BOOLEAN, " + - ENABLE_ULTRAPRIVACY + " BOOLEAN, " + - BLOCK_ALL_THIRD_PARTY_REQUESTS + " BOOLEAN, " + - USER_AGENT + " TEXT, " + - FONT_SIZE + " INTEGER, " + - SWIPE_TO_REFRESH + " INTEGER, " + - WEBVIEW_THEME + " INTEGER, " + - WIDE_VIEWPORT + " INTEGER, " + - DISPLAY_IMAGES + " INTEGER, " + - PINNED_SSL_CERTIFICATE + " BOOLEAN, " + - SSL_ISSUED_TO_COMMON_NAME + " TEXT, " + - SSL_ISSUED_TO_ORGANIZATION + " TEXT, " + - SSL_ISSUED_TO_ORGANIZATIONAL_UNIT + " TEXT, " + - SSL_ISSUED_BY_COMMON_NAME + " TEXT, " + - SSL_ISSUED_BY_ORGANIZATION + " TEXT, " + - SSL_ISSUED_BY_ORGANIZATIONAL_UNIT + " TEXT, " + - SSL_START_DATE + " INTEGER, " + - SSL_END_DATE + " INTEGER, " + - PINNED_IP_ADDRESSES + " BOOLEAN, " + - IP_ADDRESSES + " TEXT)" + const val CREATE_DOMAINS_TABLE = "CREATE TABLE $DOMAINS_TABLE (" + + "$ID INTEGER PRIMARY KEY, " + + "$DOMAIN_NAME TEXT, " + + "$ENABLE_JAVASCRIPT BOOLEAN, " + + "$COOKIES BOOLEAN, " + + "$ENABLE_DOM_STORAGE BOOLEAN, " + + "$ENABLE_FORM_DATA BOOLEAN, " + + "$ENABLE_EASYLIST BOOLEAN, " + + "$ENABLE_EASYPRIVACY BOOLEAN, " + + "$ENABLE_FANBOYS_ANNOYANCE_LIST BOOLEAN, " + + "$ENABLE_FANBOYS_SOCIAL_BLOCKING_LIST BOOLEAN, " + + "$ULTRALIST BOOLEAN, " + + "$ENABLE_ULTRAPRIVACY BOOLEAN, " + + "$BLOCK_ALL_THIRD_PARTY_REQUESTS BOOLEAN, " + + "$USER_AGENT TEXT, " + + "$FONT_SIZE INTEGER, " + + "$SWIPE_TO_REFRESH INTEGER, " + + "$WEBVIEW_THEME INTEGER, " + + "$WIDE_VIEWPORT INTEGER, " + + "$DISPLAY_IMAGES INTEGER, " + + "$PINNED_SSL_CERTIFICATE BOOLEAN, " + + "$SSL_ISSUED_TO_COMMON_NAME TEXT, " + + "$SSL_ISSUED_TO_ORGANIZATION TEXT, " + + "$SSL_ISSUED_TO_ORGANIZATIONAL_UNIT TEXT, " + + "$SSL_ISSUED_BY_COMMON_NAME TEXT, " + + "$SSL_ISSUED_BY_ORGANIZATION TEXT, " + + "$SSL_ISSUED_BY_ORGANIZATIONAL_UNIT TEXT, " + + "$SSL_START_DATE INTEGER, " + + "$SSL_END_DATE INTEGER, " + + "$PINNED_IP_ADDRESSES BOOLEAN, " + + "$IP_ADDRESSES TEXT)" } override fun onCreate(domainsDatabase: SQLiteDatabase) { diff --git a/app/src/main/java/com/stoutner/privacybrowser/helpers/ImportExportDatabaseHelper.kt b/app/src/main/java/com/stoutner/privacybrowser/helpers/ImportExportDatabaseHelper.kt index 1e2ea158..415fd92b 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/helpers/ImportExportDatabaseHelper.kt +++ b/app/src/main/java/com/stoutner/privacybrowser/helpers/ImportExportDatabaseHelper.kt @@ -35,7 +35,7 @@ import java.io.InputStream import java.io.OutputStream // Define the private class constants. -private const val SCHEMA_VERSION = 14 +private const val SCHEMA_VERSION = 15 private const val PREFERENCES_TABLE = "preferences" // Define the private preferences constants. @@ -55,9 +55,8 @@ private const val FANBOYS_SOCIAL_BLOCKING_LIST = "fanboys_social_blocking_list" private const val ULTRALIST = "ultralist" private const val ULTRAPRIVACY = "ultraprivacy" private const val BLOCK_ALL_THIRD_PARTY_REQUESTS = "block_all_third_party_requests" -private const val GOOGLE_ANALYTICS = "google_analytics" -private const val FACEBOOK_CLICK_IDS = "facebook_click_ids" -private const val TWITTER_AMP_REDIRECTS = "twitter_amp_redirects" +private const val TRACKING_QUERIES = "tracking_queries" +private const val AMP_REDIRECTS = "amp_redirects" private const val SEARCH = "search" private const val SEARCH_CUSTOM_URL = "search_custom_url" private const val PROXY = "proxy" @@ -137,7 +136,7 @@ class ImportExportDatabaseHelper { // Upgrade from schema version 2, first used in Privacy Browser 2.14, to schema version 3, first used in Privacy Browser 2.15. if (importDatabaseVersion < 3) { - // Once the SQLite version is >= 3.25.0 (API >= 30) `ALTER TABLE RENAME COLUMN` can be used. + // Once the SQLite version is >= 3.25.0 (Android API >= 30) `ALTER TABLE RENAME COLUMN` can be used. // // In the meantime, a new column must be created with the new name. There is no need to delete the old column on the temporary import database. @@ -201,42 +200,35 @@ class ImportExportDatabaseHelper { // Upgrade from schema version 6, first used in Privacy Browser 3.0, to schema version 7, first used in Privacy Browser 3.1. if (importDatabaseVersion < 7) { + // Previously this upgrade added `facebook_click_ids` to the Preferences table. But that is now removed in schema version 15. + // Add the wide viewport column to the domains table. importDatabase.execSQL("ALTER TABLE ${DomainsDatabaseHelper.DOMAINS_TABLE} ADD COLUMN ${DomainsDatabaseHelper.WIDE_VIEWPORT} INTEGER") - // Add the Google Analytics, Facebook Click IDs, Twitter AMP redirects, and wide viewport columns to the preferences table. - importDatabase.execSQL("ALTER TABLE $PREFERENCES_TABLE ADD COLUMN $GOOGLE_ANALYTICS BOOLEAN") - importDatabase.execSQL("ALTER TABLE $PREFERENCES_TABLE ADD COLUMN $FACEBOOK_CLICK_IDS BOOLEAN") - importDatabase.execSQL("ALTER TABLE $PREFERENCES_TABLE ADD COLUMN $TWITTER_AMP_REDIRECTS BOOLEAN") + // Add the Google Analytics, Twitter AMP redirects, and wide viewport columns to the preferences table. + importDatabase.execSQL("ALTER TABLE $PREFERENCES_TABLE ADD COLUMN google_analytics BOOLEAN") + importDatabase.execSQL("ALTER TABLE $PREFERENCES_TABLE ADD COLUMN twitter_amp_redirects BOOLEAN") importDatabase.execSQL("ALTER TABLE $PREFERENCES_TABLE ADD COLUMN $WIDE_VIEWPORT BOOLEAN") // Get the current preference values. - val googleAnalytics = sharedPreferences.getBoolean(GOOGLE_ANALYTICS, true) - val facebookClickIds = sharedPreferences.getBoolean(FACEBOOK_CLICK_IDS, true) - val twitterAmpRedirects = sharedPreferences.getBoolean(TWITTER_AMP_REDIRECTS, true) + val trackingQueries = sharedPreferences.getBoolean(TRACKING_QUERIES, true) + val ampRedirects = sharedPreferences.getBoolean(AMP_REDIRECTS, true) val wideViewport = sharedPreferences.getBoolean(WIDE_VIEWPORT, true) - // Populate the preferences with the current Google Analytics value. + // Populate the preferences with the current Tracking Queries value. Google Analytics was renamed Tracking Queries in schema version 15. // This can switch to using the variables directly once the API >= 30. // - if (googleAnalytics) { - importDatabase.execSQL("UPDATE $PREFERENCES_TABLE SET $GOOGLE_ANALYTICS = 1") - } else { - importDatabase.execSQL("UPDATE $PREFERENCES_TABLE SET $GOOGLE_ANALYTICS = 0") - } - - // Populate the preferences with the current Facebook Click IDs value. - if (facebookClickIds) { - importDatabase.execSQL("UPDATE $PREFERENCES_TABLE SET $FACEBOOK_CLICK_IDS = 1") + if (trackingQueries) { + importDatabase.execSQL("UPDATE $PREFERENCES_TABLE SET google_analytics = 1") } else { - importDatabase.execSQL("UPDATE $PREFERENCES_TABLE SET $FACEBOOK_CLICK_IDS = 0") + importDatabase.execSQL("UPDATE $PREFERENCES_TABLE SET google_analytics = 0") } - // Populate the preferences table with the current Twitter AMP redirects value. - if (twitterAmpRedirects) { - importDatabase.execSQL("UPDATE $PREFERENCES_TABLE SET $TWITTER_AMP_REDIRECTS = 1") + // Populate the preferences table with the current AMP Redirects value. Twitter AMP Redirects was renamed AMP Redirects in schema version 15. + if (ampRedirects) { + importDatabase.execSQL("UPDATE $PREFERENCES_TABLE SET twitter_amp_redirects = 1") } else { - importDatabase.execSQL("UPDATE $PREFERENCES_TABLE SET $TWITTER_AMP_REDIRECTS = 0") + importDatabase.execSQL("UPDATE $PREFERENCES_TABLE SET twitter_amp_redirects = 0") } // Populate the preferences table with the current wide viewport value. @@ -362,7 +354,7 @@ class ImportExportDatabaseHelper { if (importDatabaseVersion < 14) { // `enabledthirdpartycookies` was removed from the domains table. `do_not_track` and `third_party_cookies` were removed from the preferences table. - // Once the SQLite version is >= 3.25.0 `ALTER TABLE RENAME COLUMN` can be used. + // Once the SQLite version is >= 3.25.0 (Android API >= 30) `ALTER TABLE RENAME COLUMN` can be used. // // In the meantime, a new column must be created with the new name. There is no need to delete the old column on the temporary import database. @@ -399,6 +391,23 @@ class ImportExportDatabaseHelper { } } + // Upgrade from schema version 14, first used in Privacy Browser 3.8, to schema version 15, first used in Privacy Browser 3.11. + if (importDatabaseVersion < 15) { + // `facebook_click_ids` was removed from the preferences table. + + // Once the SQLite version is >= 3.25.0 (Android API >= 30) `ALTER TABLE RENAME COLUMN` can be used. + // + // In the meantime, a new column must be created with the new name. There is no need to delete the old column on the temporary import database. + + // Create the new URL modification columns. + importDatabase.execSQL("ALTER TABLE $PREFERENCES_TABLE ADD COLUMN $TRACKING_QUERIES BOOLEAN") + importDatabase.execSQL("ALTER TABLE $PREFERENCES_TABLE ADD COLUMN $AMP_REDIRECTS BOOLEAN") + + // Copy the data from the old columns to the new ones. + importDatabase.execSQL("UPDATE $PREFERENCES_TABLE SET $TRACKING_QUERIES = google_analytics") + importDatabase.execSQL("UPDATE $PREFERENCES_TABLE SET $AMP_REDIRECTS = twitter_amp_redirects") + } + // Get a cursor for the bookmarks table. val importBookmarksCursor = importDatabase.rawQuery("SELECT * FROM ${BookmarksDatabaseHelper.BOOKMARKS_TABLE}", null) @@ -528,9 +537,8 @@ class ImportExportDatabaseHelper { .putBoolean(ULTRALIST, importPreferencesCursor.getInt(importPreferencesCursor.getColumnIndexOrThrow(ULTRALIST)) == 1) .putBoolean(ULTRAPRIVACY, importPreferencesCursor.getInt(importPreferencesCursor.getColumnIndexOrThrow(ULTRAPRIVACY)) == 1) .putBoolean(BLOCK_ALL_THIRD_PARTY_REQUESTS, importPreferencesCursor.getInt(importPreferencesCursor.getColumnIndexOrThrow(BLOCK_ALL_THIRD_PARTY_REQUESTS)) == 1) - .putBoolean(GOOGLE_ANALYTICS, importPreferencesCursor.getInt(importPreferencesCursor.getColumnIndexOrThrow(GOOGLE_ANALYTICS)) == 1) - .putBoolean(FACEBOOK_CLICK_IDS, importPreferencesCursor.getInt(importPreferencesCursor.getColumnIndexOrThrow(FACEBOOK_CLICK_IDS)) == 1) - .putBoolean(TWITTER_AMP_REDIRECTS, importPreferencesCursor.getInt(importPreferencesCursor.getColumnIndexOrThrow(TWITTER_AMP_REDIRECTS)) == 1) + .putBoolean(TRACKING_QUERIES, importPreferencesCursor.getInt(importPreferencesCursor.getColumnIndexOrThrow(TRACKING_QUERIES)) == 1) + .putBoolean(AMP_REDIRECTS, importPreferencesCursor.getInt(importPreferencesCursor.getColumnIndexOrThrow(AMP_REDIRECTS)) == 1) .putString(SEARCH, importPreferencesCursor.getString(importPreferencesCursor.getColumnIndexOrThrow(SEARCH))) .putString(SEARCH_CUSTOM_URL, importPreferencesCursor.getString(importPreferencesCursor.getColumnIndexOrThrow(SEARCH_CUSTOM_URL))) .putString(PROXY, importPreferencesCursor.getString(importPreferencesCursor.getColumnIndexOrThrow(PROXY))) @@ -685,50 +693,49 @@ class ImportExportDatabaseHelper { // Prepare the preferences table SQL creation string. - val createPreferencesTable = "CREATE TABLE " + PREFERENCES_TABLE + " (" + - ID + " INTEGER PRIMARY KEY, " + - JAVASCRIPT + " BOOLEAN, " + - COOKIES + " BOOLEAN, " + - DOM_STORAGE + " BOOLEAN, " + - SAVE_FORM_DATA + " BOOLEAN, " + - USER_AGENT + " TEXT, " + - CUSTOM_USER_AGENT + " TEXT, " + - INCOGNITO_MODE + " BOOLEAN, " + - ALLOW_SCREENSHOTS + " BOOLEAN, " + - EASYLIST + " BOOLEAN, " + - EASYPRIVACY + " BOOLEAN, " + - FANBOYS_ANNOYANCE_LIST + " BOOLEAN, " + - FANBOYS_SOCIAL_BLOCKING_LIST + " BOOLEAN, " + - ULTRALIST + " BOOLEAN, " + - ULTRAPRIVACY + " BOOLEAN, " + - BLOCK_ALL_THIRD_PARTY_REQUESTS + " BOOLEAN, " + - GOOGLE_ANALYTICS + " BOOLEAN, " + - FACEBOOK_CLICK_IDS + " BOOLEAN, " + - TWITTER_AMP_REDIRECTS + " BOOLEAN, " + - SEARCH + " TEXT, " + - SEARCH_CUSTOM_URL + " TEXT, " + - PROXY + " TEXT, " + - PROXY_CUSTOM_URL + " TEXT, " + - FULL_SCREEN_BROWSING_MODE + " BOOLEAN, " + - HIDE_APP_BAR + " BOOLEAN, " + - CLEAR_EVERYTHING + " BOOLEAN, " + - CLEAR_COOKIES + " BOOLEAN, " + - CLEAR_DOM_STORAGE + " BOOLEAN, " + - CLEAR_FORM_DATA + " BOOLEAN, " + - CLEAR_LOGCAT + " BOOLEAN, " + - CLEAR_CACHE + " BOOLEAN, " + - HOMEPAGE + " TEXT, " + - FONT_SIZE + " TEXT, " + - OPEN_INTENTS_IN_NEW_TAB + " BOOLEAN, " + - SWIPE_TO_REFRESH + " BOOLEAN, " + - DOWNLOAD_WITH_EXTERNAL_APP + " BOOLEAN, " + - SCROLL_APP_BAR + " BOOLEAN, " + - BOTTOM_APP_BAR + " BOOLEAN, " + - DISPLAY_ADDITIONAL_APP_BAR_ICONS + " BOOLEAN, " + - APP_THEME + " TEXT, " + - WEBVIEW_THEME + " TEXT, " + - WIDE_VIEWPORT + " BOOLEAN, " + - DISPLAY_WEBPAGE_IMAGES + " BOOLEAN)" + val createPreferencesTable = "CREATE TABLE $PREFERENCES_TABLE (" + + "$ID INTEGER PRIMARY KEY, " + + "$JAVASCRIPT BOOLEAN, " + + "$COOKIES BOOLEAN, " + + "$DOM_STORAGE BOOLEAN, " + + "$SAVE_FORM_DATA BOOLEAN, " + + "$USER_AGENT TEXT, " + + "$CUSTOM_USER_AGENT TEXT, " + + "$INCOGNITO_MODE BOOLEAN, " + + "$ALLOW_SCREENSHOTS BOOLEAN, " + + "$EASYLIST BOOLEAN, " + + "$EASYPRIVACY BOOLEAN, " + + "$FANBOYS_ANNOYANCE_LIST BOOLEAN, " + + "$FANBOYS_SOCIAL_BLOCKING_LIST BOOLEAN, " + + "$ULTRALIST BOOLEAN, " + + "$ULTRAPRIVACY BOOLEAN, " + + "$BLOCK_ALL_THIRD_PARTY_REQUESTS BOOLEAN, " + + "$TRACKING_QUERIES BOOLEAN, " + + "$AMP_REDIRECTS BOOLEAN, " + + "$SEARCH TEXT, " + + "$SEARCH_CUSTOM_URL TEXT, " + + "$PROXY TEXT, " + + "$PROXY_CUSTOM_URL TEXT, " + + "$FULL_SCREEN_BROWSING_MODE BOOLEAN, " + + "$HIDE_APP_BAR BOOLEAN, " + + "$CLEAR_EVERYTHING BOOLEAN, " + + "$CLEAR_COOKIES BOOLEAN, " + + "$CLEAR_DOM_STORAGE BOOLEAN, " + + "$CLEAR_FORM_DATA BOOLEAN, " + + "$CLEAR_LOGCAT BOOLEAN, " + + "$CLEAR_CACHE BOOLEAN, " + + "$HOMEPAGE TEXT, " + + "$FONT_SIZE TEXT, " + + "$OPEN_INTENTS_IN_NEW_TAB BOOLEAN, " + + "$SWIPE_TO_REFRESH BOOLEAN, " + + "$DOWNLOAD_WITH_EXTERNAL_APP BOOLEAN, " + + "$SCROLL_APP_BAR BOOLEAN, " + + "$BOTTOM_APP_BAR BOOLEAN, " + + "$DISPLAY_ADDITIONAL_APP_BAR_ICONS BOOLEAN, " + + "$APP_THEME TEXT, " + + "$WEBVIEW_THEME TEXT, " + + "$WIDE_VIEWPORT BOOLEAN, " + + "$DISPLAY_WEBPAGE_IMAGES BOOLEAN)" // Create the temporary export database preferences table. temporaryExportDatabase.execSQL(createPreferencesTable) @@ -755,9 +762,8 @@ class ImportExportDatabaseHelper { preferencesContentValues.put(ULTRALIST, sharedPreferences.getBoolean(ULTRALIST, true)) preferencesContentValues.put(ULTRAPRIVACY, sharedPreferences.getBoolean(ULTRAPRIVACY, true)) preferencesContentValues.put(BLOCK_ALL_THIRD_PARTY_REQUESTS, sharedPreferences.getBoolean(BLOCK_ALL_THIRD_PARTY_REQUESTS, false)) - preferencesContentValues.put(GOOGLE_ANALYTICS, sharedPreferences.getBoolean(GOOGLE_ANALYTICS, true)) - preferencesContentValues.put(FACEBOOK_CLICK_IDS, sharedPreferences.getBoolean(FACEBOOK_CLICK_IDS, true)) - preferencesContentValues.put(TWITTER_AMP_REDIRECTS, sharedPreferences.getBoolean(TWITTER_AMP_REDIRECTS, true)) + preferencesContentValues.put(TRACKING_QUERIES, sharedPreferences.getBoolean(TRACKING_QUERIES, true)) + preferencesContentValues.put(AMP_REDIRECTS, sharedPreferences.getBoolean(AMP_REDIRECTS, true)) preferencesContentValues.put(SEARCH, sharedPreferences.getString(SEARCH, context.getString(R.string.search_default_value))) preferencesContentValues.put(SEARCH_CUSTOM_URL, sharedPreferences.getString(SEARCH_CUSTOM_URL, context.getString(R.string.search_custom_url_default_value))) preferencesContentValues.put(PROXY, sharedPreferences.getString(PROXY, context.getString(R.string.proxy_default_value))) diff --git a/app/src/main/java/com/stoutner/privacybrowser/helpers/ProxyHelper.kt b/app/src/main/java/com/stoutner/privacybrowser/helpers/ProxyHelper.kt index c0cad037..58057b78 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/helpers/ProxyHelper.kt +++ b/app/src/main/java/com/stoutner/privacybrowser/helpers/ProxyHelper.kt @@ -42,7 +42,7 @@ import java.net.SocketAddress class ProxyHelper { companion object { - // Define the public companion object constants. These can be moved to public class constants once the entire project has migrated to Kotlin. + // Define the public static companion object constants. const val NONE = "None" const val TOR = "Tor" const val I2P = "I2P" diff --git a/app/src/main/java/com/stoutner/privacybrowser/helpers/SanitizeUrlHelper.kt b/app/src/main/java/com/stoutner/privacybrowser/helpers/SanitizeUrlHelper.kt new file mode 100644 index 00000000..7e4ad981 --- /dev/null +++ b/app/src/main/java/com/stoutner/privacybrowser/helpers/SanitizeUrlHelper.kt @@ -0,0 +1,85 @@ +/* + * Copyright ©2022 Soren Stoutner . + * + * This file is part of Privacy Browser Android . + * + * Privacy Browser Android is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Privacy Browser Android is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Privacy Browser Android. If not, see . + */ + +package com.stoutner.privacybrowser.helpers + +private val trackingQueriesList = listOf( + "__hsfp=", // HubSpot. + "__hssc=", // HubSpot. + "__hstc=", // HubSpot. + "__s=", // Drip.com. + "_hsenc=", // HubSpot. + "_openstat=", // Yandex. + "dclid=", // DoubleClick ID. + "fbadid=", // FaceBook Ad ID. + "fbclid=", // FaceBook Click ID. + "gclid=", // Google Click ID. + "hsCtaTracking=", // HubSpot. + "igshid=", // Instagram. + "mc_eid=", // MailChimp Email ID. + "?mkt_tok=", // Adobe Marketo. + "ml_subscriber=", // MailerLite. + "ml_subscriber_hash=", // MailerLite. + "msclkid=", // Microsoft Click ID. + "oly_anon_id=", // Omeda Anonymous ID. + "oly_enc_id=", // Omeda ID. + "rb_clickid=", // Unknown tracker. + "s_cid=", // Adobe Site Catalyst. + "utm_", // Google Analytics. + "vero_conv=", // Vero. + "vero_id=", // Vero ID. + "wickedid=", // Wicked Reports ID. + "yclid=" // Yandex Click ID. +) + +class SanitizeUrlHelper { + fun sanitizeTrackingQueries(inputUrl: String): String { + // Make a copy of the input URL so that it can be modified. + var url = inputUrl + + // Remove each tracking query from the URL. + trackingQueriesList.forEach { + if (url.contains("?$it")) { // Check for an initial query + // Remove the first query and anything after it. + url = url.substring(0, url.indexOf("?$it")) + } + else if (url.contains("&$it")) { // Check for a subsequent query. + // Remove the query and anything after it. + url = url.substring(0, url.indexOf("&$it")) + } + } + + // Return the sanitized URL. + return url + } + + fun sanitizeAmpRedirects(inputUrl: String): String { + // Make a copy of the input URL so that it can be modified. + var url = inputUrl + + // Remove Twitter `amp=1`. + if (url.contains("?amp")) + url = url.substring(0, url.indexOf("?amp")) + else if (url.contains("&")) + url = url.substring(0, url.indexOf("&")) + + // Return the sanitized URL. + return url + } +} \ No newline at end of file diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 5fc5ca69..62d72549 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -509,12 +509,6 @@ Alle Zugriffe auf Dritt-Anbieter-Inhalte blockieren Alle Zugriffe auf Dritt-Anbieter-Inhalte zu blockieren verbessert die Privatsphäre, kann jedoch Webseiten verunstalten. URL-Bereinigung - Google Analytics - Entfernt “?utm_” und “&utm_” sowie alles danach aus URLs. - Facebook Click-IDs - Entfernt “?fbclid=”, “&fbclid=”, “?fbadid=” und “&fbadid=” sowie alles danach aus URLs. - Twitter AMP-Umleitungen - Entfernt “?amp=1” sowie alles danach URLs. Suche Mojeek diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index 5044c8bb..c5584a85 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -506,12 +506,6 @@ Bloquear todas las solicitudes de terceras partes Bloquear todas las solicitudes de terceras partes aumenta la privacidad, pero rompe muchas páginas web. Modificación de URL - Google Analytics - Eliminar “?utm_”, “&utm_” y cualquier cosa tras ello de las URLs. - IDs de clics en Facebook - Eliminar “?fbclid=”, “&fbclid=”, “?fbadid=”, “&fbadid=” y cualquier cosa tras ello de las URLs. - Redirecciones de Twitter AMP - Eliminar “?amp=1” y cualquier cosa después de esto de las URLs. Búsqueda Mojeek diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index 362c5e1d..913c5946 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -164,6 +164,7 @@ Ajouter à l\'écran d\'accueil Voir Source Partager + Partager le message Partager URL Ouvrir avec une application Ouvrir dans le navigateur @@ -505,12 +506,6 @@ Bloquer toutes les requêtes tierces Le blocage de toutes les requêtes tierces augmente la vie privée, mais détruit de nombreux sites Web. Modifications d\'URL - Google Analytics - Supprime “?utm_” et “&utm_” et tout ce qui suit après ces URLs. - Facebook Click IDs - Supprime “?fbclid=”, “&fbclid=”, “?fbadid=” et “&fbadid=” et tout ce qui suit après ces URLs. - Twitter AMP - Supprime “?amp=1” et tout ce qui suit après cette URL. Moteur de Recherche Mojeek diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index c0e8cce4..56d7aba3 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -407,6 +407,7 @@ API Patch si sicurezza: Build: + Kernel: Provider di WebView: Versione di WebView: Orbot: @@ -505,12 +506,6 @@ Blocca tutte le richieste di Terze Parti Il blocco di tutte le richieste di Terze Parti aumenta privacy, ma impedisce la visualizzazione di molti siti web. Modifica delle URL - Google Analytics - Rimuovi “?utm_” e “&utm_” e tutto quello che segue dalle URL. - Facebook Click ID - Rimuovi “?fbclid=”, “&fbclid=”, “?fbadid=”, e “&fbadid=” e tutto quello che segue dalle URL. - Reindirizzamenti Twitter AMP - Rimuovi “?amp=1” e tutto quello che segue dalle URL. Ricerca Mojeek diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index 8646ae84..8e62c196 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -405,6 +405,7 @@ API Patch de segurança: Build: + Kernel: Fornecedor WebView: Versão do WebView: Orbot: @@ -503,12 +504,6 @@ Bloquear todas as solicitações de terceiros Bloquear todas as solicitações de terceiros aumenta a privacidade, mas quebra muitos sites. Modificação de URL - Google Analytics - Remova utm_ e amp; utm_ e qualquer coisa depois deles dos URLs. - IDs de clique do Facebook - Remover “?fbclid=†, “&fbclid=†, “?fbadid=†, e “&fbadid=†e qualquer coisa depois deles a partir de URLs. - Redirecionamentos de AMP do Twitter - Remover “?amp=1†e qualquer coisa depois de URLs. Search Mojeek diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 4ec27366..c08cba29 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -404,6 +404,7 @@ API Патч безопасности: Сборка: + Ядро: Провайдер WebView: Версия WebView: Orbot: @@ -501,12 +502,6 @@ Блокировать все сторонние запросы Блокировка всех сторонних запросов повышает конфиденциальность, но ломает многие веб-сайты. Модификация URL - Google Analytics - Удалять из URL “?utm_” и “&utm_” и все что будет после. - Идентификаторы кликов в Facebook - Удалять из URL “?fbclid=”, “&fbclid=”, “?fbadid=”, и “&fbadid=” и все что будет после. - AMP-перенаправления в Twitter - Удалять из URL “?amp=1” и все что будет после. Поиск Mojeek diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index 3e663f77..5c3bc78d 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -442,12 +442,6 @@ Tüm üçüncü taraf istekleri engelle Tüm üçüncü taraf istekleri engellemek gizliliği arttırır, fakat çoğu web sitesinin çökmesine sebep olur. URL Modifikasyonu - Google Analytics - URL\'lerde “?utm_” ve “&utm_” ve onlardan sonra gelen her şey kaldırıldı. - Facebook Tık ID\'leri - URL\'lerde “?fbclid=”, “&fbclid=”, “?fbadid=”, ve “&fbadid=” ve onlardan sonra gelen her şey kaldırıldı. - Twitter AMP yönlendirmeleri - URL\'den sonra gelen “?amp=1” ve diğer şeyleri kaldırır. Arama Mojeek diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index d34133c6..4162936a 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -541,12 +541,10 @@ Block all third-party requests Blocking all third-party requests increases privacy, but it breaks many websites. URL Modification - Google Analytics - Remove “?utm_” and “&utm_” and anything after them from URLs. - Facebook Click IDs - Remove “?fbclid=”, “&fbclid=”, “?fbadid=”, and “&fbadid=” and anything after them from URLs. - Twitter AMP redirects - Remove “?amp=1” and anything after it from URLs. + Tracking queries + Remove known tracking queries from URLs. + AMP redirects + Remove known AMP (Accelerated Mobil Pages) redirect queries from URLs. Search Mojeek @@ -652,6 +650,7 @@ allow_screenshots + amp_redirects bottom_app_bar cookies clear_logcat @@ -659,6 +658,7 @@ display_additional_app_bar_icons proxy_custom_url scroll_app_bar + tracking_queries System default diff --git a/app/src/main/res/xml/preferences.xml b/app/src/main/res/xml/preferences.xml index 1bdbd183..5d1abb9b 100644 --- a/app/src/main/res/xml/preferences.xml +++ b/app/src/main/res/xml/preferences.xml @@ -128,21 +128,15 @@ android:title="@string/url_modification" > - - diff --git a/build.gradle b/build.gradle index 09ebadaa..68c5ada8 100644 --- a/build.gradle +++ b/build.gradle @@ -27,7 +27,7 @@ buildscript { dependencies { classpath 'com.android.tools.build:gradle:7.2.1' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.21" + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10" // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files