Pango Platform
HomeConsole
  • What is Pango Developer Platform
  • Getting started
    • Sign up on the Management Console
    • Create a new project
    • Switch projects
    • Change console settings
    • Edit your profile
    • Try out the demo app
    • Keep exploring
    • Deprecation and Sunset
  • Console details
    • Dashboard
      • General
      • Location loading
    • Users
      • User page
    • Active sessions
    • Network
      • Countries
      • Locations
      • Pools
        • Optimal location
        • Location rules
    • Settings
      • General
        • Project config description (JSON format)
          • Server selector (JSON format)
          • Request selector (JSON format)
      • Authentication methods
        • Auth Plugin requirements
      • VPN
        • General
        • VPN Bypass list
        • Client Networks
      • Member
    • Export Data
    • Log
  • SDK
    • Unified VPN SDK
      • Features
        • Personal Bridge
      • Tunnel Vision and Tunnel Crack Prevention
      • Unified VPN SDK Feature Comparison By Platform
    • Unified VPN SDK for Android
      • Setup
        • Application Setup
        • Proguard Rules, Notification, and Analytics Configurations
        • Backend URL Configuration
      • Usage
        • Initialization
        • VPN Interface
        • Backend interface
      • Features
        • Hydra Protocol
          • Location profile (Hydra only)
        • Custom sdk dependencies
        • Deferred VPN Service Initialization
        • Authentication
        • Client Network List (CNL)
        • OpenVPN transport
        • Wireguard Transport
        • Reconnection strategy
        • Single Protocol SDK
        • Killswitch
        • Domain route via VPN
        • Process route via VPN
        • Process Bypass
        • Domain Bypass
        • Traffic rules
        • VPN Node DNS Configuration
        • Multihop
          • Optimal Location
      • Exceptions
      • Version migration
      • Changelog
    • Unified VPN SDK for Apple
      • Setup
        • Application Setup
        • Network Extension Setup
          • Network Extension Setup for tvOS
        • Backend URL Configuration
      • Usage
        • Single Protocol SDK
        • Unified SDK
        • Logging
        • Decoding Encoded VPN SDK Logs
        • Analytics Configuration
      • Features
        • Deferred VPN Service Initialization
        • Authentication
        • Wireguard Transport
        • Reconnection strategy
        • Killswitch
        • Domain Bypass
        • Multihop
          • Optimal Location
        • Client Network List (CNL)
        • Domain route via VPN
      • Changelog
      • API Reference
    • IPSEC VPN SDK for Apple
    • Unified VPN SDK for Windows
      • Setup
        • Backend URL Configuration
        • Service command line arguments
        • ARM Platform Support
      • Usage
        • CoreAPI
        • Events
        • Generating a Unique Device Identifier
        • Error processing
        • Pipe Messaging
      • Features
        • Traffic protection
          • Killswitch
          • Prevent IP Leaks
          • Block Local Networks
        • Other
          • Firewall
            • DNS Monitor
            • Process Bypass
            • Domain Bypass
            • Process route via VPN
            • Domain route via VPN
          • Throttling
          • Optimal Location
          • Common issues
        • Hydra Protocol
          • CustomDNS, UserDNS, MultiHop, VpnProfiles
        • OpenVPN Protocol
        • Wireguard Protocol
        • IPSec Protocol
      • Collecting Debug Logs
      • Changelog
    • Unified VPN SDK for Routers
      • SDK. Shared library.
      • Configuration Interface (CI)
        • Unix Domain Sockets CI
        • REST API CI
  • REST API
    • Partner API
  • Sample applications
    • Unified VPN SDK demo for Windows
    • Hydra VPN SDK demo for iOS
    • IPSEC VPN SDK demo for iOS
    • Unified VPN SDK demo for Android
    • Hydra VPN SDK demo for OpenWRT
    • OpenVPN configuration file
  • Resources
    • Use cases
      • Public VPN
      • Business VPN
        • Creating a Business VPN Project
        • Wi-Fi Security for Business
      • Application anti-blocking
    • How-to
      • Create a Firebase project for User Authentication
      • AWS CloudFront Distribution of the Platform URL
      • How can I get Shared Secret key from iTunes Connect for In-App Purchase
  • FAQ
    • General
      • VPN Platform Flow
      • What data is collected by the Platform?
      • What analytic data is collected by your SDK?
      • How the Platform restricts access to our data?
      • Why DNS Leak tests often indicate positive result?
      • Do we need to perform endpoint health checks?
      • How is the VPN exit node found?
      • How are streams re-marked if VPN is enabled/disabled on an active flow?
      • Is there a maximum number of supported devices?
      • Are both IPv4 and IPv6 supported?
      • What is the MTU of the tunnel?
      • Are any redundancy measures in terms of reliability provided?
      • Is there any load balancing?
      • Do you block broadcast and multicast to/from the VPN?
    • List of Open Source libs
Powered by GitBook
On this page
  • VpnProfiles
  • CustomDNS
  • UserDNS
  • MultiHop

Was this helpful?

  1. SDK
  2. Unified VPN SDK for Windows
  3. Features
  4. Hydra Protocol

CustomDNS, UserDNS, MultiHop, VpnProfiles

Use GetLocations for MultiHop, custom DNS and VPN profiles functionalities instead of GetNodes

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.

Can be received from GetLocations response.

VpnProfiles can be received from the GetLocations response. To apply a VPN Profile:

  1. Call GetCredentials(GetCredentialsRequest request)

  2. Launch StartVPN

var sdk = new SDK();
var loginRequest = new LoginRequest
{
    Method = AuthenticationMethod.Anonymous.ToString(),
    Token = null,
};

var loginResponse = await sdk.LoginAsync(loginRequest).ConfigureAwait(false);

var getLocationsRequest = new GetLocationsRequest
{
    AccessToken = loginResponse.AccessToken,
    Protocol = Core.Model.Enums.Protocol.HydraTcp,
};

var getLocationsResponse = await sdk.GetLocationsAsync(getLocationsRequest).ConfigureAwait(false);
var selectedLocation = getLocationsResponse.VpnCustomLocations.FirstOrDefault();

var profile = getLocationsResponse.Profiles.FirstOrDefault();

var getCredentialsRequest = new GetCredentialsRequest
{
    AccessToken = loginResponse.AccessToken,
    VpnNode = selectedLocation,
    WithCertificate = true,
    Protocol = Core.Model.Enums.Protocol.HydraTcp,
    Profile = profile.Name, // Use profile name here
};

var getCredentialsResponse = await sdk.GetCredentialsAsync(getCredentialsRequest).ConfigureAwait(false);

var startVpnRequest = new StartVpnRequest()
{
    AccessToken = loginResponse.AccessToken,
    Credentials = getCredentialsResponse.Credentials,
    EnableKillSwitch = false,
    VpnNode = selectedLocation,
};

var startVpnResponse = await sdk.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.

Can be received from GetLocations response.

CustomDNS settings can be received from the GetLocations response. To apply custom DNS:

  1. Call GetCredentials(GetCredentialsRequest request)

  2. Launch StartVPN

var sdk = new SDK();
var loginRequest = new LoginRequest
{
    Method = AuthenticationMethod.Anonymous.ToString(),
    Token = null,
};

var loginResponse = await sdk.LoginAsync(loginRequest).ConfigureAwait(false);

var getLocationsRequest = new GetLocationsRequest
{
    AccessToken = loginResponse.AccessToken,
    Protocol = Core.Model.Enums.Protocol.HydraTcp,
};

var getLocationsResponse = await sdk.GetLocationsAsync(getLocationsRequest).ConfigureAwait(false);
var selectedLocation = getLocationsResponse.VpnCustomLocations.FirstOrDefault();

var customDnsServer = getLocationsResponse.DnsServers.FirstOrDefault();

var getCredentialsRequest = new GetCredentialsRequest
{
    AccessToken = loginResponse.AccessToken,
    VpnNode = selectedLocation,
    WithCertificate = true,
    Protocol = Core.Model.Enums.Protocol.HydraTcp,
    CustomDns = customDnsServer, // Use custom DNS server here
};

var getCredentialsResponse = await sdk.GetCredentialsAsync(getCredentialsRequest).ConfigureAwait(false);

var startVpnRequest = new StartVpnRequest()
{
    AccessToken = loginResponse.AccessToken,
    Credentials = getCredentialsResponse.Credentials,
    EnableKillSwitch = false,
    VpnNode = selectedLocation,
};

var startVpnResponse = await sdk.StartVpnAsync(startVpnRequest).ConfigureAwait(false);

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:

  1. Call GetCredentials(GetCredentialsRequest request)

  2. Launch StartVPN

var userDns = "example";
var sdk = new SDK();
var loginRequest = new LoginRequest
{
    Method = AuthenticationMethod.Anonymous.ToString(),
    Token = null,
};

