NanoByte.Common  2.10.5
NanoByte.Common.Net.NetUtils Class Reference

Provides helper methods for the System.Net subsystem. More...

Static Public Member Functions

static void ApplyProxy ()
 Applies environment variable HTTP proxy server configuration if present. More...
 
static void ConfigureTls ()
 Enables support for all available SSL/TLS versions. More...
 
static void TrustCertificates (params string[] publicKeys)
 Makes the SSL validation subsystem trust a set of certificates, even if their certificate chain is not trusted. More...
 

Properties

static bool IsInternetConnected [get]
 Determines whether an internet connection is currently available. May return false positives. More...
 

Detailed Description

Provides helper methods for the System.Net subsystem.

Member Function Documentation

◆ ApplyProxy()

static void NanoByte.Common.Net.NetUtils.ApplyProxy ( )
inlinestatic

Applies environment variable HTTP proxy server configuration if present.

Uses classic Linux environment variables: http_proxy, http_proxy_user, http_proxy_pass

◆ ConfigureTls()

static void NanoByte.Common.Net.NetUtils.ConfigureTls ( )
inlinestatic

Enables support for all available SSL/TLS versions.

◆ TrustCertificates()

static void NanoByte.Common.Net.NetUtils.TrustCertificates ( params string[]  publicKeys)
inlinestatic

Makes the SSL validation subsystem trust a set of certificates, even if their certificate chain is not trusted.

Parameters
publicKeysThe public keys of the certificates to trust.

This method affects the global state of the AppDomain. Calling it more than once is not cumulative and will overwrite previous certificates. You should call this method exactly once near the beginning of your application.

Property Documentation

◆ IsInternetConnected

bool NanoByte.Common.Net.NetUtils.IsInternetConnected
staticget

Determines whether an internet connection is currently available. May return false positives.


The documentation for this class was generated from the following file: