I'm playing with JavaScript and I know that webcrypto API is not available without https but I want encipherment capability between a web server on LAN and a browser. Using https with a self signed certificate will display a ugly warning message to the user that makes it unsuitable for my use case. I've also tried to embedded an iframe in an https web page hosted online with a valid certificate using a service worker so that the encryption is done by the parent page of the iframe through postmessage api but when the https page go offline the subtlcrypto API become unavailable on some browser.
So can you propose some hacks please?
Please don't kill me, I'm a beginner.