bitbeans / SimpleDnsCrypt

A simple management tool for dnscrypt-proxy
https://simplednscrypt.org
MIT License
2.31k stars 235 forks source link

Black/Whitelist issues #279

Open B00ze64 opened 6 years ago

B00ze64 commented 6 years ago

Good day.

  1. If I edit the toml file and give a relative path to blacklist_file= then SimpleDNSCrypt will hang while loading, and I will have to kill it, edit the toml file and provide an absolute path.

  2. It is unclear to me how the black/whitelists work since the paths that I select for the 3 files are not respected. There a 3 fields: "Blacklist" "Whitelist Rules" and "Blacklist Rules" in that order in the UI. The naming of these fields suggests that the final blacklist should be the first field called "Blacklist" and then we have 2 custom files from SimpleDNSCrypt labelled "Whitelist Rules" and "Blacklist Rules." But this is not how it works, I think you mis-labelled the fields. In reality, the "Blacklist" field at the top represents the custom Blacklist Rules for SimpleDNSCrypt, and the final filed labelled "Blacklist Rules" is in fact the final blacklist that will be passed to the proxy.

  3. What I want to do ultimately is use a BASE blacklist, which I build with the python script provided in the proxy package, then add custom rules using SimpleDNSCrypt and in the end build a final file that I would pass to the proxy. We are missing a field here: base blacklist [suggested improvement]. Basically SimpleDNSCrypt would be an editor for the files that I pass to the python script, i.e. I would never use SimpleDNSCrypt to build the blacklist.

  4. However right now I cannot use SimpleDNSCrypt at ALL if I want to do this unless I accept SimpleDNSCrypt's file paths for the black/white and final blacklist, because as soon as I start SimpleDNSCrypt, and it sees that the blacklist is enabled, it overwrites the path that I put in the toml file and resets it. It does this for quite a few things too - I just cannot use SimpleDNSCrypt since it keeps changing things that I set manually. Manually selected paths to logfiles and blacklists etc should be respected.

Regards,

B00ze64 commented 6 years ago

Hi @bitbeans.

While my "Logfile" wishes "Shopping List" bug is fairly accurate (e.g. do not strip unknown options from toml file, store all logs in SimpleDNS's own logs folder, there is a bug with Blocked.log where 2 logfiles are created, etc.) I have been having second thoughts about this shopping list here.

Let me review those points above:

  1. I'm pretty sure you mis-labelled the filename fields in the blacklist TAB. Easy to fix...

  2. A base blacklist would be cool, it would kinda make sense, but what I really would prefer is to use SimpleDNSCrypt to edit my personal blacklist/whitelist files, and keep using the python script to build the final blacklist. So there's no real need for me for having a base blacklist in SimpleDNSCrypt. If you like the idea tho, then sure, see if you feel like implementing it.

  3. Let me clarify number 4 above: Since I use the python script to generate my blacklist, and since it is located in a folder that's in the proxy's folder with my own filename, different than SimpleDNSCrypt defaults, I have to edit the toml file to make it point to my file. The problem is that as soon as I run SimpleDNSCrypt and it sees that the blacklist is enabled, it overwrites my filename with its own. I can no longer use SimpleDNSCrypt at all, unless I move my blacklist to where SimpleDNSCrypt wants it and make it the same name (I will do this tonight, it's a super simple change.) That's what I mean when I say SimpleDNSCrypt does not respect existing settings; I can work around it and be happy, and I will, but what else will I loose? Do you support comments in the custom blacklist/whitelist which are located in SimpleDNSCrypt's own folder? I guess I will find out later tonight lol - you should tho!

By the way, thanks to SimpleDNSCrypt I was able to get up and running very quickly with the proxy. Yes I am now editing the toml file, possibly using multiple sdns server lists (hoping to use Mastad0n's) thereby probably breaking SimpleDNSCrypt etc., but it is all because I was able to take it easy at first thanks to your program. Many thanks.

B00ze64 commented 6 years ago

Hi.

Ok so I played with SimpleDNSCrypt's blacklist/whitelist lists and they are really mixed-up.

First, you do not overwrite the blacklist_file= in the TOML (anymore?) but the UI still points to C:\DNSCrypt\dnscrypt-proxy\domain-blacklist.txt. This is kinda good for me, I can run the UI without messing with my paths, but I was kinda trying to work around this...

Second, rules that we add to the blacklist using the UI are added to C:\DNSCrypt\dnscrypt-proxy\domain-blacklist.txt rather than to C:\DNSCrypt\domain-blacklist.txt like they should. And when we MERGE the lists, you save the whole thing in C:\DNSCrypt\domain-blacklist.txt instead of C:\DNSCrypt\dnscrypt-proxy\domain-blacklist.txt.

Do you see what I mean when I say mis-labelled? It's a bit worse, as the files themselves are mixed-up...

Best Regards,