specifically for aria2, there's the list extra_settings '' line, which i am about to make ample use of, since none of the extremely essential settings about which port to use (and open on the firewall) are present on the regular settings.
On the docs i can only see "list" being used for things like list 'eth0,eth1' but for aria settings i will need to pass in complex key=value lists, how do i encode it there?
# We do not support all options at this time. But you can add any option
# with 'list extra_settings'.
I have no idea which one is available or not.
I just assumed the ones in the default config file were present, all others should go into "extra_settings"... even tho the example rpc_secret is not there
So I actually went with the default set of ports and just opened them all up... but still have some settings i have no idea how to use. Also the syntax is different from aria and opkg aria...
for the opkg config file i have to replace - with _, but the resulting file in /var/etc/aria.conf have the usual -... i'm assuming the text in "extra_config" will be put there as is?
i'm testing with
list extra_settings 'bt-save-metadata=true,max-upload-limit=2M,seed-ratio=2.0,'
after some more trials, seems I just have to repeat them
list extra_settings 'enable-rpc=true'
list extra_settings 'rpc-allow-origin-all=false'
list extra_settings 'rpc-listen-all=false'
and hope whatever is reading the resulting file accepts the last-most duplicate line for the harmful defaults i want to override, as oposed to first-most (like .ssh/config etc)
edit: for aria adding lines to the bottom does override
First, the most important, the config module for some services have a feature where they convert a curated list of settings. They provide you snake_case settings and output a file that uses kebab-case (or whatever the generated file uses). BUT not all settings are in that list, and the ones that are not will just be ignored! And sometime the ignored setting have a default value!
Second, i'm saying that there is a catch-all option called extra_settings, which takes a list type (reason of my question, it is not well documented) and put that on the final conf file "as is" at the bottom (important for point #3 bellow). I figured out that the "list" type is just a string type where you can specify it several times and it adds, instead of overriding itself. One line at a time.
third, i connect the two points. From point #1, if the resulting setting have a=1 and does not provide a way to set a... you have to set it via extra_settings. Then your final generated config file will have a=1 from the fixed template and at the bottom a=2 that you set via extra_settings. Which for aria was fine, but if i needed this for a service where first-match-wins, like ssh_config, i'd be screwed.