compassd / dcompass

A high-performance programmable DNS component aiming at robustness, speed, and flexibility
GNU General Public License v3.0
283 stars 23 forks source link

[FEAT] oisd and other host block lists #63

Closed bcookatpcsd closed 3 years ago

bcookatpcsd commented 3 years ago

The ability to read blocked hosts from a text file.

https://dbl.oisd.nl/ https://easylist-downloads.adblockplus.org/easylist_noelemhide.txt https://raw.githubusercontent.com/AdAway/adaway.github.io/master/hosts.txt

etc..

LEXUGE commented 3 years ago

I think the first list is already supported by current domain matcher.

As for the second one, it is out of the scope of the DNS because URLs are unable to be obtained by the DNS. And blocking the main parts makes no sense, else the whole website will cease to work.

The last one should better be done by a text editor by deleting all the 127.0.0.1.

bcookatpcsd commented 3 years ago

Still working my way through this..

Syntax is difficult.. (might just be me) but I cannot figure out when it's a [], or {}..

running at home on void linux (musl)

What is the difference between:

dcompass-x86_64-unknown-linux-musl

and

dcompass-x86_64-unknown-linux-musl-full

(somewhat OT)

This site has been invaluable.. https://www.convertjson.com/yaml-to-json.htm

Finally got something going late last night, was noticeably faster loading on my iphone via wifi.

Will try on vpn today as well..

Thank you for your responses.

{
   "verbosity": "info",
   "cache_size": 4096,
   "address": "192.168.10.64:53",
   "table": {
      "start": {
         "if": {
            "domain": [
            {
               "file": "/etc/dnscrypt-proxy/blocked-names.txt"
            }
            ]
         },
         "then":  [
            "blackhole",
            "end"
         ],
         "else": [
            "dispatch"
         ]
      },
      "dispatch": {
         "if": "any",
         "then": [
            {
               "query": "secure"
            },
            "check_ipv6"
         ]
      },
      "check_ipv6": {
         "if": {
               "qtype": [
                  "AAAA"
               ]
         },
     "then": [
         "blackhole",
         "end"
    ],
         "else": [
            {
               "query": "secure"
            },
            "end"
         ]
      }
   },
   "upstreams": {
      "cloudflare": {
         "https": {
            "no_sni": true,
            "name": "cloudflare-dns.com",
            "addr": "1.1.1.1:443"
         }
      },
      "quad9": {
         "https": {
            "no_sni": true,
            "name": "dns.quad9.net",
            "addr": "9.9.9.9:443"
         }
      },
      "secure": {
         "hybrid": [
            "cloudflare",
            "quad9"
         ]
      }
   }
}
LEXUGE commented 3 years ago

The full version contains built-in GeoIP database, while the normal version doesn't, because some users want it smaller on an embedded device.

LEXUGE commented 3 years ago

If you have any further problems, please feel free to reopen it. As for now, I am closing because this is inactive for an extended period.