Unified VPN SDK demo for Windows

This is a demo application for Windows with basic usage of Unified VPN SDK.

Prerequisites

The following prerequisites are required to use the SDK:

Setup

  1. Clone app source code locally from this GitHub.

  2. Right-click on the Command Prompt, select "Run as administrator" from the context menu, then navigate to the unified-sdk-windows-demo directory.

  3. Run the following command: powershell.exe -ExecutionPolicy Bypass -File "bootstrap_service.ps1" The script installs NetFilter SDK driver (only for x86, x64) and Unified SDK service on your device.

Unified SDK service is running after install

If you encounter any issues while running the bootstrap_service.ps1 script, please refer to the troubleshooting section below for instructions on how to install the service manually.

  1. Launch Visual Studio, navigate to the folder containing the recently downloaded project from GitHub and open the solution file "..\unified-sdk-windows-demo\src\UnifiedSDK.Demo.sln".

  2. Once the solution is open, you need to restore NuGet Packages.

    Restore NuGet Packages
  3. Build the "UnifiedSDK.Demo" project.

Build the project
  1. Navigate to ..\unified-sdk-windows-demo\output\Debug(Release)\UnifiedSDK.Demo\net8.0-windows\, then double-click UnifiedSDK.Demo.exe to launch the demo application.

Usage

  1. Sign in at pango-cloud.com.

Note that at this time, it is not possible for users to create their own accounts directly if they do not already have an account established with example.com. Please contact your sales representative to initiate account creation as part of the project and client onboarding process or contact us. We apologize for any inconvenience.

  1. In Pango dashboard, create a project and use a name for your project as a Public key. Private key is optional.

Create project page
  1. Navigate to the Network tab from the navigation bar. Then, click on the Add location button.

Network page
  1. In Pango dashboard, navigate to the dashboard and locate your carrier_id.

  2. You can find the backend URL for Prod/Stage/Dev here.

  3. You are almost ready to connect to the VPN. To initiate the VPN connection process in the demo app:

    1. Enter the carrier ID and backend address in the appropriate fields.

      Carrier ID and backend address fields
    2. Click the "Initialize SDK service" button. No visible change will occur (except the log message in the log window), which is expected behavior.

    3. Click the "Login" button. The app should now display a "Logged in" message, indicating successful authentication.

      • [Optional] Choose VPN protocol and/or Virtual Location.

    4. Click the "Connect" button. The app will establish the VPN connection, and display a "Connected" message upon success.

  4. Your device is now connected to the VPN. To verify the connection:

    • Open any browser on your device.

    • Navigate to whatsmyip.com (or any other site which can identify your IP).

    • Observe that the IP address displayed is different from your device's actual IP address, confirming that traffic is being routed through the VPN.

  5. To terminate the VPN connection when finished, click the "Disconnect" button in the demo app. This will sever the connection and restore direct network access.

Features usage

Multihop / Custom VPN profiles / Custom DNS

  1. Initialize SDK service.

  2. Select "Use multihop proxy" if needed.

    • Select "Use optimal proxy location" or write your own location description.

  3. Select "Get custom VPN profiles" if needed.

    • After Login select profile from "Custom profiles" combo box.

  4. Select "Use custom DNS" if needed.

    • After Login select profile from "DNS server" combo box.

  5. Fill the "User DNS server address" if you want to define the HTTP URL of DNS-over-HTTPS which should be used for a VPN session. Should be a valid URL.

  6. Click the "Login" button.

  7. Select VPN protocol.

  8. Select virtual location.

  9. Click the "Connect" button.

Block local networks / Prevent IP leak / Enable Killswitch

  1. Initialize SDK service and Login.

  2. Select "Block local networks" if needed. Disabled by default.

    • It blocks all local network connections during the VPN session except for multicast networks

  3. Unselect "Prevent IP leak" if needed. Enabled by default.

    • It blocks IPv6 and DNS requests outside the VPN tunnel.

  4. Select "Enable Killswitch" if needed. Disabled by default.

    • It prevents traffic leakage during an expected VPN tunnel shutdown.

  5. Click the "Connect" button.

