AdguardTeam / HostlistCompiler

A simple tool that compiles hosts blocklists from multiple sources
GNU General Public License v3.0
161 stars 20 forks source link

`.js` should not be processed as TLD #44

Open Alex-302 opened 1 year ago

Alex-302 commented 1 year ago

Sample rules from AdGuard DNS filter:

.3.n.2.1.l50.js
||113.17.188.*.js
.n.2.1.js^

Original issue: https://github.com/AdguardTeam/AdGuardSDNSFilter/issues/1224 https://github.com/AdguardTeam/AdGuardSDNSFilter/issues/1243

DandelionSprout commented 7 months ago

In theory, the same would apply to .png, .jpg, .jpeg, .webp, .gif, .mp4, .swf, .mp3, .avi, .ogg, .flac, .mkv, and .json, but personally I'd be wary of disqualifying such entries unless they end with ^ or |, or if it's a pure domain entry that starts with a letter or number.

Of the ones above, I know I've come across at least .gif, .jpg, and swf from time to time when converting lists into DNS lists.