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

html - How to set bootstrap input responsive width? -

javascript - Highchart x and y axes data from json -

javascript - Get js console.log as python variable in QWebView pyqt -