-
Notifications
You must be signed in to change notification settings - Fork 879
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove VPN services; only install after customer purchases #20754
Conversation
871df5d
to
9d96d6e
Compare
9d96d6e
to
807afff
Compare
Verified what's in the PR so far 👍 Basically, if you take a download from any other pull request (something only Brave employees can do) and open an admin command prompt, you can install it with Then I downloaded the packaged executable for this build and installed that on top of this with Now I will focus on:
|
18874f3
to
526f3a8
Compare
ee4dcec
to
5ce01c1
Compare
fd226cf
to
ed975f1
Compare
c393148
to
f8b22f5
Compare
Matches the `*Installed` check used by VPN helper service
Method is now passed in when connection object is created in browser process.
Updates code to use that code too (removing from the service). This also removes installation that could happen on brave://settings/system This settings install use-case is obsolete now because the services will be installed once VPN is actually in use. This use-case would only happen if the person had VPN but it was set to IKEv2 and they did not have the services installed. For example, a user install (not a system install).
When system service installing is in-progress, wait till it's completed and connect again.
f69ee6c
to
ce8bb65
Compare
A Storybook has been deployed to preview UI for the latest push |
[puLL-Merge] - brave/brave-core@20754 DescriptionThis pull request modifies the behavior of the Brave VPN feature within the Brave browser. The changes primarily revolve around the installation and uninstallation of system-level services necessary for the VPN to function, especially on Windows. Additionally, the changes include modifications to MIDl (Microsoft Interface Definition Language) files related to the elevation service, which is used to perform certain privileged operations on Windows. ChangesChanges
Security Hotspots
|
A Storybook has been deployed to preview UI for the latest push |
#include "chrome/elevation_service/elevator.h" | ||
|
||
#include <windows.h> | ||
#include <winerror.h> | ||
|
||
#include <intsafe.h> | ||
|
||
#include "base/win/windows_types.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bridiver Is there are particular reason for these Windows headers to be listed as they are? I had to correct an issue in this file recently, and now clang-format
for some insists in reordering these Windows inclusions to:
#include "chrome/elevation_service/elevator.h"
#include <windows.h>
-#include <winerror.h>
#include <intsafe.h>
+#include <winerror.h>
#include "base/path_service.h"
#include "base/win/windows_types.h"
Privacy and Security reviews are complete and can be viewed here:
https://github.com/brave/reviews/issues/1447
Technical review in progress! 🎉
Comprehensive test plan is included at the bottom of this post
Removal of services happen when mini-installer executes for system level installs. The install worker is executed for new users but also runs on each upgrade.
Install of services will happen only once a person has purchased the Brave VPN product and has credentials.
Services will then be installed (DNS and WireGuard).
Fixes brave/brave-browser#33726
Submitter Checklist:
QA/Yes
orQA/No
;release-notes/include
orrelease-notes/exclude
;OS/...
) to the associated issuenpm run test -- brave_browser_tests
,npm run test -- brave_unit_tests
wikinpm run lint
,npm run presubmit
wiki,npm run gn_check
,npm run tslint
git rebase master
(if needed)Reviewer Checklist:
gn
After-merge Checklist:
changes has landed on
Test Plan:
Clean install test plan
Some steps are given using DEVELOPMENT (ex: CI) builds. Official builds will be similar but will look like Release channel builds (orange lion instead of gray lion; naming doesn't have channel name in it, etc).
Installing an official build (ex: using stub installer)
If using a final binary (ex: QA testing), install the release candidate as a user that has admin access. Make sure a UAC prompt is shown when launching the installer.
Installing a CI / Developer build (ex: a build from this pull request)
brave_installer.exe
. Employees can join#browser-artifacts-bot
in Slack and search for20754
(the pull request number) and get the latest Win64 binary.NOTE: It must be a signed binary - otherwise the WireGuard functionality won't work. It will look like it's connecting and then immediately disconnect. If that happens to you, you can view logs at
C:\Windows\Temp\BraveVpn\tunnel\log.bin
. Rename as TXT and if you're not using a signed binary, you will see something like:cmd.exe
). Does NOT need to be an admin console.NOTE: This is required because of the binary built by CI. The real install (using a stub installer) will follow a different set of steps. Test plan will be updated for QA when this is approved/merged.
brave_installer.exe --system-level
(or whatever the filename is)cmd.exe
instance, the OS will present a UAC prompt (escalating to admin). If you are using an admin command prompt the install will take placeRest of steps for
Clean install test plan
Verifying behavior of what is expected for a new install with this fix.
appwiz.cpl
)Installed On
services.msc
and search for the elevation service.Brave Development
.Brave Development Elevation Service (BraveDevelopmentElevationService)
)Refresh Brave VPN
or buy VPN - something to get VPN into "purchased" stateservices.msc
and verify there are two new servicesBrave Development Vpn Service (BraveDevelopmentVpnService)
Brave Development Vpn Wireguard Service (BraveDevelopmentVpnWireguardService)
Brave Nightly Vpn Service (BraveNightlyVpnService)
Brave Beta Vpn Service (BraveBetaVpnService)
Brave Vpn Service (BraveVpnService)
services.msc
Use WireGuard protocol in Brave VPN
. This will require a restart of Brave.Upgrade scenario - removal of VPN service
Testing scenario for an existing Brave user. It should remove the VPN services.
Because of the way the code is written, the services will be removed for EVERYBODY. Even if they had purchased Brave VPN.
services.msc
and search for the VPN services.Brave Nightly Vpn Service (BraveNightlyVpnService)
Brave Nightly Vpn Wireguard Service (BraveNightlyVpnWireguardService)
Brave Nightly Elevation Service (BraveNightlyElevationService)
will be there too.Start
Windows could not start the Brave Nightly Elevation Service (BraveNightlyElevationService) service on Local Computer.
services.msc
using either F5 or right click => refreshUpgrade scenario - User had Brave VPN before upgrade
Upgrade scenario - removal of VPN service
services.msc
and search for the VPN services.Brave Nightly Vpn Service (BraveNightlyVpnService)
Brave Nightly Vpn Wireguard Service (BraveNightlyVpnWireguardService)
Upgrade scenario - User buys Brave VPN after upgrade
Upgrade scenario - removal of VPN service
Refresh Brave VPN
or buy VPN - something to get VPN into "purchased" stateservices.msc
and search for the VPN services.Brave Nightly Vpn Service (BraveNightlyVpnService)
Brave Nightly Vpn Wireguard Service (BraveNightlyVpnWireguardService)