Native RPC access to Deluge daemons
A few months ago I release go-rencode but not an application to showcase an useful task accomplished with it.
I have been using go-rencode to automatically download new Debian/Ubuntu distro releases through Deluge with a tiny Go library I created for the purpose, which is now available under GNU/GPL license v2.
Head over at https://github.com/gdm85/go-libdeluge to get the source code; as mentioned in its README, this is how to start downloading the latest LTS Ubuntu with the example add-torrent program, connecting to a localhost Deluge daemon instance:
DELUGE_PASSWORD="mypassword" bin/add-torrent magnet:?xt=urn:btih:C1939CA413B9AFCC34EA0CF3C128574E93FF6CB0&tr=http%3A%2F%2Ftorrent.ubuntu.com%3A6969%2Fannounce
It is important to note that this client library for Deluge RPC does not need a running web interface (deluge-web), as it communicates directly with the daemon in its native protocol. This also means you need to validate the magnet URIs before passing them to the daemon, otherwise it will add invalid torrents with a name constituted by a long sequence of zeroes. And probably there are vulnerabilities/bugs to be found in making RPC calls this way.
Many other methods available on the server can be implemented with a bit of patience and reverse engineering; enjoy and make proficient use of go-libdeluge!