TechnitiumSoftware / DnsServer

Technitium DNS Server
https://technitium.com/dns/
GNU General Public License v3.0
4.46k stars 431 forks source link

Advanced blocking app using regex block list urls doesn't work #327

Closed zpxp closed 3 years ago

zpxp commented 3 years ago

Setting the regexBlockListUrls property in advanced blocking app config to "https://raw.githubusercontent.com/slyfox1186/pihole.youtube.blocklist/main/blacklist/youtube-regex-filters.txt" does not block this domain r3---sn-fpqxc5oq-2xge.googlevideo.com , however when I copy the file contents into the blockedRegex config property array the domain is blocked.

Config that doesnt work

{
  "enableBlocking": true,
  "blockListUrlUpdateIntervalHours": 24,
  "networkGroupMap": {
    "0.0.0.0/0": "everyone"
  },
  "groups": [
    {
      "name": "everyone",
      "enableBlocking": true,
      "allowTxtBlockingReport": true,
      "blockAsNxDomain": false,
      "blockingAddresses": [
        "0.0.0.0",
        "::"
      ],
      "allowed": [],
      "blocked": [
        "testexample.com"
      ],
      "allowListUrls": [],
      "blockListUrls": [      ],
      "allowedRegex": [],
      "blockedRegex": [
        "^ads\\."
      ],
      "regexAllowListUrls": [],
      "regexBlockListUrls": [
"https://raw.githubusercontent.com/slyfox1186/pihole.youtube.blocklist/main/blacklist/youtube-regex-filters.txt",
"https://raw.githubusercontent.com/slyfox1186/pihole.youtube.blocklist/main/blacklist/additional-regex-filters.txt"
],
      "adblockListUrls": []
    }
  ]
}

Config that does work

{
  "enableBlocking": true,
  "blockListUrlUpdateIntervalHours": 24,
  "networkGroupMap": {
    "0.0.0.0/0": "everyone"
  },
  "groups": [
    {
      "name": "everyone",
      "enableBlocking": true,
      "allowTxtBlockingReport": true,
      "blockAsNxDomain": false,
      "blockingAddresses": [
        "0.0.0.0",
        "::"
      ],
      "allowed": [],
      "blocked": [
        "testexample.com"
      ],
      "allowListUrls": [],
      "blockListUrls": [      ],
      "allowedRegex": [],
      "blockedRegex": [
        "^ads\\.",
"^beacons\\.gv[a-z\\d]+?\\.com$",
"^clients\\d+?\\.google\\.com$",
"^clients\\d+?\\.youtube\\.com$",
"^r[\\d\\-]+?sn-8xgp1vo-xfgd\\.googlevideo\\.com$",
"^r[\\d\\-]+?sn-8xgp1vo-xfgee\\.googlevideo\\.com$",
"^r[\\d\\-]+?sn-p5qs7n7s\\.googlevideo\\.com$",
"^r[\\d\\.]+?sn.*googlevideo\\.com$",
"^r[\\d\\-]+?sn[\\w\\-\\.]+?googlevideo\\.com$",
"^[\\w\\-\\.]*?google(?:adservices|apis|syndication|usercontent)?\\.com$",
"^[\\w\\-\\.]*?l\\.google\\.com$",
"^[\\w\\-\\.]*?manifest\\.googlevideo\\.com$",
"^[\\w\\-\\.]*?double(?:lick|click)\\.net$"
      ],
      "regexAllowListUrls": [],
      "regexBlockListUrls": [
"https://raw.githubusercontent.com/slyfox1186/pihole.youtube.blocklist/main/blacklist/youtube-regex-filters.txt",
"https://raw.githubusercontent.com/slyfox1186/pihole.youtube.blocklist/main/blacklist/additional-regex-filters.txt"
],
      "adblockListUrls": []
    }
  ]
}
ShreyasZare commented 3 years ago

Thanks for the feedback. I have found the bug. Will get a fix released soon.

ShreyasZare commented 3 years ago

An update for the DNS server is now available with an update for the Advanced Blocking app that fixes this issue. Do update the DNS server first and then the app.