Class AndroidMvpnClientHandler

Last published : Oct 31, 2026
The HttpClient class provides a base class for sending or receiving the HTTP requests or responses from a URL. It is a supported asynchronous feature of the .NET framework. Xamarin provides the AndroidClientHandler class, which is derived from the HttpClientHandler class. AndroidMvpnClientHandler.cs is a custom HttpClientHandler class. The custom HttpClientHandler class enables tunneling for incoming requests that are using HttpClient for sending HTTP/S requests. Sample code for tunneling HttpClient requests is as follows:
HttpClient httpClient = new HttpClient(new AndroidMvpnClientHandler());
Inheritance
   -> System.Object
       -> AndroidMvpnClientHandler
Namespace: Com.Citrix.Mvpn.Api
Assembly: MvpnSdkLibrary.dll
Syntax:
public class AndroidMvpnClientHandler : AndroidClientHandler

Constructors

AndroidMvpnClientHandler()
Declaration:
public AndroidMvpnClientHandler()

Methods

ConfigureCustomSSLSocketFactory(HttpsURLConnection)
Declaration:
protected override SSLSocketFactory ConfigureCustomSSLSocketFactory(HttpsURLConnection connection)
Parameters:
Type Name Description
Javax.Net.Ssl.HttpsURLConnection connection HTTPS connection to return socket factory.
Returns:
Type Description
Javax.Net.Ssl.SSLSocketFactory Instance of SSLSocketFactory ready to use with the HTTPS connection.
GetJavaProxy(Uri, CancellationToken)
Declaration:
protected override Task<Proxy> GetJavaProxy(Uri destination, CancellationToken cancellationToken)
Parameters:
Type Name Description
System.Uri destination System URI object.
System.Threading.CancellationToken cancellationToken Cancellation token.
Returns:
Type Description
System.Threading.Tasks.Task<Java.Net.Proxy> Instance of Task<Java.Net.Proxy></Java.Net.Proxy>
GetSSLHostnameVerifier(HttpsURLConnection)
Declaration:
protected override IHostnameVerifier GetSSLHostnameVerifier(HttpsURLConnection connection)
Parameters:
Type Name Description
Javax.Net.Ssl.HttpsURLConnection connection HTTPS connection object.
Returns:
Type Description
Javax.Net.Ssl.IHostnameVerifier Instance of IHostnameVerifier to be used for this HTTPS connection.