Skip to content

Not working with HTTPS #107

Description

@IceHacks

I am making a proxy with Electron and I use this code

var proxy = hoxy.createServer({
	certAuthority: {
		key: localhost.key,
		cert: localhost.cert
	},
	tls: {
		key: localhost.key,
		cert: localhost.cert
	}
}).listen(45682, () => {
	console.log("Server started listening on port 45682");
});
proxy.log('error warn debug info', (event) => {
	//console.error(event.level + ': ' + event.message);
	//if (event.error) console.error(event.error.stack);
});
proxy.intercept("response", (req, resp, cycle) => {
	console.log("Intercepted response");
	win.webContents.send("response", {
		req: req,
		res: resp
	});
});
proxy.intercept("request", (req, resp, cycle) => {
	//console.log("Intercepted request");
});

Before I added tls and certAuthority options it worked but only on HTTP now it doesn't work at all. I just get site didn't send any data errors on my browser sometimes no internet errors. Am I doing something wrong the certificates are for localhost and are in my localhost object.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions