VpnService.Builder.AddDnsServer Method

Definition

Overloads

AddDnsServer(InetAddress)

Add a DNS server to the VPN connection.

AddDnsServer(String)

Convenience method to add a DNS server to the VPN connection using a numeric address string.

AddDnsServer(InetAddress)

Add a DNS server to the VPN connection.

[Android.Runtime.Register("addDnsServer", "(Ljava/net/InetAddress;)Landroid/net/VpnService$Builder;", "GetAddDnsServer_Ljava_net_InetAddress_Handler")]
public virtual Android.Net.VpnService.Builder AddDnsServer (Java.Net.InetAddress address);
[<Android.Runtime.Register("addDnsServer", "(Ljava/net/InetAddress;)Landroid/net/VpnService$Builder;", "GetAddDnsServer_Ljava_net_InetAddress_Handler")>]
abstract member AddDnsServer : Java.Net.InetAddress -> Android.Net.VpnService.Builder
override this.AddDnsServer : Java.Net.InetAddress -> Android.Net.VpnService.Builder

Parameters

address
InetAddress

Returns

Attributes

Exceptions

if the address is invalid.

Remarks

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

AddDnsServer(String)

Convenience method to add a DNS server to the VPN connection using a numeric address string.

[Android.Runtime.Register("addDnsServer", "(Ljava/lang/String;)Landroid/net/VpnService$Builder;", "GetAddDnsServer_Ljava_lang_String_Handler")]
public virtual Android.Net.VpnService.Builder AddDnsServer (string address);
[<Android.Runtime.Register("addDnsServer", "(Ljava/lang/String;)Landroid/net/VpnService$Builder;", "GetAddDnsServer_Ljava_lang_String_Handler")>]
abstract member AddDnsServer : string -> Android.Net.VpnService.Builder
override this.AddDnsServer : string -> Android.Net.VpnService.Builder

Parameters

address
String

Returns

Attributes

Exceptions

if the address is invalid.

Remarks

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

See also

Applies to