First I disabled the bittorent service in NAS4Free.
Then I created a new jail following these instructions: Jails-how-to
And then I added Deluge to the jail following this: [HOWTO] Install Deluge in Finch / Qjail.
All in all this went rather smoothly. I can access Deluge from the browser with a webclient using IP:8112 (in my case http://192.168.0.252:8112). I'm using this checkMyTorrentIp.png.torrent to see if I'm using my actual IP or the proxy IP. At the moment I'm using my actual IP as I didn't setup a proxy yet.
Alternatively you can install Deluge in Windows. Uncheck Classic Mode in interface, restart Deluge and choose the Deluge daemon on your NAS box:
Next I setup the proxy. Choose preferences. Choose proxy. And fill out the proxy settings:
Choose apply and now the IP address in checkmytorrentip.net should show the proxy IP. Which in my case didn't. To overcome this I had to change the config.
First I saw that after starting deluge on NAS4Free I received an error:
/usr/local/etc/rc.d/deluged start
..
RuntimeError: Protocol not supported
To fix this error, do /usr/local/etc/rc.d/deluged stop and do /usr/local/etc/rc.d/delug_web stop
Now edit /usr/local/deluge/.config/deluge/core.conf and change and save.
"listen_interface": "", --> "listen_interface": "
Second remove /usr/local/deluge/.config/deluge/session.state
Now /usr/local/etc/rc.d/deluged start and in checkmytorrentip.net should show the proxy IP.