celzero/rethink-app
49.6
Weak · 24 October 2026
179.9k
lines of production code
Kotlin
primary language
5
measurements over time
What this system is
This is an Android application that functions as a comprehensive privacy and security suite, combining a VPN, DNS firewall, and proxy service. It enables users to manage network traffic through per-app firewall rules, DNS-based blocking with customizable blocklists, and multi-hop proxy routing. The system also supports a premium subscription model for advanced features, handling billing via Google Play or Stripe depending on the distribution channel.
How it got here
2020 — Initial scaffolding and architecture modernization
21 changes.
This period established the foundational structure for the Rethink DNS Android application, including build configuration, licensing, and initial project scaffolding. The work focused on modernizing the codebase by migrating core components from Java to Kotlin, refactoring the data layer with Koin dependency injection, and overhauling the UI architecture with a new ViewModel layer. Additionally, significant features were introduced, such as app-wise network logging, firewall bubble controls, and enhanced DNS transaction tracking, supported by expanded test coverage and dependency updates.
2021–2025 — Rethink Plus subscription and infrastructure overhaul
19 changes.
This period focused on implementing the Rethink Plus subscription model across Play, F-Droid, and website builds, including in-app billing, Stripe integration, and entitlement management. It also involved a comprehensive infrastructure refactor, introducing robust background workers for blocklists, backups, and VPN management, alongside new WireGuard hop routing and improved network tracing capabilities.
2026 — UI modernization and billing integration
23 changes.
This period focused on a comprehensive UI overhaul, rewriting fragments in Kotlin, introducing Jetpack Compose for TV builds, and adding new data visualization components. It also established a robust in-app billing infrastructure for sponsorship and Rethink Plus subscriptions across Play, website, and TV variants, while improving DNS query handling and app startup performance.
Features
Added Google Play subscription adapter for website builds
A new GooglePlaySubsAdapter has been introduced in the website-specific source directory to handle subscription product display. This adapter manages the RecyclerView for subscription plans, supporting features like shimmer loading states, DiffUtil-based data updates, and selection tracking for product IDs and plan IDs. It binds pricing details, including discounts, free trials, and billing periods, to the UI, ensuring the website build has a functional subscription UI component similar to the Play Store build.
app/src/website/java/com/celzero/bravedns/adapter · high confidence
Added adapter for displaying Google Play subscription and one-time purchase plans
The app now includes a new RecyclerView adapter (GooglePlaySubsAdapter) specifically for the Play Store build to render subscription and one-time purchase options. This component handles the UI for in-app billing products, including displaying pricing details, free trial periods, discount savings, and billing cycles. It also implements a shimmer loading state to improve perceived performance while product data is being fetched from Google Play.
app/src/play/java/com/celzero/bravedns/adapter · high confidence
Enable Google Play billing recovery messages in-app
The app now displays Google Play billing-recovery notifications (such as payment declined, grace-period, or cancellation notices) directly over the user interface. This is achieved by implementing the \InAppMessageProvider\ interface in the \PlayInAppMessageProvider\ class, which delegates to \InAppBillingHandler.enableInAppMessaging\ to trigger the \BillingClient.showInAppMessages\ API for the TRANSACTIONAL category.
app/src/play/java/com/celzero/bravedns/service, app/src/website/java/com/celzero/bravedns/service · high confidence
F-Droid build adds stub billing and Stripe integration to support Rethink+ features
The F-Droid flavor now includes stub implementations for Google Play Billing classes (BillingClient, Purchase, AccountIdentifiers) and a no-op BillingBackendClient to allow the main subscription logic to compile. It also introduces a Stripe-based payment integration for the F-Droid build, including Retrofit services for Stripe API calls, a PricesAdapter for displaying subscription tiers, and a SubscriptionViewModel. A DeGoogledSponsorProvider is added to handle sponsor links without Google services, and the RethinkPlusFragment displays a 'Coming Soon' placeholder for billing features in this build.
app/src/fdroid · high confidence
Firebase Crashlytics integration for Play Store builds
The Play Store variant now includes Firebase Error Reporting, automatically initializing Firebase Crashlytics and managing a persistent user token to identify sessions. This enables automatic collection of crash reports and non-fatal exceptions, with data collection behavior controlled by the new 'firebaseErrorReportingEnabled' setting in the app's persistent state.
app/src/play/java/com/celzero/bravedns/util · high confidence
Initial project scaffolding and build configuration
This change introduces the foundational structure for the Rethink DNS + Firewall + VPN Android application. It adds the Apache 2.0 license, a comprehensive README detailing the app's features (VPN, Firewall, DNS), and a funding.json file to support development. The build system is configured via a new Android.bp file, which defines the app as a privileged system application, specifies its source and asset directories (including a new 'headless' variant), and lists required static libraries and plugins. Additionally, it includes necessary Android system configuration files (privapp permissions and power-save whitelist) and updates .gitignore and .gitattributes to manage build artifacts and generated files.
(repo-wide) · high confidence
Introduce Rethink Plus subscription UI with Google Play billing
The app now includes a dedicated Rethink Plus fragment that manages subscription purchases via Google Play In-App Billing. This UI supports both recurring subscriptions and one-time purchases, featuring a product-type toggle, a grid layout for plan selection, and error handling for billing failures. It also introduces an 'extend mode' for users with active one-time purchases to buy additional access windows, along with visual improvements like shimmer loading states and animated headers.
app/src/play/java/com/celzero/bravedns/ui · high confidence
Introduce Rethink Plus subscription management ViewModel
Added RethinkPlusViewModel to handle the business logic and state management for the Rethink Plus subscription UI. This component integrates with the in-app billing system to manage product selection, handle subscription state changes, and process purchase flows, including specific support for one-time repurchases and error handling for billing interactions.
app/src/play/java/com/celzero/bravedns/viewmodel · high confidence
Introduce Rethink TV UI with initial firewall, DNS, and logging screens
The app now includes a dedicated TV interface built with Jetpack Compose and Android TV Material 3. This release adds the entry-point activity, a navigation scaffold, and several core screens: an Apps list and detail view for managing per-app firewall rules, a DNS configuration screen, a Console log viewer with level filtering, and an RPN bypass list for excluding apps from the proxy. The UI also includes common components like a ten-foot-optimized toggle row, a welcome onboarding banner, and a LiveData adapter to ensure UI updates work correctly with the app's data layer.
app/src/tv/java · high confidence
New Google Play In-App Billing and RPN entitlement backend integration
This change introduces the complete in-app billing (IAB) infrastructure for the Play build, enabling users to purchase and manage Rethink Plus subscriptions and one-time access tiers directly through Google Play. It adds a new backend client (BillingBackendClient) that handles server-side identity (CID/DID) management and billing API calls, alongside a comprehensive InAppBillingHandler that manages the full purchase lifecycle including product queries, subscription and one-time purchase processing, and server acknowledgement. The update also includes background workers (PendingPurchaseWorker) to reliably resolve pending purchases, notification handlers for device registration errors, and Koin dependency injection wiring to integrate these components into the application.
app/src/play/java/com/celzero/bravedns/iab · high confidence
New Rethink Plus subscription UI for website builds
The website build now includes a dedicated Rethink Plus subscription screen (RethinkPlusFragment) that allows users to view and purchase subscription plans via Google Play In-App Billing. This new UI supports a one-time purchase option and an 'extend mode' for existing subscribers to add more access time, featuring error handling, retry mechanisms, and visual feedback for billing states.
app/src/website/java/com/celzero/bravedns/ui · high confidence
New ViewModel layer for app firewall, connection tracking, and DNS statistics
The app introduces a comprehensive set of new ViewModels in the \viewmodel\ package to power the revamped UI screens for app information, connection tracking, and DNS statistics. These components implement the core logic for the firewall app list (filtering by installed/system, proxy bypass, and sorting), the connection tracker (supporting protocol, allow/block, and search filters with paging), and the statistics dashboard (aggregating allowed/blocked activity by app, domain, IP, ASN, and country over configurable time windows). The change also adds specialized ViewModels for managing custom IP and domain rules, handling blocked and temporarily allowed app bubbles, and displaying console logs, effectively shifting the data-fetching and filtering responsibilities from the UI layer into a structured, observable ViewModel architecture.
app/src/main/java/com/celzero/bravedns/viewmodel · high confidence
New adapters for activity logs, country servers, and VPN server selection
The app introduces three new RecyclerView adapters to power the revamped UI: AppActivityAdapter displays a two-level list of app activity summaries with lazy-loaded, expandable connection details; CountryServerAdapter presents servers grouped by country with alphabetical headers and expandable city groups; and VpnServerAdapter manages the active VPN server selection grid, including live stats polling, loading states, and proxy-stopped indicators.
app/src/main/java/com/celzero/bravedns/ui/adapter · high confidence
New and improved VPN configuration dialogs
The app introduces several new and refactored UI dialogs for managing VPN settings. A new Custom LAN IP dialog allows users to configure custom IPv4/IPv6 gateway, router, and DNS addresses in both automatic and manual modes. Network reachability testing is now handled by a dedicated dialog supporting auto-detection and manual IP/URL probes. WireGuard peer management is now handled by a new WgAddPeer dialog with auto-expanding text fields and live validation. Country-based VPN hopping is supported via new RpnProxyHop and WgHop dialogs that extend a shared GenericHopDialog base. SSID-based connection rules are managed through new RpnSsid and WgSsid dialogs with animated entry and conditional radio button states. Additionally, a DnsCryptRelaysDialog displays relay lists in a full-screen recycler view, and a SubscriptionAnimDialog provides a festive confetti animation for subscription events. All dialogs are now constrained to the app's maximum width on foldables and tablets to prevent over-expansion.
app/src/main/java/com/celzero/bravedns/ui/dialog · high confidence
New and revamped UI activities for settings, app management, and security
The app introduces a new Advanced Settings screen for configuring experimental features, auto-dials, and debug options, alongside a new App Lock activity that enforces biometric authentication before accessing the app. Existing screens have been overhauled: the App Info screen now displays detailed network insights with synchronized list and chart views, the App List screen features a redesigned firewall filter system, and the Anti-Censorship screen now dynamically disables incompatible dial and retry strategies when proxy lockdown is active.
app/src/main/java/com/celzero/bravedns/ui/activity · high confidence
New app-wise network log views and firewall bubble controls
The app introduces several new RecyclerView adapters to power the revamped app-wise connection logs and the new firewall bubble UI. Users can now see detailed, paginated breakdowns of network activity per app, including views for domains (AppWiseDomainsAdapter), IP addresses (AppWiseIpsAdapter), and countries (AppWiseCountriesAdapter), all of which display connection counts, status indicators, and allow tapping to apply specific firewall rules via bottom sheets. Additionally, the firewall bubble now features dedicated lists for temporarily allowed apps (BubbleAllowedAppsAdapter) and blocked apps (BubbleBlockedAppsAdapter), enabling users to quickly review and manage these exceptions directly from the notification area.
app/src/main/java/com/celzero/bravedns/adapter · high confidence
New background workers for backup and restore operations
The app now uses dedicated Android WorkManager workers (BackupAgent and RestoreAgent) to handle backup and restore tasks in the background, replacing previous synchronous or delegated approaches. This change ensures that backup and restore processes do not block the main UI thread, improving app responsiveness during these potentially long-running operations. The implementation includes robust error handling, logging via a custom Logger, and specific logic for managing WireGuard configurations and database migrations during restore.
app/src/main/java/com/celzero/bravedns/backup · high confidence
New custom UI components for stats, maps, and premium branding
The app introduces a suite of new custom Android views in the ui.custom package to enhance data visualization and the premium user experience. These include AppHistogramView for displaying per-app activity on the home screen, CountryMapView for visualizing connection geography, DonutChartView for stats breakdowns, and AnimatedBorderCardView for interactive selection feedback. The package also adds DolphinOceanView and EmbeddedDolphinSignature to provide animated, vector-based branding for the Rethink Plus premium screens, alongside FlagWatermarkView for subtle country indicators.
app/src/main/java/com/celzero/bravedns/ui/custom · high confidence
New custom downloader module for blocklists, IP info, and billing
The app introduces a new \customdownloader\ package that centralizes network operations for blocklist updates, IP geolocation, WireGuard/Warp configuration, and billing entitlements. This includes dedicated Retrofit interfaces (e.g., \IBlocklistDownload\, \IIpInfoDownload\, \IBillingServerApi\) and background workers (\LocalBlocklistCoordinator\, \RemoteBlocklistCoordinator\) to handle downloads with progress tracking and notifications. The \IpInfoDownloader\ adds logic to cache IP info and limit concurrent requests to prevent resource exhaustion, while \SafeResponseConverterFactory\ improves reliability by gracefully handling non-JSON server responses.
app/src/main/java/com/celzero/bravedns/customdownloader · high confidence
New database entities and DAOs for activity aggregation, alerts, and console logging
The database layer introduces several new components to support richer analytics and logging. ActivityBucketRow, AppActivityRow, AppUsageRow, AppBlockedRow, and DomainActivityRow are new data classes used by the LogActivityAggregator to compute time-windowed statistics (such as per-app usage, blocked counts, and domain activity) without loading individual log rows. An AlertRegistry entity and DAO are added to persist and manage in-app alerts. ConsoleLog, ConsoleLogDAO, and ConsoleLogDatabase establish an in-memory Room database for storing and querying application console logs with level-based filtering. Additionally, BlocklistAttribution and BlocklistComboCount data classes are added to track which blocklists are responsible for blocking specific queries.
app/src/main/java/com/celzero/bravedns/database · high confidence
New favicon downloader and Glide module configuration
The app introduces a new FavIconDownloader component that fetches website favicons using NextDNS and DuckDuckGo as fallback sources, caching failed URLs to avoid repeated attempts. This is supported by a new RethinkGlideModule that configures Glide with a 30 MB memory cache, a 350 MB disk cache, and optimized thread pools for disk and source operations. The module also sets an explicit NO\_PROXY for OkHttp to prevent crashes on devices with invalid global proxy settings and registers no-op loaders for Unit models to prevent NoModelLoaderAvailableException crashes.
app/src/main/java/com/celzero/bravedns/glide · high confidence
New guided tours for the Home screen and RPN dashboard
Users will now see an interactive, step-by-step guided tour on the Home screen that highlights key features like VPN, DNS, Firewall, Proxy, Logs, Rules, and Rethink+ (RPN). Additionally, new subscribers to RPN will see a dedicated onboarding tour on the RPN dashboard that introduces features such as multi-country server selection, relay chaining, bypass apps, per-app routing, and settings. These tours are version-gated, meaning they will reappear if the app is updated with a new UI revision, and premium steps are visually distinguished with a golden glow and badge.
app/src/main/java/com/celzero/bravedns/ui/tour · high confidence
New in-app billing backend and notification system for RPN Plus subscriptions
This change introduces the core backend and notification infrastructure for the RPN Plus subscription feature in the website build. It adds a new \BillingBackendClient\ that manages all HTTP interactions with the Rethink billing API (including account/device identity resolution and purchase acknowledgements) and registers it via a new Koin \BillingModule\. To handle critical failure states, it adds \DeviceAuthErrorNotifier\ and \DeviceNotRegisteredNotifier\, which post high-priority system notifications when API calls fail with HTTP 401 or when a device cannot be registered, respectively; tapping these notifications routes users to a handler activity to resolve the issue.
app/src/website/java/com/celzero/bravedns/iab · high confidence
New scheduler workers for blocklist updates, VPN auto-start, and enhanced bug reporting
The app introduces several new background workers in the scheduler package to improve reliability and diagnostics. BlocklistUpdateCheckJob now handles blocklist update checks for both local and remote sources. BootStartWorker attempts to auto-start the VPN after reboot or profile unlock, with improved resilience against OEM boot killers and Android 12+ background service restrictions. EnhancedBugReport and BugReportCollector now provide more detailed crash reporting, including tombstone file handling, Go runtime logs, and app exit information. LogExportWorker streams logs in chunks to prevent memory issues. DataUsageUpdater consolidates data usage tracking for both regular apps and Rethink DNS traffic. PurgeConnectionLogs and PurgeConsoleLogs manage log retention based on user settings. PaymentWorker handles in-app purchase verification with retry logic. RpnProxyUpdateWorker periodically refreshes proxy state and billing information.
app/src/main/java/com/celzero/bravedns/scheduler · high confidence
New service-layer components for app updates, quick-settings, and network diagnostics
The service package introduces several new components: AppUpdater defines the interface for checking and installing app updates; BraveTileService implements the Quick Settings tile with a stable observer pattern to prevent leaks and handles app-lock gating; ConnectionMonitor is a new class managing network callbacks with throttled connectivity checks; ConsoleLogManager provides a wrapper for inserting console logs; DiagnosticsManager registers for Android R+ connectivity diagnostics to detect network stalls; and DnsLogTracker processes DNS responses and classifies blocked answers. These additions support the app's VPN connectivity, logging, and update capabilities.
app/src/main/java/com/celzero/bravedns/service · high confidence
New utility components for UID mapping, animated UI borders, and firewall bubble notifications
The app introduces several new utility classes in the \util\ package to support recent feature updates. \AndroidUidConfig\ provides a comprehensive, type-safe mapping of Android system UIDs and GIDs, replacing magic numbers with a structured enum for better code clarity. \AnimatedBorderDrawable\ adds a new visual component that renders a moving, accent-colored highlight around rounded rectangles, enabling more dynamic UI elements. \BubbleHelper\ implements the Android Bubble API, allowing firewall notifications to appear as floating, interactive windows on supported devices (Android 10+), complete with channel management and shortcut creation. Additionally, \BackgroundAccessibilityService\ has been updated to handle foreground app tracking for the firewall, and \ExceptionParser\ adds robust parsing for both Go and Java/Kotlin crash traces to improve error reporting.
app/src/main/java/com/celzero/bravedns/util · high confidence
RPN purchase screen added for TV builds
The RPN purchase screen is now available on TV builds. The Play and website TV variants include a full Compose-based checkout interface that lets users browse and subscribe to Rethink Plus plans using in-app billing, while the F-Droid TV variant displays a stub message indicating that the subscription service is not available on that build.
app/src/fdroidTv, app/src/playTv, app/src/websiteTv · high confidence
Rethink Plus subscription management for the website build
The website-specific build now includes a dedicated ViewModel (RethinkPlusViewModel) to handle Rethink Plus subscription logic, including product filtering (one-time vs. subscription), billing state observation, and error handling for acknowledgement failures and timeouts. This brings the website build's subscription UI capabilities in sync with the Play Store build.
app/src/website/java/com/celzero/bravedns/viewmodel · high confidence
Sponsorship now supports Google Play In-App Billing alongside Stripe
The app now offers a native in-app purchase flow via Google Play Billing for users on Play-enabled builds, while continuing to support the existing Stripe web link for F-Droid and de-googled devices. The Sponsor screen dynamically shows a contribution selector (slider and quick-select chips for $1, $5, $10, $15, $25, $50, and $100) and a 'Support' button when Play Billing is available, and hides these in favor of the Stripe link when it is not. The SponsorFragment handles this visibility logic, while the SponsorViewModel and SponsorBillingManager interface manage the Play purchase flow, preserving the authoritative purchase time and token. Sponsorship state is persisted locally via a new SponsorDao and SponsorRepository, which treat the database row as the single source of truth and increment the contribution count for repeat purchases rather than creating duplicates.
app/src/main/java/com/celzero/bravedns/sponsor · high confidence
Stats screen gains toggleable Insights view mode
The Stats screen now supports a toggleable UI that switches between a standard list view and a new Insights view. This change introduces a \StatsViewMode\ enum to manage the presentation state, a \CountryInsightsMapper\ to convert flag emojis into ISO country codes for map matching, and a \StatsInsightsMath\ helper to normalize data values for visualization, enabling users to view their DNS statistics in a summarized, insights-driven format.
app/src/main/java/com/celzero/bravedns/ui/stats · high confidence
WireGuard configuration parsing and hop management
The app now includes a complete WireGuard configuration parser and a hop-routing manager. The parser (Attribute, Config, Peer, WgInterface, InetAddresses, InetEndpoint, InetNetwork, KeyPair, ParseException, BadConfigException) validates and serializes WireGuard configs, supports Amnezia WireGuard properties, and delegates DNS resolution of endpoints to the Go layer. The WgHopManager introduces hop routing between WireGuard configs, allowing users to route traffic from one WireGuard configuration through another, with UI integration for managing these hops.
app/src/main/java/com/celzero/bravedns/wireguard · high confidence
Removals
Removal of bundled tun2socks binary and associated metadata
The local copy of the tun2socks Android Archive (tun2socks.aar) and its associated git-id tracking file have been removed from the project. This eliminates the locally bundled version of the Jigsaw Code outline-go-tun2socks library, which was previously included under the Apache 2.0 license.
tun2socks · high confidence
Removal of legacy DNS packet parsing classes
The \DnsPacket.java\ and \DnsPacket.kt\ files in the \app/src/main/java/com/celzero/bravedns/net/dns\ directory have been deleted. These classes previously handled the low-level parsing of DNS query and response packets, including reading names, records, and flags. Their removal indicates that the app no longer uses this specific implementation for DNS packet processing in this location.
app/src/main/java/com/celzero/bravedns/net/dns · high confidence
Behavioural changes
1 commit (0 fixes) modifying app/src/main/assets/database
A change to existing behaviour in app/src/main/assets/database — 1 commit, 1 file.
app/src/main/assets/database · low confidence · unverified
App update checks now use a web-based updater for non-Play installations
The app now uses a dedicated NonStoreAppUpdater to check for updates via a web endpoint for non-Play store builds, replacing previous mechanisms. This change introduces a new Koin dependency injection setup (ServiceModuleProvider) to manage components like the updater, download manager, and scheduler, ensuring consistent initialization across the application.
app/src/main/java/com/celzero/bravedns · high confidence
Blocklist download manager refactored with improved error handling and state reconciliation
The local blocklist download process has been restructured to use a new AppDownloadManager that coordinates Android's DownloadManager and WorkManager. This change introduces robust state reconciliation to prevent stale 'in-progress' states from blocking future downloads, and adds specific error handling for download failures (network, storage, and system errors) that are now surfaced to the user. The implementation also includes cleanup logic to remove old and temporary blocklist files after a successful update.
app/src/main/java/com/celzero/bravedns/download · high confidence
Bottom sheets now render fully expanded and centered on large screens
All bottom sheets in the app now extend a new BaseBottomSheetDialogFragment that enforces a 600dp maximum width and forces the sheet to open fully expanded (skipping the collapsed/peek state). On foldables, tablets, and split-screen layouts this keeps the UI centered and readable instead of stretching edge-to-edge, while regular phones remain unaffected.
app/src/main/java/com/celzero/bravedns/ui/bottomsheet · high confidence
Complete UI fragment rewrite in Kotlin
The UI fragment layer has been completely rewritten in Kotlin, replacing the previous Java implementation. This change introduces modern Android development patterns including ViewBinding for type-safe view access, Koin for dependency injection, and Coroutines for asynchronous operations. The fragments now use lifecycle-aware components and provide improved handling of configuration changes, resulting in a more robust and maintainable codebase.
app/src/main/java/com/celzero/bravedns/ui/fragment · high confidence
DNS query handling and logging improvements in the tunnel manager
The new TunDnsManager centralizes DNS query processing, introducing a cache to track firewall block/allow reasons so users can see the specific reason for blocked domains in the DNS bottom sheet. It also simplifies the no-proxy check logic and ensures universal trusted domains are handled correctly during queries. Additionally, execution time logging for DNS queries is now restricted to debug builds to reduce overhead in production.
app/src/main/java/com/celzero/bravedns/tunnel · high confidence
DNS transaction model expanded and core classes migrated to Kotlin
The DNS transaction tracking model has been significantly enriched to provide more detailed visibility into query outcomes. The new Transaction class now captures additional context including the user ID, specific blocklist and relay names, transport type, caching status, DNSSEC validation results, and the precise reason a target was blocked. To support this richer data, a new CountryMap utility has been added to resolve IP addresses to country codes using local binary databases. Under the hood, the core networking components (Transaction, CountryMap, Race) have been migrated from Java to Kotlin, and the Race class now utilizes Kotlin records for cleaner callback handling.
app/src/main/java/com/celzero/bravedns/net/doh · high confidence
Data layer refactored to use Koin dependency injection and new data models
The data layer in the app has been restructured to use Koin for dependency injection, replacing the previous singleton pattern with explicit constructor injection for components like AppConfig. This change introduces several new data models to support updated features: SsidItem now stores Wi-Fi SSID configurations in JSON format to support precise matching types (exact, wildcard, not-equal); BlockFreeDnsItem and BlockFreeDnsType provide a structured way to manage DNS endpoints in the Block-Free DNS selector; and new classes like AppConnection, ConnectionSummary, and RpnConnStatsSummary enhance connection tracking with detailed metrics like proxy IDs, relay proxy IDs, and byte counts. Additionally, BlocklistStatsAggregator was added to handle complex blocklist statistics aggregation on the device, and FileTag was updated with a custom deserializer to handle legacy and new blocklist formats.
app/src/main/java/com/celzero/bravedns/data · high confidence
Improved UID resolution for UDP and ICMP connections with caching
The ConnectionTracer now implements a caching mechanism for network connection UIDs, reducing redundant system calls. It also adds specific support for resolving UIDs for ICMP and ICMPv6 protocols (though currently returning an invalid UID as a placeholder) and refines the retry logic for unconnected UDP sockets by attempting fallback strategies (changing destination port and IP) before falling back to the cache.
app/src/main/java/com/celzero/bravedns/net/manager · high confidence
Improved reliability and error handling for in-app billing and device registration
The in-app billing (IAB) module has been refactored to provide more robust purchase handling and clearer error reporting. A new \DeviceRegistrationGuard\ prevents duplicate device registrations caused by concurrent background workers, ensuring each device maintains a single identity. The billing flow now uses typed result classes (such as \QueryEntitlementResult\ and \RefreshIdentityResult\) to distinguish between specific server errors (like 401 Unauthorized or 409 Conflict) and transient network issues, allowing the app to handle failures more gracefully. Additionally, a new \AckFailureInfo\ class ensures that acknowledgement failures are persisted and visible to the user even if the UI fragment is destroyed, and a \SecureIdentityStore\ now manages account and device IDs with environment isolation and automatic migration from legacy storage.
app/src/main/java/com/celzero/bravedns/iab · high confidence
Lint configuration and build artifact cleanup
The app module now includes a lint.xml configuration file that suppresses specific lint issues (StringFormatInvalid, StringFormatMatches) and ignores all lint checks for translation strings in values folders. Additionally, the app-level .gitignore file has been removed, and the proguard-rules.pro file has been deleted, indicating a shift in how build artifacts and code obfuscation rules are managed.
app · high confidence
Migrate ProGuard rules to AGP 9.3 keepRules format and fix OkHttp crash
The project-specific R8 keep rules have been migrated from the legacy proguard-rules.pro file to the new app.keep file, aligning with the AGP 9.3 migration to the optimization DSL. This change also includes a critical fix for an OkHttp crash on certain devices by preserving the okhttp3.internal.idn classes, which were previously stripped by R8 full mode, and removes obsolete -printmapping directives that are no longer needed.
app/src/main/keepRules · high confidence
New broadcast receivers for system events and external app control
The app now includes dedicated broadcast receivers to handle specific system and external triggers: BraveAutoStartReceiver ensures the VPN restarts on boot, reboot, or user unlock if auto-start is enabled; UserPresentReceiver syncs the VPN state with screen lock/unlock events; BubbleDismissReceiver disables the firewall bubble when the user dismisses it; and VpnControlReceiver allows trusted external apps (like Tasker) to start or stop the VPN via explicit intents. NotificationActionReceiver is also present to handle direct actions from the notification bar, such as pausing/resuming the VPN or managing firewall rules.
app/src/main/java/com/celzero/bravedns/receiver · high confidence
Play Store builds now use in-app updates and Play-specific services
The Play Store flavor of the app now integrates Google Play services for automatic error reporting via Firebase Crashlytics and handles app updates through the Play In-App Update API. This replaces previous update-check mechanisms with a Play-native flow that supports both flexible and immediate updates, while also enabling background data usage scheduling and system component initialization specific to the Play distribution.
app/src/play/java/com/celzero/bravedns · high confidence
Rethink Plus proxy management and billing state machine overhaul
The RPN proxy module has been significantly refactored to improve reliability and billing accuracy. A new state machine framework (SubscriptionStateMachineV2) now manages subscription lifecycles, ensuring Google Play is the single source of truth and preventing race conditions during local cancellations. Proxy operations are now handled by dedicated managers: RpnProxyManager for core tunnel logic, RpnHopManager for multi-hop routing, and PipKeyManager for secure key rotation and availability checks. These changes result in more stable proxy connections, accurate entitlement handling, and a robust foundation for the Rethink Plus user experience.
app/src/main/java/com/celzero/bravedns/rpnproxy · high confidence
Sponsorship billing now uses Google Play In-App Purchases
The sponsorship feature has switched from its previous payment method to Google Play In-App Billing. This change introduces a new billing implementation that manages a single product with multiple fixed-price tiers ($1, $5, $10, $15, $25, $50, $100) via purchase options. The system now initializes the billing client at app startup to ensure subscription status is available immediately, and handles purchase flows, existing purchase queries, and error states through the Google Play Billing Library.
app/src/website/java/com/celzero/bravedns/sponsor · high confidence
Sponsorship billing now uses Google Play In-App Purchases
The sponsorship feature in the Play Store build has switched from its previous implementation to use Google Play's Billing Library. This change introduces a new billing module that manages a single in-app product with multiple fixed-price tiers (offering contribution levels from $1 to $100). The system initializes the billing client at app startup to ensure subscription status is available immediately, and handles purchase flows by selecting specific offer tokens corresponding to the user's chosen amount.
app/src/play/java/com/celzero/bravedns/sponsor · high confidence
Stubbed Firebase error reporting for the website variant
The website build now includes a stub implementation of the Firebase error reporting interface. This ensures the application compiles and runs without Firebase dependencies in the website flavor, while maintaining API compatibility with the Play Store variant which uses real Firebase Crashlytics. All error reporting methods in this stub are no-ops, meaning crash data and logs will not be sent to Firebase for website users.
app/src/website/java/com/celzero/bravedns/util · high confidence
UI architecture overhaul: new base activity, launcher switching, and removal of legacy screens
The app's UI layer has been restructured to improve layout consistency and build-time safety. A new BaseActivity now centralizes status-bar icon coloring for all themes and enforces a 600dp content-width cap on large screens (foldables, tablets) to maintain phone-like proportions without breaking ViewBinding. A new LauncherSwitcher utility enables runtime switching of launcher aliases, while a new NotificationHandlerActivity manages notification-driven navigation. As part of this cleanup, several legacy components—AppInfoActivity, ApplicationManagerActivity, ApplicationManagerFragment, BottomSheetFragment, FilterAndSortBottomFragment, FirewallActivity, HomeScreenFragment, InternetManagerFragment, PermissionManagerActivity, and PermissionManagerFragment—have been removed.
app/src/main/java/com/celzero/bravedns/ui · high confidence
Updated remote blocklist definitions in filetag.json
The local asset file \filetag.json\ has been replaced with a new version containing an updated set of remote blocklist definitions. This update refreshes the available filtering options for users, including entries for privacy, security, parental control, and service-specific blocking (such as social media, streaming, and gaming platforms), ensuring the app uses the latest curated lists for DNS-based filtering.
app/src/main/assets · high confidence
VPN adapter migrated from Java to Kotlin with updated Go backend integration
The core VPN adapter has been rewritten from Java to Kotlin (GoVpnAdapter.kt), replacing the legacy GoVpnAdapter.java and GoIntraListener.java files. This migration updates the adapter to use the new Intra.connect API for tunnel initialization and integrates with the Firestack backend for DNS and proxy management, while the GoProber is now a no-op stub as its underlying Go transport calls have been removed.
app/src/main/java/com/celzero/bravedns/net/go · high confidence
Test coverage
Added UI tests for Anti-Censorship activity; Added VPN startup benchmark tests; Added comprehensive UI instrumentation tests for app activities and fragments; Added database integration tests for DAOs and migrations; Added unit tests for in-app billing and identity reconciliation; Expanded unit and integration tests for database, adapters, and core services.
Dependencies
Gradle wrapper upgraded to version 9.6.0
The Gradle wrapper has been updated to use Gradle 9.6.0 (previously 6.1.1). This upgrade includes new configuration properties for distribution validation, network timeout handling, and retry logic, ensuring a more robust and modern build environment for the project.
gradle/wrapper · high confidence
Migrate build system to Gradle Kotlin DSL and modernize SDK targets
The project has replaced legacy Groovy build scripts with Gradle Kotlin DSL (build.gradle.kts), introducing a centralized version catalog (gradle/lib.toml) for dependency management. This update raises the compile and target SDK levels to 37 and sets the Java language version to 17. It also enables modern Android build features such as non-transitive R classes and the Gradle configuration cache, while refining the build logic for conditional Firebase plugin application and configurable repository sources for the Firestack library.
(dependencies) · high confidence
Housekeeping
Removed tun2socks build artifacts
Deleted the tun2socks build folder and its contents, including intermediate transform files, compiled binaries (such as jetified-tun2socks.aar and .jar files), Android manifests, and native library identifiers. This cleanup removes generated build outputs from the repository.
tun2socks/build · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 49 → 50 (+0.8)
Lenses
- Code Health 80 → 80 (-0.2)
- Architecture 90 → 89 (-1.1)
- Maturity 47 → 47 (+0.5)
- Readiness 51 → 57 (+5.7)
- Security 58 → 58 (+0.0)
- Domain Modelling 42 → 42 (-0.1)
- Performance 81 → 81 (+0.0)
Resolved (243)
- Duplicated block (10 lines × 2) (app/src/main/java/com/celzero/bravedns/glide/FavIconDownloader.kt)
- Duplicated block (10 lines × 2) (app/src/main/java/com/celzero/bravedns/ui/activity/AppWiseDomainLogsActivity.kt)
- Duplicated block (10 lines × 3) (app/src/main/java/com/celzero/bravedns/adapter/DoTEndpointAdapter.kt)
- Duplicated block (10 lines × 4) (app/src/main/java/com/celzero/bravedns/adapter/CustomIpAdapter.kt)
- Duplicated block (10 lines × 6) (app/src/main/java/com/celzero/bravedns/ui/activity/CheckoutActivity.kt)
- Duplicated block (11 lines × 2) (app/src/main/java/com/celzero/bravedns/adapter/DnsCryptEndpointAdapter.kt)
- Duplicated block (11 lines × 2) (app/src/main/java/com/celzero/bravedns/ui/activity/CustomRulesActivity.kt)
- Duplicated block (11 lines × 2) (app/src/main/java/com/celzero/bravedns/ui/fragment/RethinkPlusDashboardFragment.kt)
- Duplicated block (11 lines × 3) (app/src/main/java/com/celzero/bravedns/rpnproxy/RpnProxyManager.kt)
- Duplicated block (11 lines × 3) (app/src/main/java/com/celzero/bravedns/ui/activity/AdvancedSettingActivity.kt)
- Duplicated block (11 lines × 3) (app/src/tv/java/com/celzero/bravedns/tv/ui/apps/RpnBypassAppsScreen.kt)
- Duplicated block (11 lines × 4) (app/src/main/java/com/celzero/bravedns/ui/activity/DnsDetailActivity.kt)
- Duplicated block (11 lines × 8) (app/src/tv/java/com/celzero/bravedns/tv/ui/dns/DnsScreen.kt)
- Duplicated block (12 lines × 2) (app/src/main/java/com/celzero/bravedns/ui/activity/CheckoutActivity.kt)
- Duplicated block (12 lines × 2) (app/src/main/java/com/celzero/bravedns/ui/activity/RpnConfigDetailActivity.kt)
- Duplicated block (12 lines × 2) (app/src/main/java/com/celzero/bravedns/ui/activity/WgConfigDetailActivity.kt)
- Duplicated block (12 lines × 2) (app/src/play/java/com/celzero/bravedns/iab/BillingBackendClient.kt)
- Duplicated block (12 lines × 2) (app/src/play/java/com/celzero/bravedns/iab/InAppBillingHandler.kt)
- Duplicated block (14 lines × 2) (app/src/play/java/com/celzero/bravedns/iab/BillingBackendClient.kt)
- Duplicated block (14 lines × 2) (app/src/play/java/com/celzero/bravedns/iab/InAppBillingHandler.kt)
- …and 223 more
New (235)
- BillingBackendClient.queryEntitlement (cyclomatic 16) (app/src/play/java/com/celzero/bravedns/iab/BillingBackendClient.kt)
- BillingBackendClient.queryEntitlement (cyclomatic 16) (app/src/website/java/com/celzero/bravedns/iab/BillingBackendClient.kt)
- BillingBackendClient.refreshIdentityLocked (cognitive 25) (app/src/play/java/com/celzero/bravedns/iab/BillingBackendClient.kt)
- BillingBackendClient.refreshIdentityLocked (cognitive 25) (app/src/website/java/com/celzero/bravedns/iab/BillingBackendClient.kt)
- BillingBackendClient.refreshIdentityLocked (cyclomatic 18) (app/src/play/java/com/celzero/bravedns/iab/BillingBackendClient.kt)
- BillingBackendClient.refreshIdentityLocked (cyclomatic 18) (app/src/website/java/com/celzero/bravedns/iab/BillingBackendClient.kt)
- CustomerSupportActivity.collectAndSend (cyclomatic 39) (app/src/main/java/com/celzero/bravedns/ui/activity/CustomerSupportActivity.kt)
- Dependency hygiene PARTLY measured — Maven/Gradle declarations read, no dependency graph resolved
- Duplicated block (10 lines × 2) (app/src/main/java/com/celzero/bravedns/ui/activity/AppLockActivity.kt)
- Duplicated block (10 lines × 2) (app/src/main/java/com/celzero/bravedns/ui/activity/AppWiseDomainLogsActivity.kt)
- Duplicated block (10 lines × 2) (app/src/main/java/com/celzero/bravedns/ui/activity/CustomerSupportActivity.kt)
- Duplicated block (10 lines × 2) (app/src/main/java/com/celzero/bravedns/ui/activity/RpnConfigDetailActivity.kt)
- Duplicated block (10 lines × 2) (app/src/play/java/com/celzero/bravedns/iab/InAppBillingHandler.kt)
- Duplicated block (10 lines × 2) (app/src/play/java/com/celzero/bravedns/iab/InAppBillingHandler.kt)
- Duplicated block (10 lines × 2) (app/src/play/java/com/celzero/bravedns/ui/fragment/RethinkPlusFragment.kt)
- Duplicated block (10 lines × 2) (app/src/play/java/com/celzero/bravedns/ui/fragment/RethinkPlusFragment.kt)
- Duplicated block (10 lines × 2) (app/src/play/java/com/celzero/bravedns/ui/fragment/RethinkPlusFragment.kt)
- Duplicated block (10 lines × 3) (app/src/main/java/com/celzero/bravedns/rpnproxy/RpnProxyManager.kt)
- Duplicated block (10 lines × 3) (app/src/main/java/com/celzero/bravedns/service/ConnectionMonitor.kt)
- Duplicated block (10–12 lines × 6) (app/src/main/java/com/celzero/bravedns/ui/activity/AdvancedSettingActivity.kt)
- …and 215 more
Changes since last survey
- 107 commits — 76 feature/other, 31 fixes
By area
- app/src — 76 commits
- app/build.gradle.kts — 12 commits
- (root) — 8 commits
- (repo) — 7 commits
- fastlane/metadata — 3 commits
- benchmark/build.gradle.kts — 1 commit
Notable commits
- fix: Fix stale home-screen imports after rebase
- fix: Merge branch 'main' into fix/rpn-ack-malformed-2xx
- fix: Merge pull request #3157 from Huge/fix/rpn-ack-malformed-2xx
- fix: Merge pull request #3199 from mvanhorn/fix/3197-vpn-control-intent-identity-fallback
- fix: bug-rpt: enhanced go-log auto reporting for play
- fix: build: fix univ apk version, upload native symbol on google builds
- fix: dao: fix usage of not like in conn tracker queries
- fix: fix #3029: add edge-edge, apply proper insets
- fix: fix #3029: ui clipping, insets fix
- fix: fix #309: do not cache transient onion failures
- fix: fix #3195: initialize workmgr if self init never ran on this device
- fix: fix #3195: on demand initialization of WorkManager
- fix: fix #3209: close existing conns of temp allow
- fix: fix #3209: temp -allow cache expiry for the app info desc
- fix: fix #3214, add default dns in case config has none
- fix: fix: #3177, rmv floating text-selection toolbar on select devices
- fix: fix: #3192 add okhttp3.internal.idn in proguard
- fix: fix: #3203: fix null ptr on internet permission check
- fix: fix: add notif action for dismiss/disable in bubble helper
- fix: fix: additional check on dga domains for fav icon
- …and 87 more
Architecture
- Unchanged — 0 containers · 1 contexts · 0 edges
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
celzero/rethink-app was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 24 October 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 41701686338e0a5b58066746d73d2652e78f845d — the exact code this score is about.
- Scored under rubric-2026.10.5 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer measure-2026.10.6+preprod-d36780c2d857.