reject-data-source.js 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  1. // @ts-check
  2. /** @type {[string, boolean][]} */
  3. const HOSTS = [
  4. ['https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&showintro=0&mimetype=plaintext', true],
  5. ['https://raw.githubusercontent.com/hoshsadiq/adblock-nocoin-list/master/hosts.txt', false],
  6. ['https://raw.githubusercontent.com/crazy-max/WindowsSpyBlocker/master/data/hosts/spy.txt', false],
  7. ['https://raw.githubusercontent.com/jerryn70/GoodbyeAds/master/Extension/GoodbyeAds-Xiaomi-Extension.txt', false],
  8. ['https://raw.githubusercontent.com/jdlingyu/ad-wars/master/hosts', false]
  9. ]
  10. const ADGUARD_FILTERS = /** @type {const} */([
  11. // Easy List
  12. [
  13. 'https://easylist.to/easylist/easylist.txt',
  14. [
  15. 'https://easylist-downloads.adblockplus.org/easylist.txt',
  16. 'https://raw.githubusercontent.com/easylist/easylist/gh-pages/easylist.txt',
  17. 'https://secure.fanboy.co.nz/easylist.txt'
  18. ],
  19. false
  20. ],
  21. // Easy Privacy
  22. [
  23. 'https://easylist.to/easylist/easyprivacy.txt',
  24. [
  25. 'https://secure.fanboy.co.nz/easyprivacy.txt',
  26. 'https://raw.githubusercontent.com/easylist/easylist/gh-pages/easyprivacy.txt',
  27. 'https://easylist-downloads.adblockplus.org/easyprivacy.txt'
  28. ],
  29. false
  30. ],
  31. // AdGuard DNS Filter
  32. [
  33. 'https://adguardteam.github.io/AdGuardSDNSFilter/Filters/filter.txt',
  34. [
  35. 'https://filters.adtidy.org/extension/chromium/filters/15.txt'
  36. ]
  37. ],
  38. // AdGuard CNAME Filter Combined
  39. 'https://raw.githubusercontent.com/AdguardTeam/cname-trackers/master/combined_disguised_trackers.txt',
  40. // uBlock Origin Filter List
  41. [
  42. 'https://ublockorigin.github.io/uAssets/filters/filters.txt',
  43. [
  44. 'https://ublockorigin.github.io/uAssetsCDN/filters/filters.txt',
  45. 'https://ublockorigin.pages.dev/filters/filters.txt'
  46. ],
  47. false
  48. ],
  49. [
  50. 'https://ublockorigin.github.io/uAssets/filters/filters-2020.txt',
  51. [
  52. 'https://ublockorigin.github.io/uAssetsCDN/filters/filters-2020.txt',
  53. 'https://ublockorigin.pages.dev/filters/filters-2020.txt'
  54. ],
  55. false
  56. ],
  57. [
  58. 'https://ublockorigin.github.io/uAssets/filters/filters-2021.txt',
  59. [
  60. 'https://ublockorigin.github.io/uAssetsCDN/filters/filters-2021.txt',
  61. 'https://ublockorigin.pages.dev/filters/filters-2021.txt'
  62. ],
  63. false
  64. ],
  65. [
  66. 'https://ublockorigin.github.io/uAssets/filters/filters-2022.txt',
  67. [
  68. 'https://ublockorigin.github.io/uAssetsCDN/filters/filters-2022.txt',
  69. 'https://ublockorigin.pages.dev/filters/filters-2022.txt'
  70. ],
  71. false
  72. ],
  73. [
  74. 'https://ublockorigin.github.io/uAssets/filters/filters-2023.txt',
  75. [
  76. 'https://ublockorigin.github.io/uAssetsCDN/filters/filters-2023.txt',
  77. 'https://ublockorigin.pages.dev/filters/filters-2023.txt'
  78. ],
  79. false
  80. ],
  81. // uBlock Origin Badware Risk List
  82. [
  83. 'https://ublockorigin.github.io/uAssets/filters/badware.txt',
  84. [
  85. 'https://ublockorigin.github.io/uAssetsCDN/filters/badware.txt',
  86. 'https://ublockorigin.pages.dev/filters/badware.txt'
  87. ],
  88. false
  89. ],
  90. // uBlock Origin Privacy List
  91. [
  92. 'https://ublockorigin.github.io/uAssets/filters/privacy.txt',
  93. [
  94. 'https://ublockorigin.github.io/uAssetsCDN/filters/privacy.txt',
  95. 'https://ublockorigin.pages.dev/filters/privacy.txt'
  96. ],
  97. false
  98. ],
  99. // uBlock Origin Resource Abuse
  100. [
  101. 'https://ublockorigin.github.io/uAssets/filters/resource-abuse.txt',
  102. [
  103. 'https://ublockorigin.github.io/uAssetsCDN/filters/resource-abuse.txt',
  104. 'https://ublockorigin.pages.dev/filters/resource-abuse.txt'
  105. ],
  106. false
  107. ],
  108. // uBlock Origin Unbreak
  109. [
  110. 'https://ublockorigin.github.io/uAssets/filters/unbreak.txt',
  111. [
  112. 'https://ublockorigin.github.io/uAssetsCDN/filters/unbreak.txt',
  113. 'https://ublockorigin.pages.dev/filters/unbreak.txt'
  114. ],
  115. false
  116. ],
  117. // AdGuard Base Filter
  118. 'https://filters.adtidy.org/extension/ublock/filters/2_without_easylist.txt',
  119. // AdGuard Mobile AD
  120. 'https://filters.adtidy.org/extension/ublock/filters/11_optimized.txt',
  121. // AdGuard Tracking Protection
  122. 'https://filters.adtidy.org/extension/ublock/filters/3_optimized.txt',
  123. // AdGuard Japanese filter
  124. 'https://filters.adtidy.org/extension/ublock/filters/7_optimized.txt',
  125. // AdGuard Chinese filter (EasyList China + AdGuard Chinese filter)
  126. 'https://filters.adtidy.org/extension/ublock/filters/224_optimized.txt',
  127. // AdGuard Annoyances filter
  128. 'https://filters.adtidy.org/android/filters/14_optimized.txt',
  129. // EasyList Germany filter
  130. [
  131. 'https://easylist.to/easylistgermany/easylistgermany.txt',
  132. [
  133. 'https://easylist-downloads.adblockplus.org/easylistgermany.txt'
  134. ],
  135. false
  136. ],
  137. // Curben's UrlHaus Malicious URL Blocklist
  138. [
  139. 'https://curbengh.github.io/urlhaus-filter/urlhaus-filter-agh-online.txt',
  140. [
  141. 'https://urlhaus-filter.pages.dev/urlhaus-filter-agh-online.txt',
  142. // Prefer mirror, since malware-filter.gitlab.io has not been updated for a while
  143. // 'https://malware-filter.gitlab.io/urlhaus-filter/urlhaus-filter-agh-online.txt'
  144. ],
  145. false
  146. ],
  147. // Curben's Phishing URL Blocklist
  148. [
  149. 'https://curbengh.github.io/phishing-filter/phishing-filter-agh.txt',
  150. [
  151. 'https://phishing-filter.pages.dev/phishing-filter-agh.txt',
  152. // Prefer mirror, since malware-filter.gitlab.io has not been updated for a while
  153. // 'https://malware-filter.gitlab.io/malware-filter/phishing-filter-agh.txt'
  154. ],
  155. false
  156. ],
  157. // Curben's PUP Domains Blocklist
  158. [
  159. 'https://curbengh.github.io/pup-filter/pup-filter-agh.txt',
  160. [
  161. 'https://pup-filter.pages.dev/pup-filter-agh.txt',
  162. // Prefer mirror, since malware-filter.gitlab.io has not been updated for a while
  163. // 'https://malware-filter.gitlab.io/malware-filter/pup-filter-agh.txt'
  164. ],
  165. false
  166. ],
  167. // GameConsoleAdblockList
  168. 'https://raw.githubusercontent.com/DandelionSprout/adfilt/master/GameConsoleAdblockList.txt',
  169. // PiHoleBlocklist
  170. 'https://raw.githubusercontent.com/Perflyst/PiHoleBlocklist/master/SmartTV-AGH.txt',
  171. // Spam404
  172. 'https://raw.githubusercontent.com/Spam404/lists/master/adblock-list.txt',
  173. // BarbBlock
  174. 'https://paulgb.github.io/BarbBlock/blacklists/ublock-origin.txt',
  175. // Brave First Party & First Party CNAME
  176. 'https://raw.githubusercontent.com/brave/adblock-lists/master/brave-lists/brave-firstparty.txt',
  177. 'https://raw.githubusercontent.com/brave/adblock-lists/master/brave-lists/brave-firstparty-cname.txt',
  178. 'https://raw.githubusercontent.com/brave/adblock-lists/master/coin-miners.txt'
  179. ]);
  180. const PREDEFINED_WHITELIST = [
  181. 'localhost',
  182. 'broadcasthost',
  183. 'ip6-loopback',
  184. 'ip6-localnet',
  185. 'ip6-mcastprefix',
  186. 'ip6-allnodes',
  187. 'ip6-allrouters',
  188. 'ip6-allhosts',
  189. 'mcastprefix',
  190. 'skk.moe',
  191. 'analytics.google.com',
  192. 'msa.cdn.mediaset.net', // Added manually using DOMAIN-KEYWORDS
  193. 'cloud.answerhub.com',
  194. 'ae01.alicdn.com',
  195. 'whoami.akamai.net',
  196. 'whoami.ds.akahelp.net',
  197. 'pxlk9.net.', // This one is malformed from EasyList, which I will manually add instead
  198. 'instant.page', // No, it doesn't violate anyone's privacy. I will whitelist it
  199. 'piwik.pro',
  200. 'mixpanel.com',
  201. 'cdn.mxpnl.com',
  202. 'heapanalytics.com',
  203. 'segment.com',
  204. 'segmentify.com',
  205. 't.co', // pgl yoyo add t.co to the blacklist
  206. 'survicate.com', // AdGuardDNSFilter
  207. 'perfops.io', // AdGuardDNSFilter
  208. 'd2axgrpnciinw7.cloudfront.net', // ADGuardDNSFilter
  209. 'tb-lb.sb-cd.com', // AdGuard
  210. 'storage.yandexcloud.net', // phishing list
  211. 'login.microsoftonline.com', // phishing list
  212. 'api.xiaomi.com', // https://github.com/jerryn70/GoodbyeAds/issues/281
  213. 'api.io.mi.com', // https://github.com/jerryn70/GoodbyeAds/issues/281
  214. 'cdn.userreport.com', // https://github.com/AdguardTeam/AdGuardSDNSFilter/issues/1158
  215. 'ip-api.com',
  216. 'fastly-analytics.com',
  217. 'syd1.digitaloceanspaces.com',
  218. 's3.nl-ams.scw.cloud',
  219. 'geolocation-db.com'
  220. ];
  221. const PREDEFINED_ENFORCED_BACKLIST = [
  222. 'telemetry.mozilla.org'
  223. ];
  224. module.exports.HOSTS = HOSTS;
  225. module.exports.ADGUARD_FILTERS = ADGUARD_FILTERS;
  226. module.exports.PREDEFINED_WHITELIST = PREDEFINED_WHITELIST;
  227. module.exports.PREDEFINED_ENFORCED_BACKLIST = PREDEFINED_ENFORCED_BACKLIST;