billyb2 / bootleg_networking

A cross platform (wasm included) networking library!
MIT License
56 stars 5 forks source link

Getting `Blocked loading mixed active content` on Firefox when hosting app over HTTPS. #3

Open FF-AntiK opened 2 years ago

FF-AntiK commented 2 years ago

I'm getting the Blocked loading mixed active content error when my WASM-Client tries to connect to the server. Is there a way to use SSL in the server implementation? If not, is there a way to trick Firefox into establishing the WebRTC connection anyways?

billyb2 commented 2 years ago

You're serving the WASM files over HTTPS too?

FF-AntiK commented 2 years ago

Yes, if I won't, Firefox would complain about gamepad support, which only works on secure connections.

billyb2 commented 2 years ago

Honestly, I'm not too sure as to what to do. I'm not very knowledgable of browser networking, though it definetly sounds like an issue with the naia part of the codebase. Have you seen any similar issues there?

FF-AntiK commented 2 years ago

No Problem. I'll play with naia directly and report any findings here.

FF-AntiK commented 2 years ago

Hey, so I managed to setup a proxy to route secure traffic to the unsecured WebRTC server. But that was only one part of the problem. To make it work the naia-client needs to know the public WebRTC URL. This is only possible in the latest naia release which uses naia-socket 0.8.0!

billyb2 commented 2 years ago

I've been pretty busy with university lately, but I'd absolutely love to upgrade to the latest naia version! If someone would want to work on a PR for the upgrade, I'd be very happy to review and merge it. If not, I'll probably work on one at the end of my semester.