+3  A: 

By default, https using the port 443 rather than 80. You have to specify different port to different protocol lister.

sza
but when I configure my browser to go through this local "proxy" I'm building I'm assuming I only have to specify one host/port no? Like normally with browsers you only specific one port for a proxy server?
Greg
+2  A: 

This sounds non-trivial but not impossible. You will need to inspect what the client sends and decide if they are starting an HTTP or HTTPS session based on the data that they supply.

edit: Thinking about this a little more this is probably not what you want to do given that you are writing a proxy. Instead you will need to handle the CONNECT method (see http://www.ietf.org/rfc/rfc2817.txt) and open up a tunneled connection to the target server.

Yaur
A: 

You are not forced to use the same config for all the protocols.

Hit advanced in the proxy settings, and there you can specify different proxy settings for other protocols.

eglasius
understood - but you don't have to do this to go through a normal company proxy server, so I want my home grown one to be able to work in the same respect.
Greg
+1  A: 

OBJECTIVE: Try to find a way for my program to listen to both HTTP and HTTPS on the same port.

You can't do this with HTTPListener. You'll need to use a TCPListener and handle each response conditionally depending on whether it is HTTP or HTTPS.

I'm pretty sure if you use one HTTPListener for HTTP 8080 and one for HTTPS 8443 you should be able to make your browser use yourproxy:8080 for HTTP and yourproxy:8443 for HTTPS. Firefox definitely let's you do this.

anger