public void LowercaseEnvironmentVariable() { Environment.SetEnvironmentVariable("http_proxy", "http://example.com"); var proxy = new ProxyManager(); Assert.That(proxy.Hostname, Is.EqualTo("example.com")); Assert.That(proxy.Port, Is.EqualTo(80)); Assert.That(proxy.Username, Is.Null); Assert.That(proxy.Password, Is.Null); }
public BloomS3Client(string bucketName) { _bucketName = bucketName; _s3Config = new AmazonS3Config { ServiceURL = "https://s3.amazonaws.com" }; var proxy = new ProxyManager(); if (!string.IsNullOrEmpty(proxy.Hostname)) { _s3Config.ProxyHost = proxy.Hostname; _s3Config.ProxyPort = proxy.Port; if (!string.IsNullOrEmpty(proxy.Username)) _s3Config.ProxyCredentials = new NetworkCredential(proxy.Username, proxy.Password); } }
public BloomS3Client(string bucketName) { _bucketName = bucketName; _s3Config = new AmazonS3Config { ServiceURL = "https://s3.amazonaws.com" }; var proxy = new ProxyManager(); if (!string.IsNullOrEmpty(proxy.Hostname)) { _s3Config.ProxyHost = proxy.Hostname; _s3Config.ProxyPort = proxy.Port; if (!string.IsNullOrEmpty(proxy.Username)) { _s3Config.ProxyCredentials = new NetworkCredential(proxy.Username, proxy.Password); } } }