Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Where are the server.js sources? #27

Open
vezaynk opened this issue Dec 27, 2023 · 4 comments
Open

Where are the server.js sources? #27

vezaynk opened this issue Dec 27, 2023 · 4 comments

Comments

@vezaynk
Copy link

vezaynk commented Dec 27, 2023

Across the repos I keep seeing mentions of server.js but I can't figure out how to build it locally.

$FETCH https://dl.strem.io/server/${VERSION}/${BUILD}/server.js

Does anyone knows where it comes from? It's a big missing piece of the puzzle for me right now and I already spent a couple hours looking for it.

@vezaynk
Copy link
Author

vezaynk commented Dec 27, 2023

Ah found it. I didn't think to search for rust files: https://github.com/Stremio/stremio-service/blob/21ba2fc42de63834d115eb26d545c906db5176ef/src/server.rs#L1

Is there a setup guide for getting things running fully locally? I want to run a local build of all the rust and js components together.

@jaruba
Copy link
Member

jaruba commented Dec 27, 2023

The file you linked is from the core which interacts with the streaming server. Although many individual parts of Stremio's streaming server are open source, the main server module is not, it is currently only released as Stremio Service and Stremio Server Docker. Also, Stremio is not a project that is meant to be used in self-hosted environments, although it theoretically could as there is a docker image for the server and the web app could be ran locally too, but it can never be fully self-hosted due to the cloud api side. (used to sync user data across apps / devices, although some could argue that many other popular self-hosting projects require a cloud api too)

I'm not certain of your motivation, but I fear that this may be another case of "be Plex"

@vezaynk
Copy link
Author

vezaynk commented Dec 27, 2023

@jaruba, the motivation is rather that I'm trying to do some work for the UI (yay, open-source), but I am having a hard time tracking code paths across the codebases.

One of the things that I'm trying to do is have the ability to preset settings by URL (streaming server, addons), but that seems to talk to a rust worker, server.js, all kinds of codepaths within the front-end.

Another is I can't figure out how the service expects me to provide SSL certificates because that part is in the server.js file by the looks of it. A lot of quality of life features become very difficult to implement while its a black box.

The complexity is honestly overwhelming even without blackboxes.

@jaruba
Copy link
Member

jaruba commented Dec 27, 2023

your issues are understandable, Stremio is over 8 years old now and the amount of repositories is quite overwhelming for anyone. I will attempt to assist you

the server has the ability of generating its own SSL certificates under the stremio.rocks domain for LAN IPs, we generally do not advise using the server with the open web because it has no security features to protect the user in such an environment, which is why we do not have features to allow the use of custom SSL certificates

with that said, nothing could stop a user from using something like nginx and proxying the server's port to set a custom ssl certificate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants