Setup
Installation of the service, basic methods and examples of their use.
Last updated
Was this helpful?
Installation of the service, basic methods and examples of their use.
Last updated
Was this helpful?
Sign in at .
Create a project and use a name for your project as a Public key. Private key is optional.
Use SDK where carrierId
equals given Public Key and backend url equals default SDK url or url provided by Pango team.
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 us. Please contact your sales representative to initiate account creation as part of the project and client onboarding process or . We apologize for any inconvenience.
Run the commands below from the directory where SDK service executable is located.
where:
-i "ServiceName"
- command to register UnifiedSDK service in the system with the name ServiceName
.
During this call:
Service executable file will be registered as windows service with specified name (ServiceName
).
Service will create the configuration file into the default folder "C:\ProgramData\UnifiedSDK.Service"
.
Service will use default fixed names for the command and event pipes - UnifiedSDKVPNCommandPipe/UnifiedSDKVPNEventPipe
.
If several service instances are installed this way on one device, it can cause collisions and incorrect interaction between the client (UnifiedSDK Core
) and the host (UnifiedSDK service
).
This installation option is suitable for testing, but use in Production, please use the installation options below.
where:
-d "c:\ProgramData\MyApp"
- configure path to the data folder.
-c "CommandPipeName"
- command pipe name.
-e "EventPipeName"
- event pipe name.
We recommend to specify -d
option to avoid possible conflicts with other applications using the same data folders.
Also we recommend to specify -c
and -e
options to avoid possible conflicts with other applications using the same pipe names.
During this call:
Service executable file will be registered as windows service with specified name (ServiceName
).
Service will create the configuration file into the specified -d
folder "c:\ProgramData\MyApp"
.
Service will use specific names for the command and event pipes - CommandPipeName/EventPipeName
.
where:
-dpn "HKEY_LOCAL_MACHINE\SOFTWARE\MyApp"
- enable dynamic pipe names mode and place the generated names to the specified registry key path.
During this call:
Service executable file will be registered as windows service with specified name (ServiceName
).
Service will create the configuration file into the specified -d
folder "c:\ProgramData\MyApp"
.
Service will create dynamic names for the command and event pipes itself and save them in the Windows registry at the specified path.
In this case you must provide same registry path to SDK instance.
Additional information about command line arguments can be found there:
Add UnifiedSDK.Core.dll
/ UnifiedSDK.Core.net48.dll
to your project.
C#
C++
In this case SDK will use default fixed names for the command and event pipes - UnifiedSDKVPNCommandPipe/UnifiedSDKVPNEventPipe
.
CreateWithFixedNaming
PipeOptionsC#
C++
In this case SDK will use specific names for the command and event pipes - CommandPipeName/EventPipeName
.
CreateWithDynamicNaming
PipeOptionsC#
C++
In this case SDK will use the command and event pipe names that were created during the service installation with the -dpn
command line argument.
C#
C++
An example response looks as follows:
More details about backend addresses configuration can be found there:
To find detailed information about generating a unique Device Identifier, please refer to this page.
The DeviceId used for Backend requests has a default format of <carrier_id>_<device_id>
, which is then encoded to base64. The CarrierId and DeviceId are provided as parameters in the InitializeRequest.
However, the InitializeRequest includes two additional settings that allow you to control the generation of the DeviceId:
PreventDeviceIdEncode
- This setting indicates whether the DeviceId should be encoded to base64. If set to true, the DeviceId will be used as-is without base64 encoding.
PrependDeviceIdWithCarrierId
- This setting indicates whether the DeviceId should be prepended with the CarrierId. If set to true, the CarrierId will be added to the beginning of the DeviceId.
Pango Partner VPN Backend supports OAuth authentication with a partner's OAuth server as the primary authentication method.
Deploy and configure the OAuth service. Ensure that the service is publicly available on the Internet.
Configure the Partner Backend to use the OAuth service.
Implement client OAuth for your application.
Retrieve the access token in the client app. This token will be used to initialize and sign in.
AuthenticationMethod.Anonymous;
AuthenticationMethod.OAuth
AuthenticationMethod.Firebase
Custom Authentication
An example response looks as follows:
Custom Authentication allows you to integrate your existing authentication system with our cloud platform. Instead of using a predefined authentication method such as google
, facebook
, or oauth
, you can pass a custom string identifier to indicate your preferred authentication mechanism.
To implement Custom Authentication:
Replace the authentication method enum value with a string that uniquely identifies your authentication system, such as your company name or a specific identifier.
Obtain a token (TOKEN
) from your authentication system.
Pass this custom string and the token received from your authentication system as parameters to the LoginAsync
method.
Example login implementation using Custom Authentication:
Follow these steps to update the Unified SDK:
(Optional) Stop the current SDK service.
Download the latest version of the Unified SDK.
Reinstall the SDK service by running the following command:
(Optional) Start the Unified SDK service.
To uninstall the SDK, run the following command:
App is responsible to install and remove the NetFilter driver on app install/uninstall.
SDK is responsible to start and stop NetFilter driver on SDK service Init and service stop.
Initialize the SDK by sending an initialization request to the UnifiedSdkService with the required parameters:
- Backend URI: The URL of the backend API.
- AppVersion: The version of your application.
- CarrierId: The unique public key.
- DeviceId: The device ID.
- DeviceName: The device name.
- [Optional] : Optional reserve backend server URIs. By default: null.
- [Optional] EventMessageFormat: The format of the event messages from UnifiedSdkService (XML or JSON). By default: MessageFormat.JSON
.
- [Optional] Required events from UnifiedSdk service that will be sent by the event pipe. By default: ServiceEvents.Default (StateChanged | ErrorOccurred | TrafficChanged | ProcessExited)
.
- [Optional] PrependDeviceIdWithCarrierId: A value indicating whether to prepend device ID with carrier ID.
- [Optional] PreventDeviceIdEncode: A value indicating whether to prevent device ID encode