Table of Contents

Class TransportDefaults

Namespace
VpnHood.Core.Common.Configuration
Assembly
VpnHood.Core.Common.dll

Provides what both sides of the transport share: the values a client and a server must agree on, and the defaults of settings nobody gave.

public static class TransportDefaults
Inheritance
TransportDefaults
Inherited Members

Remarks

What one side alone reads is that side's: ClientTransportOptions and ServerTransportDefaults. The settable values are the process's, read when they are needed.

Fields

MaxPacketChannelCount

The default most of a client's packet channels: 8.

public const int MaxPacketChannelCount = 8

Field Value

int

MaxPacketSize

The largest packet on a path of the internet's usual MTU: 1,500 bytes.

public const int MaxPacketSize = 1500

Field Value

int

MaxPingClientCount

The most of a client session's ping workers: 10; a server's session options have their own default.

public const int MaxPingClientCount = 10

Field Value

int

MaxUdpClientCount

The default most of a session's UDP forwarding workers: 100.

public const int MaxUdpClientCount = 100

Field Value

int

MaxUdpDatagramSize

The largest UDP datagram the forwarders take: 64 KB.

public const int MaxUdpDatagramSize = 65536

Field Value

int

MaxUdpDnsClientCount

The most of a session's DNS forwarding workers: 70, small ones, each removed once unused for UdpDnsTimeout.

public const int MaxUdpDnsClientCount = 70

Field Value

int

MtuClient

The largest packet a tunnel carries, both ways, which a client asks for and a server holds a session to: 1,400 bytes, so the UDP channel's datagram for it, with its IPv6 and UDP headers, fits a 1,500-byte path.

public const int MtuClient = 1400

Field Value

int

MtuOverhead

The bytes taken off the smaller MTU of a client and a server before protocol 16: 120, for the headers around a packet in the tunnel.

public const int MtuOverhead = 120

Field Value

int

MtuSafety

The bytes a client's MTU leaves below MaxPacketSize: 100.

public const int MtuSafety = 100

Field Value

int

MtuServer

The MTU a server gives its interface: 1,500 bytes.

public const int MtuServer = 1500

Field Value

int

PacketForwardingQueueCapacity

The packets a forwarding queue holds: 200.

public const int PacketForwardingQueueCapacity = 200

Field Value

int

PrefetchStreamBufferSize

The first read of a TCP connection the client forwards, as for its TLS ClientHello: 4 KB.

public const int PrefetchStreamBufferSize = 4096

Field Value

int

StreamSmallReadCacheSize

The read buffer of a tunnel stream's HTTP or WebSocket framing: 512 bytes.

public const int StreamSmallReadCacheSize = 512

Field Value

int

UdpDnsBufferSize

The buffer of a forwarded DNS exchange over UDP: 4 KB, the common EDNS ceiling; a larger reply is dropped, as a lost packet.

public const int UdpDnsBufferSize = 4096

Field Value

int

Properties

ByeTimeout

Gets or sets how long a client's goodbye to the server may take. The default is 2 seconds.

public static TimeSpan ByeTimeout { get; set; }

Property Value

TimeSpan

ConnectionPacketBufferSize

Gets the default buffer sizes of a packet channel's connection: about 256 KB (262,140 bytes) each way.

public static TransferBufferSize ConnectionPacketBufferSize { get; }

Property Value

TransferBufferSize

IcmpTimeout

Gets or sets how long a session's ping destination stays remembered unused. The default is 1 minute.

public static TimeSpan IcmpTimeout { get; set; }

Property Value

TimeSpan

MaxSpeedBurst

Gets or sets the bytes a speed-limited session may move at full speed after a pause, each way, as cable providers allow a burst. The default is 10 MB.

public static long MaxSpeedBurst { get; set; }

Property Value

long

Remarks

Short use, such as a page load, runs at full speed, and heavy use is held to the limit. The burst has no peak rate, so a heavy transfer may stall once as it meets the limit, for as long as its debt takes to pay, and each new session starts with a full burst.

PingTimeout

Gets or sets how long a ping waits for its reply. The default is 5 seconds.

public static TimeSpan PingTimeout { get; set; }

Property Value

TimeSpan

TcpCheckInterval

Gets or sets how often forwarded TCP connections are checked. The default is 15 minutes.

public static TimeSpan TcpCheckInterval { get; set; }

Property Value

TimeSpan

TcpGracefulTimeout

Gets or sets how long a tunnel stream's graceful close may take. The default is 15 seconds.

public static TimeSpan TcpGracefulTimeout { get; set; }

Property Value

TimeSpan

UdpDnsTimeout

Gets or sets how long a DNS flow's forwarding lasts unused, shorter than UdpTimeout, so a burst of queries does not hold every worker. The default is 10 seconds.

public static TimeSpan UdpDnsTimeout { get; set; }

Property Value

TimeSpan

UdpTimeout

Gets or sets how long a UDP flow's forwarding lasts unused. The default is 2 minutes.

public static TimeSpan UdpTimeout { get; set; }

Property Value

TimeSpan