Hi folks !
I run transmission behind nginx for some friends and im looking for a way to prevent the modification of certain values via RPC access, including "download-dir" and "cache-size-mb". I'm not familiar with the C language, my research leads me to the files to "daemon/remote.c" and "libtransmission/session.c." I apply some changes and build it to test on the value "start-added-torrents", unfortunately i can not prevent its modifcation :
I use transmissionrpc for Python to check that :
t = transmissionrpc.Client(...)
t.get_session().start_added_torrents
>> True
t.set_session(start_added_torrents=False)
t.get_session().start_added_torrents
>> False
Ideally, I would like to manage these values only from "settings.json."
A develloper can give me a little track?
Thanks
Restrict certain RPC changes
Re: Restrict certain RPC changes
The restrictions should probably be put into rpcimpl.c.
There's an open ticket similar to this, https://trac.transmissionbt.com/ticket/5019
There's an open ticket similar to this, https://trac.transmissionbt.com/ticket/5019
Re: Restrict certain RPC changes
Thanks, it work
I just comment out the condition on my choice "sessionGet" start at line 1534 on rpcimpl.c. It making the var readeable-only pretty well.
The idea to add a read-only mode seduce me, and im sure we are many on this case.
I think to something like that, on "settings.json" :
I just comment out the condition on my choice "sessionGet" start at line 1534 on rpcimpl.c. It making the var readeable-only pretty well.
The idea to add a read-only mode seduce me, and im sure we are many on this case.
I think to something like that, on "settings.json" :
Code: Select all
"rpc-read-only" : ["download-dir", "rpc-port", "cache-size-mb"],
Re: Restrict certain RPC changes
Hmm, I was thinking more along the lines of having a read-only mode.