@ambipro, Thank you my friend
@buzzwallard, Yes the input parsed as string so port needing int conversion, and I made a ticket about it a few years ago google reminded me, and DjLegolas gracefully submitted PR,
commited later by Cas, so is already fixed in develop branch and will be in next deluge 2.1.2.
Instead of patching code locally, then personally would just simply edit hostlist.conf manually on client side i.e. with your example using localclient, then no need add anything to '/srv/deluge/.config/deluge/auth' and can just copy said localclient password of said auth file and paste into '~/.config/deluge/hostlist.conf' and replace old password of localclient entry, which is on the last line of entry, and then can just login as localclient with a return press in deluge-console afterwards.
You can add new entries also of-course, instead just using default localclient, just don't break the json formating, so add a comma after the entries end-bracket before copy/pasting in a new entry(duplicating old entry), and finally note that the top line of each entry contains an id, which needs be unique to show in connection manager, so e.g. flip a char somewhere in the id to make different from preceding entry. Don't need deluged stopped for editing hostlist.conf btw, only deluge-console(or whatever client in question) need not running for that.
Lastly, there's another relevant issue I thought mention, which I have a PR open for, but meanwhile then when changing settings in preferences pane of deluge-console, then press spacebar on Apply or OK, before pressing return/enter, to workaround current issue of settings not saved/applied, which just was a happy coincidense of the bug which I noticed we could take advantage off, instead of code-change, meanwhile.
Hope helps.