Keep Killswitch enabled

  1. Connect to VPN with Killswitch enabled.

  2. Select "Keep killswitch enabled". Disabled by default.

    • It blocks all network connections when or even if VPN was turned off normally/manually.

    • It still allows to Unified SDK to connect to another location.

  3. Click the "Disconnect" button.

  4. To disable this feature, unselect "Keep killswitch enabled" and call disconnect one more time.

VPN bypass domains/applications (only x86 and x64 architecture )

  1. Fill the domains/applications (full path required).

  2. Click the "Apply" button.

  3. Connect to VPN.

Throttling configuration (only x86 and x64 architecture)

  1. Select "Enable throttling".

  2. Set global speed limits in Bit/second.

  3. Set local speed limits in Bit/second.

    • Add the process you want to throttling by clicking the "Add process" button and filling the process name.

    • Click the "Add speed limit" button if you want to add another one local speed limit.

  4. Click the "Send configuration button".

  5. Click the "Connect" button.

Route via VPN (only x86 and x64 architecture)

  1. Click on the "Initialize SDK service" button.

  2. Click on the "Loggin" button.

  3. Uncheck "Prevent IP leaks" checkbox.

  4. Check "Enable RouteViaVPN" checkbox.

  5. Fill "Route via VPN applications" text box with full path to .exe file.

  6. Fill "Route via VPN domains" text box.

  7. Click "Apply" button.

  8. Click "Connect" button.

Troubleshooting

Running the bootstrap_service.ps1 script

The script helps to configure NetFilter SDK driver and Unified SDK service. If you encounter issues running the bootstrap_service.ps1 script successfully, follow these steps to execute the commands in the script manually:

1. Open Command Prompt:

  • Right-click on the Command Prompt icon.

  • Select "Run as administrator" to open it with elevated privileges.

2. Navigate to the unified SDK folder:

  • Use the cd command followed by the full path to the unified-sdk-windows-demo directory.

  • For example: cd C:\Path\To\unified-sdk-windows-demo\.

3. Check if netfilter2 is installed (only for x86, x64):

  • Run the command: sc.exe query partner_netfilter2.

  • If the output says, "The specified service does not exist as an installed service," proceed to the next step.

4. Create a new netfilter2 service:

  • Run the command: sc.exe create partner_netfilter2 binPath="C:\Path\To\unified-sdk-windows-demo\service\netfilter\partner_netfilter2.sys" type= kernel start= auto.

  • Replace C:\Path\To\unified-sdk-windows-demo\ with the actual path to your unified-sdk-windows-demo directory.

  • The output should indicate: [SC] CreateService SUCCESS.

5. Verify the netfilter2 service:

  • Run the command: sc.exe query partner_netfilter2 again.

  • The output should display the service details, including:

SERVICE_NAME: partner_netfilter2
TYPE: 1 KERNEL_DRIVER
WIN32_EXIT_CODE: 1 STOPPED
...

6. Install the Unified SDK service:

  • Run the command: "C:\Path\To\unified-sdk-windows-demo\service\UnifiedSDK.Service.exe" -install UnifiedSDKService.

  • Replace "C:\Path\To\unified-sdk-windows-demo\" with the actual path to your unified-sdk-windows-demodirectory.

By following these steps, you should be able to manually execute the commands from the bootstrap_service.ps1 script and resolve any issues you were facing.

Error: Application Requires .NET 8.0.0

When attempting to run the application, you encounter the following message: "You must install or update .NET to run this application".

  1. Visit the official Microsoft .NET download page and download NET 8.0 Desktop Runtime (v8.0.X) for installed operating system

  2. Download and run the installer, following the on-screen instructions.

  3. Try running the demo application again. It should now launch successfully.

Documentation

For more detailed information, please refer to SDK documentation.

Last updated

Was this helpful?