BeamMP / BeamMP-Server

Server for the multiplayer mod BeamMP for BeamNG.drive
https://beammp.com
GNU Affero General Public License v3.0
119 stars 50 forks source link

[Feature Request] Sideloading (mod) files via http/https #9

Open ger-pakon opened 3 years ago

ger-pakon commented 3 years ago

Hey,

would be great, if there is a setting (maybe a url) locating to a webserver, where the mods can be downloaded. The folderstructure must be the same as in the game, may makes it more easy. The Client will download the mods from this url instead from the BeamMP-Server.

Cheers, Pakon

Starystars67 commented 3 years ago

What would be the intended gain / benefit of doing this? I am not putting it/you down, just trying to get an idea as to what you are trying to gain by it.

ger-pakon commented 3 years ago

Hey @Starystars67 I see some benefits:

Thanks, Pakon

lionkor commented 3 years ago

I'd like to add that while this is a nice idea, the biggest benefit I see would be that you can host mods from a different server than the BeamMP-Server. Considering the tiny system footprint of a server (even when maxed out with 15+ players), I don't quite see why the server wouldn't live on the same machine as the mods. I do agree that we should allow the Server Lua to pass FTP/SFTP commands in order to self-update or auto-download stuff. I wouldn't mind hearing other ideas for why/how/if this should be done, feel free to discuss on this issue.

EDIT: I had not considered CDNs

Starystars67 commented 3 years ago

@lionkor

Server Lua to pass FTP/SFTP

This is a bad idea in my opinion as it could be exploited if someone uses a server resource that had malicious intent. HTTP/s post / get requests would be better as it helps to reduce the chance of uploading details / data. I dont know it just feels off to have FTP access for something that shouldn't need it.

Starystars67 commented 3 years ago

Maybe we could introduce a system where you could position NGINX or similar serving systems. The question is is the issue with your upload or something else?

We are working on fixing the downloading process that was partially broken in the latest update.

Starystars67 commented 3 years ago

No worries @Ae3NerdGod , Sorry for the confusion there. In short the error is that for some reason the launcher is being buggy with the download which messes with the UI in game and in turn everything seems slow and janky. The good news is that we are working on it. Something to note is that the BeamMP server actually does try to serve the files at maximum speed for you to download at and if you were to try and test its speed it should be where you would expect it to be (Allowing for the slowest point in the network be it the server or the client).

lionkor commented 2 years ago

The builtin HTTPS server (#69, #68) could serve the local files, this would simplify the download mechanism to a HTTP/S GET on the client-side, and a simple file serve on the server side. It could also be ratelimited fairly well.

lionkor commented 2 years ago

@jimkoen @Starystars67

lionkor commented 7 months ago

This is planned for the rust-server branch.