Microsoft.Win32.RegistryKey key = Microsoft.Win32.Registry.CurrentUser.OpenSubKey("Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings");string proxyEnabled = key.GetValue( "ProxyEnable" ).ToString();
string proxyServer = key.GetValue("ProxyServer") == null ? string.Empty : key.GetValue("ProxyServer").ToString();
System.Net.WebProxy webProxy = System.Net.WebProxy.GetDefaultProxy();bool bypassProxyForLocal = webProxy.BypassProxyOnLocal; Uri address = webProxy.Address;if ( address != null ){ string host = address.Host; string port = address.Port.ToString();}