aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/app/src/main/java/com/wireguard (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Rename app module to uiHarsh Shandilya2020-03-0952-6014/+0
| | | | Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* Migrate tunnel related classes to tunnel/ Gradle moduleHarsh Shandilya2020-03-0924-3485/+0
| | | | Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* ToolsInstaller: restrict to only main app usageJason A. Donenfeld2020-03-091-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>
* ToolsInstaller: remove versioningJason A. Donenfeld2020-03-091-2/+1
| | | | | | Not ideal, but allows us to get rid of the BuildConfig requirement. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* RootShell: remove need for BuildConfigJason A. Donenfeld2020-03-091-2/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Tunnel: move state change into interfaceJason A. Donenfeld2020-03-096-65/+23
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* MainActivity: Dispatch insets to all fragmentsHarsh Shandilya2020-03-091-1/+3
| | | | | | Fixes tunnel list fragment rendering behind statusbar when other fragments are showing Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* global: Use requireContext rather than getContext in fragmentsHarsh Shandilya2020-03-093-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>
* Backend: do not use singletonsJason A. Donenfeld2020-03-084-26/+33
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* GoBackend: setConfigureIntent does nothingJason A. Donenfeld2020-03-082-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>
* ToolsInstaller: do not use RJason A. Donenfeld2020-03-091-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>
* RootShell: properly use errormessagesJason A. Donenfeld2020-03-094-33/+71
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ModuleDownloaderPreference: properly use errormessagesJason A. Donenfeld2020-03-092-2/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ErrorMessages: do not use R from backendJason A. Donenfeld2020-03-096-47/+83
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ErrorMessages: do not traverse down into remote exceptionsJason A. Donenfeld2020-03-091-1/+6
| | | | | | Otherwise we miss the actual error message. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* backend: do not depend on anything except configJason A. Donenfeld2020-03-0919-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>
* MainActivity: Remove unused importsHarsh Shandilya2020-02-281-4/+0
| | | | Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* ModuleLoader: Staticize isModuleLoadedHarsh Shandilya2020-02-283-4/+5
| | | | Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* Resolve some lint and build warningsHarsh Shandilya2020-02-261-1/+1
| | | | Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* ThemeChangeAwareActivity: Remove drawable cache busterHarsh Shandilya2020-02-251-35/+0
| | | | | | Shouldn't be needed anymore. Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* MainActivity: Fix backstack bug exposed by fragment 1.2.2Harsh Shandilya2020-02-251-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>
* Resolve deprecation warningsHarsh Shandilya2020-02-252-7/+4
| | | | Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* Cleanup inset dispatch codeHarsh Shandilya2020-02-251-3/+2
| | | | Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* Ensure insets are dispatched to all fragmentsHarsh Shandilya2020-02-251-0/+19
| | | | Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* Setup EdgeToEdgeHarsh Shandilya2020-02-253-0/+10
| | | | Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* Add EdgeToEdge and coreKtx dependencyHarsh Shandilya2020-02-251-0/+67
| | | | Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* AppListDialogFragment: Revamp toggle logicHarsh Shandilya2020-02-231-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>
* AppListDialogFragment: Code cleanupHarsh Shandilya2020-02-231-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>
* AppListDialogFragment: change "Deselect All" to "Toggle All"Sébastien LEBEAU2020-02-231-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>
* SharedLibraryLoader: Fix leaked Closeable warningHarsh Shandilya2020-02-161-0/+1
| | | | Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* Record StrictMode failures to logcatHarsh Shandilya2020-02-161-0/+5
| | | | Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* Port tunnel creation UI from ViscerionHarsh Shandilya2020-02-149-918/+138
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Attribute: remove need for android TextUtilsJason A. Donenfeld2020-02-101-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>
* InetAddresses: don't have global android importJason A. Donenfeld2020-02-101-3/+2
| | | | | | This allows a proper fallback on normal JRE. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* GoBackend: restrict APIs to proper versionJason A. Donenfeld2020-01-241-3/+3
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* GoBackend: Ensure we're unmetered on API 29 as wellHarsh Shandilya2020-01-241-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>
* Rework timer in tunnel detailJason A. Donenfeld2020-01-231-15/+11
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Match lowercase asus phones for fab hackJason A. Donenfeld2020-01-231-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* GoBackend: set empty underlying networksJason A. Donenfeld2020-01-231-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>
* Introduce TunnelToggleActivityHarsh Shandilya2019-12-202-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>
* Use RequiresApi instead of TargetApiJason A. Donenfeld2019-12-202-4/+4
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* QuickTileService: require phone be unlockedJason A. Donenfeld2019-11-271-6/+8
| | | | | | Reported-by: Simon <simon@laro.se> Reported-by: Harsh Shandilya <me@msfjarvis.dev> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Implement statisticsJason A. Donenfeld2019-11-205-6/+221
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ModuleLoader: sync file before renamingJason A. Donenfeld2019-10-221-2/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ToolsInstaller: write to temporary file, fsync, renameJason A. Donenfeld2019-10-212-3/+8
| | | | | Reported-by: Andre Christanto <christantoandre@gmail.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* InetAddresses: cleanup and implement final fallbackJason A. Donenfeld2019-10-181-22/+30
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Application: put user agent in log to help debuggingJason A. Donenfeld2019-10-182-6/+16
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Suppress depreciation warningsJason A. Donenfeld2019-10-182-0/+3
| | | | | | We know what we're doing here, and it's not nice. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Google doesn't want to enable others to support free open source softwareJason A. Donenfeld2019-10-161-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>
* Download modules after verifying signify signatureJason A. Donenfeld2019-10-144-1/+307
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>