Detect whether a stream is http or https and forward accordingly
Detect whether a stream is https or http based on the first buffer on a stream and forward accordingly.
:4050 routing http traffic to
:4051 and https traffic to
var httpsDetect = ;;
Fire up http and https servers and route traffic to them based on what the incoming messages look like.
var httpsDetect = ;var http = ;var https = ;var fs = ;var opts =key : fscert : fs;var servers =http : httphttps : https;servershttp;servershttps;;
$ curlI am an http server!$ curl -kI AM TOTALLY SECURE AND STUFF YOU GUYS. SELF SIGNED IS TOTALLY SECURE, WHATEVER.$
var httpsDetect = ;
opts should have 2 keys:
host defaults to localhost for both keys.
If the option argument isn't an array it will be lifted to be
With npm, do:
npm install https-detect