Quantcast
Channel: Active questions tagged https - Stack Overflow
Viewing all articles
Browse latest Browse all 1552

Handle HTTPS Request in Proxy Server by C# ( CONNECT Tunnel )

$
0
0

I'm trying to write a Home Proxy Server in C# and I almost succeeded but I have problem to handle HTTPS requests (CONNECT).

I don't know really how to handle this type of requests.

In my studies I realized that for this requests we must to connect client to target host directly.

Steps for these requests (that I realized):

  • Receive first request from client (CONNECT https://www.example.ltd:443 HTTP/1.1) and send that to target host
  • Send HTTP/1.1 200 Connection Established\r\n\r\n to client
  • Listen to both sockets (client and target host) and send receives from each other to each other
  • Listen until one of sockets disconnected

Is this correct? If it ok, how handle this by c# ?


Viewing all articles
Browse latest Browse all 1552

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>