-
Notifications
You must be signed in to change notification settings - Fork 14
feat: Add configurable support for Satisfactory Dedicated Server API #29
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @azzeloof
Thanks so much for spending your time writing the code and raising a PR for it. It's very much appreciated.
I'm happy with the code and approach you've taken generally, with just a single small change I'd like you to make in some error handling.
I am however a little uncomfortable with not validating the server's certificate, even though the risk is pretty low - but I do understand why you've done it. I'm not at all familiar with how people are running Satisfactory dedicated servers. Does the setup expose the certificate chain so that it can be validated? If it does, I'd prefer to have FRMC take an environment variable for the directory to find the additional certificates, as well as a flag for doing it insecurely should people still want to.
If the setup doesn't expose the certificate chain, then there's not a lot to be done. In that case, I'd like a comment in either the commit message or the relevant place in code which explains why it's skipping certificate validation.
EDIT: could you also address the failing linting too, please?
|
Hey @AP-Hunt- Thank you for creating this in the first place! It's an incredibly useful tool. If this doesn't sound right please let me know- I'm no security expert 😄 Thank you! |
|
If it helps, I can confirm it's not just docker image - the cert is just self-signed in most (all?) cases so there's unfortunately not much FRMC can do other than trust it. |
|
Ok, sounds like the dedicated server isn't really set up for that kind of authentication. FRMC doesn't need to try and do anything on that front. What you've got is fine. |
|
Thanks @featheredtoast - that more or less aligns with what I've seen too. Cheers! |
|
Grand, happy with that. Thanks for putting the effort in. I'll merge this in and release it alongside the other changes that are currently open. |
Hi, this PR adds configurable support for connecting to the Ficsit Remote Monitoring mod via the game's built-in Dedicated Server API (e.g.,
https://<ip>:7777/api/v1).This is useful for users running dedicated servers in Docker, where exposing the mod's
8080port isn't always practical, but the game's7777port is already exposed.This change is fully backward-compatible. I've added a router in
exporter/common.gothat checks theFRM_HOSTSvariable:http://address, it uses the originalGETmethod.https://.../api/v1address, it switches to aPOSTmethod, sends the correct JSON body, and skips TLS verification for the server's self-signed certificate.How to Use
Users can now set their
FRM_HOSTSvariable to either format:Standard Mod Web Server:
FRM_HOSTS=http://<server_ip>:8080Dedicated Server API (New):
FRM_HOSTS=https://<server_ip>:7777/api/v1I've also updated the
readme.tpl.mdto explain this new option.Thanks!