aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/app/src/main/java/com (unfollow)
Commit message (Collapse)AuthorFilesLines
2020-03-09Rename app module to uiHarsh Shandilya52-6014/+0
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-03-09Migrate tunnel related classes to tunnel/ Gradle moduleHarsh Shandilya24-3485/+0
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-03-09ToolsInstaller: restrict to only main app usageJason A. Donenfeld1-0/+2
We don't want lots of different packages fighting over who gets to install the tools. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-03-09ToolsInstaller: remove versioningJason A. Donenfeld1-2/+1
Not ideal, but allows us to get rid of the BuildConfig requirement. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-03-09RootShell: remove need for BuildConfigJason A. Donenfeld1-2/+1
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-03-09Tunnel: move state change into interfaceJason A. Donenfeld6-65/+23
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-03-09MainActivity: Dispatch insets to all fragmentsHarsh Shandilya1-1/+3
Fixes tunnel list fragment rendering behind statusbar when other fragments are showing Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-03-09global: Use requireContext rather than getContext in fragmentsHarsh Shandilya3-10/+10
requireContext provides helpful error messages when it's null as opposed to getContext which simply throws a NullPointerException. Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-03-08Backend: do not use singletonsJason A. Donenfeld4-26/+33
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-03-08GoBackend: setConfigureIntent does nothingJason A. Donenfeld2-10/+2
It's only used from the ManageDialog in VpnDialogs, which in turn is only instantiated in the legacy VPN path. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-03-09ToolsInstaller: do not use RJason A. Donenfeld1-3/+1
This is horible! But ToolsInstaller uses lots of other error strings nakedly, as does ModuleLoader. These both need to be fixed up the proper way (like the last two commits). This commit here is just to make the initial porting a bit easier. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-03-09RootShell: properly use errormessagesJason A. Donenfeld4-33/+71
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-03-09ModuleDownloaderPreference: properly use errormessagesJason A. Donenfeld2-2/+2
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-03-09ErrorMessages: do not use R from backendJason A. Donenfeld6-47/+83
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-03-09ErrorMessages: do not traverse down into remote exceptionsJason A. Donenfeld1-1/+6
Otherwise we miss the actual error message. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-03-09backend: do not depend on anything except configJason A. Donenfeld19-260/+370
This is likely broken but should make for a good starting point. It also should hopefully handle stopping tunnels before starting new ones, in the case of the GoBackend. Again, untested. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-02-28MainActivity: Remove unused importsHarsh Shandilya1-4/+0
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-02-28ModuleLoader: Staticize isModuleLoadedHarsh Shandilya3-4/+5
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-02-26Resolve some lint and build warningsHarsh Shandilya1-1/+1
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-02-25ThemeChangeAwareActivity: Remove drawable cache busterHarsh Shandilya1-35/+0
Shouldn't be needed anymore. Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-02-25MainActivity: Fix backstack bug exposed by fragment 1.2.2Harsh Shandilya1-0/+1
We've been relying on implicit backstack changes to handle removing the detail fragment for a while which is now gone so let's do this properly like we should Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-02-25Resolve deprecation warningsHarsh Shandilya2-7/+4
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-02-25Cleanup inset dispatch codeHarsh Shandilya1-3/+2
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-02-25Ensure insets are dispatched to all fragmentsHarsh Shandilya1-0/+19
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-02-25Setup EdgeToEdgeHarsh Shandilya3-0/+10
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-02-25Add EdgeToEdge and coreKtx dependencyHarsh Shandilya1-0/+67
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-02-23AppListDialogFragment: Revamp toggle logicHarsh Shandilya1-1/+7
Rather than always toggle all elements, elect to unselect all if any are selected. This allows returning to a clean state in at most two clicks. Suggested-by: Jason A. Donenfeld <Jason@zx2c4.com> Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-02-23AppListDialogFragment: Code cleanupHarsh Shandilya1-9/+10
- Using the require_() methods provides helpful error messages when things are null compared to the get_() methods which throw NPEs. - Ensure currentlyExcludedApps is empty but never null - Rename inner variable to silence name shadowing lint - Make setExclusionsAndDismiss private Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-02-23AppListDialogFragment: change "Deselect All" to "Toggle All"Sébastien LEBEAU1-2/+2
Change functionality in excluded apps dialog for better user experience when user wants only one or few apps to use WireGuard. Signed-off-by: Sébastien LEBEAU <sebcbi1@gmail.com> Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-02-16SharedLibraryLoader: Fix leaked Closeable warningHarsh Shandilya1-0/+1
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-02-16Record StrictMode failures to logcatHarsh Shandilya1-0/+5
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-02-14Port tunnel creation UI from ViscerionHarsh Shandilya9-918/+138
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-02-10Attribute: remove need for android TextUtilsJason A. Donenfeld1-3/+12
If this is to be JRE-only, then it doesn't make sense to rely on the android class, especially since this is so trivial to inline. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-02-10InetAddresses: don't have global android importJason A. Donenfeld1-3/+2
This allows a proper fallback on normal JRE. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-01-24GoBackend: restrict APIs to proper versionJason A. Donenfeld1-3/+3
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-01-24GoBackend: Ensure we're unmetered on API 29 as wellHarsh Shandilya1-0/+5
VPN apps targetting Android 10 are treated as metered by default. Source: https://developer.android.com/reference/android/net/VpnService.Builder.html#setMetered(boolean) Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-01-23Rework timer in tunnel detailJason A. Donenfeld1-15/+11
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-01-23Match lowercase asus phones for fab hackJason A. Donenfeld1-1/+1
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2020-01-23GoBackend: set empty underlying networksJason A. Donenfeld1-0/+1
https://lists.zx2c4.com/pipermail/wireguard/2020-January/004859.html https://issuetracker.google.com/issues/114309459 https://developer.android.com/about/versions/pie/android-9.0-changes-all#network-capabilities-vpn Apparently we need to call this at least once. Reported-by: Andrey Kupreychik <foxel@quickfox.ru> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-12-20Introduce TunnelToggleActivityHarsh Shandilya2-13/+61
On Android 10, apps cannot start services when they're in the background. This means that starting VpnService from within QuickTileService when the app is not active ends badly. To mitigate this situation, we introduce a proxy activity of sorts that will handle starting VpnService for us. The activity is completely transparent and invisible, and does only four things: - Toggle the tunnel state - Request the Tile bound by QuickTileService to refresh its state - Handle any error that might have been thrown during toggle - Call finishAffinity() and go away Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2019-12-20Use RequiresApi instead of TargetApiJason A. Donenfeld2-4/+4
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-11-27QuickTileService: require phone be unlockedJason A. Donenfeld1-6/+8
Reported-by: Simon <simon@laro.se> Reported-by: Harsh Shandilya <me@msfjarvis.dev> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-11-20Implement statisticsJason A. Donenfeld5-6/+221
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-10-22ModuleLoader: sync file before renamingJason A. Donenfeld1-2/+2
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-10-21ToolsInstaller: write to temporary file, fsync, renameJason A. Donenfeld2-3/+8
Reported-by: Andre Christanto <christantoandre@gmail.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-10-18InetAddresses: cleanup and implement final fallbackJason A. Donenfeld1-22/+30
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-10-18Application: put user agent in log to help debuggingJason A. Donenfeld2-6/+16
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-10-18Suppress depreciation warningsJason A. Donenfeld2-0/+3
We know what we're doing here, and it's not nice. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-10-16Google doesn't want to enable others to support free open source softwareJason A. Donenfeld1-44/+0
Revert "preferences: add donation link" This reverts commit e5455f579aec48abb30ba68b0248b02d79303126. The app was removed from the Play Store for violating their payments policy. Upon filing an appeal, I was told that they do not allow donations to projects like WireGuard. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-10-14Download modules after verifying signify signatureJason A. Donenfeld4-1/+307
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>