The VPN SDK provides several powerful features that allow users to customize and optimize their VPN experience. These capabilities include:
Feature
Description
VpnProfiles
Create separate VPN profiles for various purposes (e.g., work, streaming, general browsing), allowing quick switching between appropriate servers without manual reconfiguration.
CustomDNS
Set up custom DNS profiles to direct all DNS requests to the desired server instead of the default ones.
UserDNS
Enables setting up user-defined DNS servers for handling DNS requests.
MultiHop
Routes the VPN connection through an intermediate server before reaching the main VPN server for enhanced privacy and security.
VpnProfiles
VpnProfiles allow creating separate profiles for various purposes (e.g. work, streaming, general browsing), enabling quick switching between appropriate servers without manual reconfiguration each time.
VpnProfiles can be received from the GetLocations response. To apply a VPN Profile:
Call GetCredentials with profile option
Call StartVpn with received credentials
varsdk=newSDK();varloginRequest=newLoginRequest{Method="Pango",Token="YOUR_PANGO_ACCESS_TOKEN",};varloginResponse=awaitsdk.LoginAsync(loginRequest).ConfigureAwait(false);vargetLocationsRequest=newGetLocationsRequest{AccessToken=loginResponse.AccessToken,Protocol=Core.Model.Enums.Protocol.HydraTcp,};vargetLocationsResponse=awaitsdk.GetLocationsAsync(getLocationsRequest).ConfigureAwait(false);varselectedLocation=getLocationsResponse.VpnCustomLocations.FirstOrDefault();varprofile=getLocationsResponse.Profiles.FirstOrDefault();vargetCredentialsRequest=newGetCredentialsRequest{AccessToken=loginResponse.AccessToken,VpnNode=selectedLocation,WithCertificate=true,Protocol=Core.Model.Enums.Protocol.HydraTcp,Profile=profile.Name,// Use profile name here};vargetCredentialsResponse=awaitsdk.GetCredentialsAsync(getCredentialsRequest).ConfigureAwait(false);varstartVpnRequest=newStartVpnRequest(){AccessToken=loginResponse.AccessToken,Credentials=getCredentialsResponse.Credentials,EnableKillSwitch=false,};varstartVpnResponse=awaitsdk.StartVpnAsync(startVpnRequest).ConfigureAwait(false);
CustomDNS
CustomDNS allows setting up custom DNS profiles to direct all DNS requests to the desired server instead of the default ones.
CustomDNS settings can be received from the GetLocations response. To apply custom DNS:
Call GetCredentials with custom DNS option
Call StartVpn with received credentials
UserDNS
UserDNS allows setting up user-defined DNS servers to direct all DNS requests to the desired server instead of the default ones.
To apply UserDNS:
Call GetCredentials with user DNS option
Call StartVpn with received credentials
MultiHop
MultiHop routes the VPN connection through an intermediate server before reaching the main VPN server for enhanced privacy and security.
Note:
MultiHop routing is only available for the Hydra protocol.