public void SetUp()
 {
     _proxy  = new PassThroughProxy(ProxyPort);
     _server = new HttpStubServer(_serverBaseAddress);
     _client = new HttpClient(_handler = new HttpClientHandler
     {
         Proxy = new WebProxy(_proxyBaseAddress, false)
     });
 }
Beispiel #2
0
        public void SetUp(bool rejectHttpProxy = false)
        {
            Configuration.Settings = new Configuration(
                new Server(ProxyPort, rejectHttpProxy),
                new Authentication(false, null, null),
                new Firewall(false, new Rule[] { }));

            _proxy  = new PassThroughProxy(ProxyPort, Configuration.Settings);
            _server = new HttpStubServer(_serverBaseAddress);
            _client = new HttpClient(_handler = new HttpClientHandler
            {
                Proxy = new WebProxy(_proxyBaseAddress, false)
            });
        }