var loginResponse = await sdk.LoginAsync(loginRequest).ConfigureAwait(false);

var getLocationsRequest = new GetLocationsRequest
{
    AccessToken = loginResponse.AccessToken,
    Protocol = Core.Model.Enums.Protocol.HydraTcp,
};

var getLocationsResponse = await sdk.GetLocationsAsync(getLocationsRequest).ConfigureAwait(false);
var selectedLocation = getLocationsResponse.VpnCustomLocations.FirstOrDefault();

var customDnsServer = getLocationsResponse.DnsServers.FirstOrDefault();

var getCredentialsRequest = new GetCredentialsRequest
{
    AccessToken = loginResponse.AccessToken,
    VpnNode = selectedLocation,
    WithCertificate = true,
    Protocol = Core.Model.Enums.Protocol.HydraTcp,
    UserDns = string.IsNullOrEmpty(userDns) ? customDnsServer.Name : userDns, // Use user DNS server here
};

var getCredentialsResponse = await sdk.GetCredentialsAsync(getCredentialsRequest).ConfigureAwait(false);

var startVpnRequest = new StartVpnRequest()
{
    AccessToken = loginResponse.AccessToken,
    Credentials = getCredentialsResponse.Credentials,
    EnableKillSwitch = false,
    VpnNode = selectedLocation,
};

var startVpnResponse = await sdk.StartVpnAsync(startVpnRequest).ConfigureAwait(false);

MultiHop

MultiHop routes the VPN connection through an intermediate server before reaching the main VPN server for enhanced privacy and security.

Settuped hop location can be used with the ProxyLocation property to specify some location or UseProxyOptimal to use the optimal hop location.

The hop location can be specified using:

  • ProxyLocation property to specify a location

  • UseProxyOptimal to use the optimal hop location

Example of launching Hydra with Optimal MultiHop location:

var sdk = new SDK();
var loginRequest = new LoginRequest
{
    Method = AuthenticationMethod.Anonymous.ToString(),
    Token = null,
};

var loginResponse = await sdk.LoginAsync(loginRequest).ConfigureAwait(false);

var getLocationsRequest = new GetLocationsRequest
{
    AccessToken = loginResponse.AccessToken,
    Protocol = Core.Model.Enums.Protocol.HydraTcp,
};

var getLocationsResponse = await sdk.GetLocationsAsync(getLocationsRequest).ConfigureAwait(false);
var selectedLocation = getLocationsResponse.VpnCustomLocations.FirstOrDefault();

selectedLocation.ProxyOptimal = true;

var getCredentialsRequest = new GetCredentialsRequest
{
    AccessToken = loginResponse.AccessToken,
    VpnNode = selectedLocation,
    WithCertificate = true,
    Protocol = Core.Model.Enums.Protocol.HydraTcp,
};

var getCredentialsResponse = await sdk.GetCredentialsAsync(getCredentialsRequest).ConfigureAwait(false);

var startVpnRequest = new StartVpnRequest()
{
    AccessToken = loginResponse.AccessToken,
    Credentials = getCredentialsResponse.Credentials,
    EnableKillSwitch = false,
    VpnNode = selectedLocation,
};

var startVpnResponse = await sdk.StartVpnAsync(startVpnRequest).ConfigureAwait(false);

Example of launching Hydra with Custom MultiHop location:

var getLocationsResponse = await sdk.GetLocationsAsync(getLocationsRequest).ConfigureAwait(false);
var selectedLocation = getLocationsResponse.VpnCustomLocations.FirstOrDefault();

selectedLocation.ProxyLocation = getLocationsResponse.VpnCustomLocations
            .FirstOrDefault(x => x.Location != selectedLocation.Location).Location;

var getCredentialsRequest = new GetCredentialsRequest
{
    AccessToken = loginResponse.AccessToken,
    VpnNode = selectedLocation,
    WithCertificate = true,
    Protocol = Core.Model.Enums.Protocol.HydraTcp,
};

var getCredentialsResponse = await sdk.GetCredentialsAsync(getCredentialsRequest).ConfigureAwait(false);

var startVpnRequest = new StartVpnRequest()
{
    AccessToken = loginResponse.AccessToken,
    Credentials = getCredentialsResponse.Credentials,
    EnableKillSwitch = false,
    VpnNode = selectedLocation,
};

var startVpnResponse = await sdk.StartVpnAsync(startVpnRequest).ConfigureAwait(false);
PreviousHydra ProtocolNextOpenVPN Protocol

Last updated 1 month ago

Was this helpful?