By default, https using the port 443 rather than 80. You have to specify different port to different protocol lister.
views:
337answers:
4This 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.
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.
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.