m1k1o / neko

A self hosted virtual browser that runs in docker and uses WebRTC.
https://neko.m1k1o.net/
Apache License 2.0
5.98k stars 449 forks source link

Add Opera image #197

Closed prophetofxenu closed 1 year ago

prophetofxenu commented 1 year ago

Addresses #195. The image currently builds and runs quite well. However it's missing extensions and out-of-the-box DRM support. YouTube was tested, as well as Spotify after configuring DRM.

To fix the DRM issue, I looked around for information but the most useful and up to date info was here and here. The download and placement of libffmpeg is handled in the Dockerfile. For Widevine however, this requires launching the browser, navigating to "opera://components", clicking the update buttons, and then restarting the browser. This is annoying but I don't know how to automate this. I tried opening the network panel of the dev tools to see the URL of the components it's requesting but this did not reveal information. It may be possible to get this info by intercepting the request with something like burpsuite, but I will have to try this another time. Any other ideas would be appreciated.

There's also a warning about running the browser with the --no-sandbox flag, but Opera will not launch in neko without it.

opera1

opera2

prophetofxenu commented 1 year ago

After asking the Opera subreddit, it looks like Opera does not support Chromium policies and preferences files like the other images. I have been unable to find another way to setup extensions and DRM components without having to launch the browser. I don't think there's much more work I can do on this without additional information on how Opera works, so I'm marking this ready.

prophetofxenu commented 1 year ago

Additionally, the URL to the build of libffmpeg will need to be updated from time to time, but if there's a way to automatically grab the latest version I'll be happy to work that into the dockerfile.