C# Class NanoByte.Common.Net.NetUtils

Provides helper methods for the System.Net subsystem.
ファイルを表示 Open project: nano-byte/common

Public Methods

Method Description
ApplyProxy ( ) : void

Applies environment variable HTTP proxy server configuration if present.

Uses classic Linux environment variables: http_proxy, http_proxy_user, http_proxy_pass

TrustCertificates ( ) : void

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

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.

Method Details

ApplyProxy() public static method

Applies environment variable HTTP proxy server configuration if present.
Uses classic Linux environment variables: http_proxy, http_proxy_user, http_proxy_pass
public static ApplyProxy ( ) : void
return void

TrustCertificates() public static method

Makes the SSL validation subsystem trust a set of certificates, even if their certificate chain is not trusted.
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.
public static TrustCertificates ( ) : void
return void