public bool SetAsCurrentProxy() { StringBuilder proxyString = new StringBuilder(); if (!string.IsNullOrEmpty(UseProxyServerAddress)) { buildProxyString(proxyString, "", UseProxyServerAddress, UseProxyServerPort); } else { if (!string.IsNullOrEmpty(HTTPProxyAddress)) { buildProxyString(proxyString, "http", HTTPProxyAddress, HTTPProxyPort); } if (!UseSameProxyServerForAllProtocols) { if (!string.IsNullOrEmpty(SecureProxyAddress)) { buildProxyString(proxyString, "https", SecureProxyAddress, SecureProxyPort); } if (!string.IsNullOrEmpty(FTPProxyAddress)) { buildProxyString(proxyString, "ftp", FTPProxyAddress, FTPProxyPort); } if (!string.IsNullOrEmpty(GopherProxyAddress)) { buildProxyString(proxyString, "gopher", GopherProxyAddress, GopherProxyPort); } if (!string.IsNullOrEmpty(SocksProxyAddress)) { buildProxyString(proxyString, "socks", SocksProxyAddress, SocksProxyPort); } } } string excludeAddress = this.ExcludeAddressesFromProxy; if (BypassProxyForLocalAddress) { excludeAddress += ";<local>"; } return(WinInetInterop.SetInternetProxy(this.UseProxyServer, proxyString.ToString(), excludeAddress, this.AutoDetectSettings, this.UseAutoConfigureScript, this.UseAutoConfigureScriptAddress)); }
public static string GetCurrentActiveBypassProxy() { return(WinInetInterop.GetBypassProxy()); }
public static string GetCurrentActiveProxyServerURLs() { return(WinInetInterop.GetProxyServerURL()); }
public static string GetCurrentActiveAutoConfigURL() { return(WinInetInterop.GetAutoConfigURL()); }
public static bool AnyCurrentActiveProxySet() { return(WinInetInterop.IsAnyProxy()); }
public static bool GetCurrentActiveAutoConfigProxy() { return(WinInetInterop.IsAutoConfigProxy()); }
public static void ModifyCurrentActiveAutoConfigProxyURL(string autoConfigURL) { WinInetInterop.SetAutoConfigURL(autoConfigURL); }
public static void ModifyCurrentActiveAutoConfigProxy(bool newValue) { WinInetInterop.SwitchAutoConfigProxy(newValue); }
public static bool GetCurrentActiveUseProxy() { return(WinInetInterop.IsUseProxy()); }
public static void ModifyCurrentActiveUseProxy(bool newValue) { WinInetInterop.SwitchUseProxy(newValue); }
/// <summary> /// Handles the Click event of the InternetSettingsToolStripMenuItem control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> private void InternetSettingsToolStripMenuItem_Click(object sender, EventArgs e) { WinInetInterop.DisplayInternetControlPanel(this.Handle); }