Class WireGuardConnectionConfigurationBuilder
Class WireGuardConnectionConfigurationBuilder. Builder for an IConnectionConfiguration object.
Inheritance
Inherited Members
Namespace: VpnSDK
Assembly: cs.temp.dll.dll
Syntax
public class WireGuardConnectionConfigurationBuilder : ConnectionConfigurationBuilderBase
Methods
Build()
Builds an
Declaration
public IConnectionConfiguration Build()
Returns
Type | Description |
---|---|
IConnectionConfiguration | IConnectionConfiguration. |
SetBlockUntunneledTraffic(Boolean)
Defines if untunneled traffic is blocked or not.
Declaration
public WireGuardConnectionConfigurationBuilder SetBlockUntunneledTraffic(bool blockUntunneledTraffic)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | blockUntunneledTraffic | When true, blocks all traffic that is neither to nor from the tunnel interface or is to the wrong DNS server. |
Returns
Type | Description |
---|---|
WireGuardConnectionConfigurationBuilder | WireGuardConnectionConfigurationBuilder. |
SetDoubleHopSettings(Boolean, ILocation, ILocation)
Sets the double hop settings for the WireGuard connection configuration.
Declaration
public WireGuardConnectionConfigurationBuilder SetDoubleHopSettings(bool isEnabled, ILocation entryLocation, ILocation exitLocation)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | isEnabled | A boolean value indicating whether double hop is enabled. |
ILocation | entryLocation | The entry location for double hop. |
ILocation | exitLocation | The exit location for double hop. |
Returns
Type | Description |
---|---|
WireGuardConnectionConfigurationBuilder | The WireGuardConnectionConfigurationBuilder for method chaining. |
SetMtu(Nullable<Int32>)
Sets the Maximum Transmission Unit (MTU) for the WireGuard connection configuration.
Declaration
public WireGuardConnectionConfigurationBuilder SetMtu(int? mtu)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<System.Int32> | mtu | The MTU value to set. The valid range is 1300 to 65535 bytes. |
Returns
Type | Description |
---|---|
WireGuardConnectionConfigurationBuilder | The current instance of WireGuardConnectionConfigurationBuilder for fluent configuration. |
SetServiceStartTimeout(Int16)
Sets the service start timeout. Default is 30 seconds. The valid range is between 10 and 60 seconds.
Declaration
public WireGuardConnectionConfigurationBuilder SetServiceStartTimeout(short serviceStartTimeout)
Parameters
Type | Name | Description |
---|---|---|
System.Int16 | serviceStartTimeout | The service start timeout. |
Returns
Type | Description |
---|---|
WireGuardConnectionConfigurationBuilder | WireGuardConnectionConfigurationBuilder. |
Validate()
Validates the configuration settings, including MTU (Maximum Transmission Unit) value.
Declaration
protected override void Validate()