cloudflare-ddns icon indicating copy to clipboard operation
cloudflare-ddns copied to clipboard

[feature request] SHOUTRRR_FILE

Open tiamilani opened this issue 11 months ago • 4 comments

Hi :)

Thank you very much for the nice work! I was wondering, are you already planning to introduce a SHOUTRRR_FILE env variable? I'm asking because a lot of times in shoutrrr urls there are tokens, which would be better to be kept as a secrets ;)

I've looked into the docs but I didn't find anything regarding this :/

thanks and all the best!

tiamilani avatar Jan 27 '25 23:01 tiamilani

At the moment I've overcome the issue by following:

https://stackoverflow.com/a/63870926 with #!/bin/sh.

And using the "edge-alpine" tag.

tiamilani avatar Jan 27 '25 23:01 tiamilani

@tiamilani Thanks for the suggestion and sorry for the late response. I have a question: if both SHOUTRRR and SHOUTRRR_FILE are present, should that be an error?

I am currently working on IPv6 prefix updating in #1023. I can work on SHOUTRRR_FILE after that.

favonia avatar Jan 31 '25 14:01 favonia

Hi, no worries and thank you for taking the time to fix all these issues:)

Regarding your question, I would be consistent with *_TOKEN and *_TOKEN_FILE. Does an error occur if I set both the token variables? Or one has preference over the other?

In the end I assume that bot SHOUTRRR and SHOUTRRR_FILE would initialize the same variable, one directly while the other from file.

I would raise an error or warning only in the case that the two variables have a different value, in that case might be worthy to ask the user to make up his mind and decide which value to use.

Also, I have 0 experience with go, but this seems like a very easy fix (read a variable from a file) and also the code might be really similar to what happens with *_TOKEN_FILE. So, if you are not in a hurry to get this fix, I might try to send you a pull request in the next few days :)

Il ven 31 gen 2025, 15:29 favonia @.***> ha scritto:

@tiamilani https://github.com/tiamilani Thanks for the suggestion and sorry for the late response. I have a question: if both SHOUTRRR and SHOUTRRR_FILE are present, should that be an error?

I am currently working on IPv6 prefix updating in #1023 https://github.com/favonia/cloudflare-ddns/pull/1023. I can work on SHOUTRRR_FILE after that.

— Reply to this email directly, view it on GitHub https://github.com/favonia/cloudflare-ddns/issues/1024#issuecomment-2627486805, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFPHAFPDXVSGAUH2OYIMGYD2NOCDLAVCNFSM6AAAAABV7GFZBWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMRXGQ4DMOBQGU . You are receiving this because you were mentioned.Message ID: @.***>

tiamilani avatar Jan 31 '25 19:01 tiamilani

@tiamilani For *_TOKEN and *_TOKEN_FILE, the updater is "maximally tolerant," meaning that as long as they have the same value, the updater will not complain. The additional complexity here is that SHOUTRRR can actually contain multiple URLs. Therefore, the "maximally tolerant" criterion should consider the reordering of the URLs.

favonia avatar Jan 31 '25 20:01 favonia