0xERR0R / blocky

Fast and lightweight DNS proxy as ad-blocker for local network with many features
https://0xERR0R.github.io/blocky/
Apache License 2.0
4.81k stars 210 forks source link

startStrategy: fast inline regex not working? #799

Closed bcookatpcsd closed 1 year ago

bcookatpcsd commented 1 year ago
blocking:
  startStrategy: fast
  blockType: zeroIp
  blockTTL: 10m
  refreshPeriod: 24h
  blackLists:
    ads:
      - /etc/blocky/listblock.txt
      - https://github.com/sjhgvr/oisd/raw/main/hosts_nsfw.txt
      - https://github.com/sjhgvr/oisd/raw/main/hosts_full.txt
      - https://raw.githubusercontent.com/crazy-max/WindowsSpyBlocker/master/data/hosts/spy.txt
      - https://gitlab.com/ZeroDot1/CoinBlockerLists/-/raw/master/hosts
      - https://raw.githubusercontent.com/hoshsadiq/adblock-nocoin-list/master/hosts.txt
      - |
        /unblocked/
        /\.lan$/
        /\.lan1$/
        /\.home$/
        /\.localdomain$/
        /\.workgroup$/

  whiteLists:
    ads:
      - /etc/blocky/listallow.txt
  clientGroupsBlock:
    default:
      - ads

with fast enabled..

;; ->>HEADER<<- opcode: QUERY, rcode: NOERROR, id: 25770
;; flags: qr rd ra ; QUERY: 1, ANSWER: 10, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;; unblocked-games.s3.amazonaws.com.    IN      A

;; ANSWER SECTION:
unblocked-games.s3.amazonaws.com.       2400    IN      CNAME   s3-1-w.amazonaws.com.
s3-1-w.amazonaws.com.   2400    IN      CNAME   s3-w.us-east-1.amazonaws.com.
s3-w.us-east-1.amazonaws.com.   2400    IN      A       52.217.10.228
s3-w.us-east-1.amazonaws.com.   2400    IN      A       54.231.129.105
s3-w.us-east-1.amazonaws.com.   2400    IN      A       52.217.141.113
s3-w.us-east-1.amazonaws.com.   2400    IN      A       52.217.104.28
s3-w.us-east-1.amazonaws.com.   2400    IN      A       52.217.161.201
s3-w.us-east-1.amazonaws.com.   2400    IN      A       52.216.97.155
s3-w.us-east-1.amazonaws.com.   2400    IN      A       52.216.50.241
s3-w.us-east-1.amazonaws.com.   2400    IN      A       52.217.85.244

;; AUTHORITY SECTION:

;; ADDITIONAL SECTION:

;; Query time: 7 msec
;; EDNS: version 0; flags: ; udp: 512
;; SERVER: 10.20.0.43
;; WHEN: Tue Dec 13 11:37:41 2022
;; MSG SIZE  rcvd: 239

(looks like it passed)

;; ->>HEADER<<- opcode: QUERY, rcode: NOERROR, id: 50399
;; flags: qr rd ra ; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;; unblocked-games.s3.amazonaws.com.    IN      A

;; ANSWER SECTION:
unblocked-games.s3.amazonaws.com.       600     IN      A       0.0.0.0

;; AUTHORITY SECTION:

;; ADDITIONAL SECTION:

;; Query time: 0 msec
;; SERVER: 10.20.0.43
;; WHEN: Tue Dec 13 11:38:45 2022
;; MSG SIZE  rcvd: 66

fast disabled..

Even with all lists commented out.. if fast is enabled.. it seems I cannot get the regex..

(random)

s/blackList/blockList s/whiteList/allowList

Thank you in advance..

0xERR0R commented 1 year ago

I can reproduce it. Looks like a bug.