C# Class TrotiNet.SystemProxySettings

Container class for proxy settings
Mostrar archivo Open project: Gizeta/Nekoxy-fiddler Class Usage Examples

Public Properties

Property Type Description
AutoConfigURL string
ProxyOverride string
ProxyServer string

Public Methods

Method Description
GetHttpSpecificProxy ( string &proxy_host, int &proxy_port ) : void

Retrieve the HTTP-specific proxy settings

GetHttpsSpecificProxy ( string &proxy_host, int &proxy_port ) : void

Retrieve the HTTP-specific proxy settings

GetProtocolSpecificProxy ( string protocol, int default_port, string &proxy_host, int &proxy_port ) : void

Extract protocol-specific proxy settings

SetHttpSpecificProxy ( string proxy_host, int proxy_port ) : void

Replace the proxy for the HTTP protocol; proxy settings for the other protocols are left unchanged

ProxyEnable is not modified either, and must be updated separately.

SystemProxySettings ( bool proxyEnable, string proxyServer, string proxyOverride ) : System

Constructor with default (empty) auto config URL

SystemProxySettings ( bool proxyEnable, string proxyServer, string proxyOverride, string autoConfigURL ) : System

Constructor

ToString ( ) : string

Human-readable representation

Method Details

GetHttpSpecificProxy() public method

Retrieve the HTTP-specific proxy settings
public GetHttpSpecificProxy ( string &proxy_host, int &proxy_port ) : void
proxy_host string
proxy_port int
return void

GetHttpsSpecificProxy() public method

Retrieve the HTTP-specific proxy settings
public GetHttpsSpecificProxy ( string &proxy_host, int &proxy_port ) : void
proxy_host string
proxy_port int
return void

GetProtocolSpecificProxy() public method

Extract protocol-specific proxy settings
public GetProtocolSpecificProxy ( string protocol, int default_port, string &proxy_host, int &proxy_port ) : void
protocol string /// One of "ftp=", "socks=", "http=", "https="; it must end with a /// '=' sign. ///
default_port int /// The default port for the protocol, e.g. 80 for HTTP ///
proxy_host string /// Will be set to the proxy host name ///
proxy_port int /// Will be set to the proxy port ///
return void

SetHttpSpecificProxy() public method

Replace the proxy for the HTTP protocol; proxy settings for the other protocols are left unchanged
ProxyEnable is not modified either, and must be updated separately.
public SetHttpSpecificProxy ( string proxy_host, int proxy_port ) : void
proxy_host string
proxy_port int
return void

SystemProxySettings() public method

Constructor with default (empty) auto config URL
public SystemProxySettings ( bool proxyEnable, string proxyServer, string proxyOverride ) : System
proxyEnable bool
proxyServer string
proxyOverride string
return System

SystemProxySettings() public method

Constructor
public SystemProxySettings ( bool proxyEnable, string proxyServer, string proxyOverride, string autoConfigURL ) : System
proxyEnable bool
proxyServer string
proxyOverride string
autoConfigURL string
return System

ToString() public method

Human-readable representation
public ToString ( ) : string
return string

Property Details

AutoConfigURL public_oe property

Correspond to the system/IE advanced option "Use Automatic Configuration Script."
public string AutoConfigURL
return string

ProxyOverride public_oe property

Correspond to the system/IE advanced option "Exceptions" (do not use proxy server for these address prefixes). For example: *.local
If the option "Bypass proxy server for local addresses" is checked, ";<local>" is appended to ProxyOverride.
public string ProxyOverride
return string

ProxyServer public_oe property

Correspond to the system/IE options "Address" and "Port", and the advanced option "Servers".
- If the proxy is the same for all protocols, use: localhost:2000 - If the proxy depends on the TCP service, use this syntax: ftp=ip1:2002;http=ip2:2000;https=ip3:2001;socks=ip4:2003
public string ProxyServer
return string