ssl - C# Proxy HTTPS CONNECT -


im trying use proxymesh api c#. excerpt site: https://proxymesh.com/faq/

does proxy server support https/ssl sites?

yes. proxy server still http, can securely proxy https/ssl connections between , https server (using connect method). communication between client/browser , secure site encrypted; proxy server moving data , forth. caveat since proxy server cannot inspect https requests, all proxy authorization headers or custom proxymesh headers must sent initial connect method. ip based authentication recommended. end-to-end https support added in future.

the bolded section important. have no idea how in c#

the code have far.. keep on getting bad request results:

httpwebrequest request = (httpwebrequest)webrequest.create(url);             webproxy myproxy = new webproxy(proxyaddress, false);             networkcredential proxycredential1 = new networkcredential(username, password);             myproxy.usedefaultcredentials = false;             myproxy.credentials = proxycredential1;             request.proxy = myproxy;             request.method = webrequestmethods.http.connect;             request.headers.add("proxy-authorization", "basic " + base64usernameandpassword);             request.headers.add("x-proxymesh-country", countryisocode);             request.headers.add("x-proxymesh-ip", xproxymeship);             request.headers.add("x-proxymesh-not-ip", xproxymeshnotip);             request.headers.add("none", none);             httpwebresponse response1 = (httpwebresponse)request.getresponse(); 


Comments

Popular posts from this blog

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -