Yeah I wanted to give it a few days to check it persists before explaining it. I didn't do much differently from what was written here by Xentrk and some others. The only thing different was specifically using dnsmasq.conf.add to add lines to dnsmasq.conf, as otherwise the changes don't persist. I guess thats probably quite elementary to most people here.
I can give you the gist of what I did though:
1. Enable jffs partition and dns filtering like in the wiki. (Also give your streaming device a manual static ip)
2. Start your TCP protocol VPN Client 1 and set DNS to Exclusive and Policy Rules (Strict). Enter streaming box fixed ip and then 0.0.0.0 so for example. "192.168.1.100 0.0.0.0 VPN". This is temporary, just so that you can grab all the domains you need. Check that you can surf and play iPlayer on your streaming box.
3. Open winSCP or the like and create a folder - /tmp/mnt/logs/
4. Go to /jffs/configs and create dnsmasq.conf.add file
5.Write in it
domain-needed
log-facility=/tmp/mnt/logs/dnsmasq.log
log-async=5
log-queries
6. Save it.
7. Open Putty and enter "cd /tmp/mnt/logs/" then "service restart_dnsmasq" then "tail -f dnsmasq.log > logfile"
8. Open iPlayer on your streaming device and watch some things, go to different pages of the app, load up some live tv, some archived shows, etc.
9. Go back to Putty and press Ctrl - C to stop the tail.
10. Go back to winSCP /tmp/mnt/logs/ and hit Refresh, (Ctrl R). You should have a file called logfile now.
11. Go to /jffs/scripts/
12. Create a blank file called BBCdns.
13. Create a blank file called getdomainnames.sh and write in the following code but in place of 192.168.1.100 type in your streaming box fixed IP.
https://pastebin.com/raw/pBydGJmu
14. Make sure you have correct permissions (I think 0777) and make the script executable by entering command "chmod a+rx /jffs/scripts/getdomainnames.sh"
15. Type command "sh getdomainnames.sh logfile" hit enter to run the script. This filters out the dnsmasq tail log stuff that is relevant to your streaming box and creates list of domains that were accessed and writes them to BBCdns file.
16. Inspect domains trawled. Add any others you have seen around (Xentrk has a long list). Remove ones that are clearly not related, although be careful as some appear unrelated, but it breaks without these.
17. Create a file called OVPNC1 and write in it the fixed IP of your streaming box. Save.
18. Create another script called "IPSET_VPN_Routing.sh"
19. Enter this code:
https://pastebin.com/raw/VigxYAaN
20. Make executable and ensure correct permissions.
21. Remove Policy Rule for your router from your VPN Client GUI page, but leave Redirect Internet Traffic on Policy Rules (strict) - Not sure if that is necessary, but it works for me.
22. Run script "sh IPSET_VPN_Routing.sh"
23. Check that your streaming box works and that BBC iPlayer works at the same time as Netflix or some US based streaming service also runs. If it doesn't put your hands in the air and scream. (Throw your streaming box out the window.) If it does, go to step 24.
24. Rejoice.
25. Figure out if you need this script to run on WAN/ NAT/ VPN start, in which case you will have to ask someone in more of the know how to ensure that, or just experiment with the naming of the script or both.
26. Tell me what you did in step 25.
27. I have heard it said that you should probably stop the dnsmasq logging as it might burn out a partition? If true then rename dnsmasq.conf.add to something like dnsmasq.conf.donotadd
28. Monitor over a few days to weeks and if it stops working, recheck the domains and add them to the BBCdns file.
Done.