greim / hoxy

Web-hacking proxy API for node
http://greim.github.io/hoxy/
MIT License
597 stars 97 forks source link

Problem intercepting https #75

Closed alberto-bottarini closed 8 years ago

alberto-bottarini commented 8 years ago

Hi, I follow this small tutorial (http://greim.github.io/hoxy/#intercept-https) about creating fake certificate in order to use hoxy as an https proxy.

After all the job is done, I get this error in firefox:

Your connection is not secure

The owner of _google.com_ has configured their website improperly. To protect your information from being stolen, Firefox has not connected to this website.

This site uses HTTP Strict Transport Security (HSTS) to specify that Firefox only connect to it securely. As a result, it is not possible to add an exception for this certificate.

Am I doing something wrong? My hoxy configuration is trivial.

var proxyPort = 8080;
var proxy = hoxy.createServer({
    certAuthority: { 
                key: fs.readFileSync('./my-private-root-ca.key.pem'),
                cert: fs.readFileSync('./my-private-root-ca.crt.pem')
        }
}).listen(proxyPort, function() {
        console.log('The proxy is listening on port ' + proxyPort + '.');
});
nerdbeere commented 8 years ago

On which OS are you trying this?

On OS X you need to add root-ca.crt.pem to your Keychain and trust it permanently.

alberto-bottarini commented 8 years ago

ubuntu

nerdbeere commented 8 years ago

Did you import root-ca.crt.pem into firefox?

alberto-bottarini commented 8 years ago

You are right! Thanks, i'm a little noob on HTTPS and SSL

greim commented 8 years ago

Sounds like you got it figured out.