Process Bypass
Process bypass is a powerful capability that allows you to programmatically update the list of processes that can be excluded from the VPN tunnel. This feature enables certain applications to send their traffic outside the encrypted connection. It's particularly useful when you need to dynamically manage VPN exceptions based on specific application requirements or user scenarios.
Additional info about common mistakes can be found on the page Common issues.
Updating Process Bypass
To update the process domain list programmatically, you can utilize the following:
var sdk = new SDK();
var request = new FirewallRequest
{
UpdateBypassProcesses = new UpdateBypassProcessesRequest
{
Processes = new List<string>
{
"C:\\Program Files\\YourCompany\\YourCompanyApp.exe", // <-- Custom company application
"C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe", // <-- Built-in Microsoft Edge browser
},
},
};
var result = await sdk.ConfigureFirewallAsync(request).ConfigureAwait(false);
Console.WriteLine(result.UpdateBypassProcesses);
// Message: "Ok"
// Result: Ok
C:\\Program Files\\YourCompany\\YourCompanyApp.exe
: This could represent a custom application developed by your company. By adding this process to the bypass list, the application enables to send the traffic outside the encrypted connection.
C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe
: This is the path to the built-in Microsoft Edge browser executable. Including Microsoft Edge in the bypass list enables to send the traffic outside the encrypted connection.
Process Bypass requires the full path to the process file.
Explicitly Updating Process Bypass
var sdk = new SDK();
var request = new BypassProcessesRequest()
{
UpdateBypassProcesses = new()
{
Processes = new List<string>
{
"C:\\Program Files\\YourCompany\\YourCompanyApp.exe", // <-- Custom company application
"C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe", // <-- Built-in Microsoft Edge browser
},
},
};
var result = await sdk.ConfigureBypassProcessesAsync(request).ConfigureAwait(false);
Console.WriteLine(result.UpdateBypassProcesses);
// Message: "Ok"
// Result: Ok
Last updated
Was this helpful?