@@ -149,11 +149,11 @@ bool IsBraveVPNWireguardTunnelServiceRunning() {
149149 status.value () == SERVICE_START_PENDING ;
150150}
151151
152- bool EnableBraveVpnWireguardServiceImpl (
153- const std::string& server_public_key ,
154- const std::string& client_private_key ,
155- const std::string& mapped_ip4_address ,
156- const std::string& vpn_server_hostname ) {
152+ bool EnableBraveVpnWireguardServiceImpl (const std::string& server_public_key,
153+ const std::string& client_private_key ,
154+ const std::string& mapped_ip4_address ,
155+ const std::string& vpn_server_hostname ,
156+ const bool block_untunneled_traffic ) {
157157 base::win::AssertComInitialized ();
158158 MaybeEnableSystemProxy ();
159159
@@ -184,10 +184,10 @@ bool EnableBraveVpnWireguardServiceImpl(
184184 base::UTF8ToWide (vpn_server_hostname));
185185
186186 DWORD last_error = ERROR_SUCCESS ;
187- HRESULT res = service->EnableVpn (server_public_key_data. Get (),
188- client_private_key_data.Get (),
189- mapped_ip4_address_data.Get (),
190- vpn_server_hostname_data. Get () , &last_error);
187+ HRESULT res = service->EnableVpn (
188+ server_public_key_data. Get (), client_private_key_data.Get (),
189+ mapped_ip4_address_data. Get (), vpn_server_hostname_data .Get (),
190+ block_untunneled_traffic , &last_error);
191191
192192 if (!SUCCEEDED (res)) {
193193 VLOG (1 ) << " Failure calling EnableVpn. Result: "
@@ -203,6 +203,7 @@ void EnableBraveVpnWireguardService(const std::string& server_public_key,
203203 const std::string& client_private_key,
204204 const std::string& mapped_ip4_address,
205205 const std::string& vpn_server_hostname,
206+ const bool block_untunneled_traffic,
206207 std::optional<std::string> smart_proxy_url,
207208 wireguard::BooleanCallback callback) {
208209 // If all params are empty this is a reconnect (using last known good config).
@@ -226,7 +227,7 @@ void EnableBraveVpnWireguardService(const std::string& server_public_key,
226227 FROM_HERE ,
227228 base::BindOnce (&EnableBraveVpnWireguardServiceImpl, server_public_key,
228229 client_private_key, mapped_ip4_address,
229- vpn_server_hostname),
230+ vpn_server_hostname, block_untunneled_traffic ),
230231 std::move (callback));
231232}
232233
0 commit comments