reject-data-source.ts 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230
  1. import { TTL } from './cache-filesystem';
  2. export const HOSTS = [
  3. ['https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&showintro=0&mimetype=plaintext', true],
  4. ['https://someonewhocares.org/hosts/hosts', true],
  5. // no coin list is not actively maintained, but it updates daily when being maintained, so we set a 3 days cache ttl
  6. ['https://raw.githubusercontent.com/hoshsadiq/adblock-nocoin-list/master/hosts.txt', false, false, TTL.THREE_DAYS()],
  7. // have not been updated for more than a year, so we set a 14 days cache ttl
  8. ['https://raw.githubusercontent.com/crazy-max/WindowsSpyBlocker/master/data/hosts/spy.txt', true, false, TTL.TWO_WEEKS()],
  9. ['https://raw.githubusercontent.com/jerryn70/GoodbyeAds/master/Extension/GoodbyeAds-Xiaomi-Extension.txt', false, false, TTL.THREE_DAYS()],
  10. ['https://raw.githubusercontent.com/jerryn70/GoodbyeAds/master/Extension/GoodbyeAds-Huawei-AdBlock.txt', false, false, TTL.THREE_DAYS()],
  11. // ad-wars is not actively maintained, so we set a 7 days cache ttl
  12. ['https://raw.githubusercontent.com/jdlingyu/ad-wars/master/hosts', false, false, TTL.ONE_WEEK()],
  13. ['https://raw.githubusercontent.com/durablenapkin/block/master/luminati.txt', true],
  14. // CoinBlockerList
  15. // Although the hosts file is still actively maintained, the hosts_browser file is not updated since 2021-07, so we set a 14 days cache ttl
  16. ['https://zerodot1.gitlab.io/CoinBlockerLists/hosts_browser', true, true, TTL.TWO_WEEKS()],
  17. // Curben's UrlHaus Malicious URL Blocklist
  18. // 'https://curbengh.github.io/urlhaus-filter/urlhaus-filter-agh-online.txt',
  19. // 'https://urlhaus-filter.pages.dev/urlhaus-filter-agh-online.txt',
  20. ['https://curbengh.github.io/urlhaus-filter/urlhaus-filter-hosts.txt', true, true],
  21. // Curben's Phishing URL Blocklist
  22. // Covered by lib/get-phishing-domains.ts
  23. // 'https://curbengh.github.io/phishing-filter/phishing-filter-agh.txt'
  24. // 'https://phishing-filter.pages.dev/phishing-filter-agh.txt'
  25. // ['https://curbengh.github.io/phishing-filter/phishing-filter-hosts.txt', true, true],
  26. // Curben's PUP Domains Blocklist
  27. // 'https://curbengh.github.io/pup-filter/pup-filter-agh.txt'
  28. // 'https://pup-filter.pages.dev/pup-filter-agh.txt'
  29. // The PUP filter has paused the update since 2023-05, so we set a 14 days cache ttl
  30. ['https://curbengh.github.io/pup-filter/pup-filter-hosts.txt', true, true, TTL.TWO_WEEKS()]
  31. ] as const;
  32. export const DOMAIN_LISTS = [
  33. // BarbBlock
  34. // The barbblock list has never been updated since 2019-05, so we set a 14 days cache ttl
  35. ['https://paulgb.github.io/BarbBlock/blacklists/domain-list.txt', true, TTL.TWO_WEEKS()],
  36. // DigitalSide Threat-Intel - OSINT Hub
  37. // Update once per day
  38. ['https://osint.digitalside.it/Threat-Intel/lists/latestdomains.txt', true, 24 * 60 * 60 * 1000],
  39. // AdGuard CNAME Filter Combined
  40. // Update on a 7 days basis, so we add a 3 hours cache ttl
  41. ['https://raw.githubusercontent.com/AdguardTeam/cname-trackers/master/data/combined_disguised_ads_justdomains.txt', true, TTL.THREE_DAYS()],
  42. ['https://raw.githubusercontent.com/AdguardTeam/cname-trackers/master/data/combined_disguised_trackers_justdomains.txt', true, TTL.THREE_DAYS()],
  43. ['https://raw.githubusercontent.com/AdguardTeam/cname-trackers/master/data/combined_disguised_clickthroughs_justdomains.txt', true, TTL.THREE_DAYS()],
  44. ['https://raw.githubusercontent.com/AdguardTeam/cname-trackers/master/data/combined_disguised_microsites_justdomains.txt', true, TTL.THREE_DAYS()],
  45. ['https://raw.githubusercontent.com/AdguardTeam/cname-trackers/master/data/combined_disguised_mail_trackers_justdomains.txt', true, TTL.THREE_DAYS()]
  46. ] as const;
  47. export const ADGUARD_FILTERS = [
  48. // EasyList
  49. [
  50. 'https://easylist.to/easylist/easylist.txt',
  51. [
  52. 'https://easylist-downloads.adblockplus.org/easylist.txt',
  53. 'https://raw.githubusercontent.com/easylist/easylist/gh-pages/easylist.txt',
  54. 'https://secure.fanboy.co.nz/easylist.txt',
  55. 'https://ublockorigin.github.io/uAssetsCDN/thirdparties/easylist.txt',
  56. 'https://ublockorigin.pages.dev/thirdparties/easylist.txt'
  57. ],
  58. TTL.TWLVE_HOURS()
  59. ],
  60. // EasyPrivacy
  61. [
  62. 'https://easylist.to/easylist/easyprivacy.txt',
  63. [
  64. 'https://secure.fanboy.co.nz/easyprivacy.txt',
  65. 'https://raw.githubusercontent.com/easylist/easylist/gh-pages/easyprivacy.txt',
  66. 'https://easylist-downloads.adblockplus.org/easyprivacy.txt',
  67. 'https://ublockorigin.github.io/uAssetsCDN/thirdparties/easyprivacy.txt',
  68. 'https://ublockorigin.pages.dev/thirdparties/easyprivacy.txt'
  69. ],
  70. TTL.TWLVE_HOURS()
  71. ],
  72. // AdGuard DNS Filter
  73. [
  74. 'https://adguardteam.github.io/AdGuardSDNSFilter/Filters/filter.txt',
  75. [
  76. 'https://filters.adtidy.org/extension/ublock/filters/15_optimized.txt',
  77. 'https://adguardteam.github.io/HostlistsRegistry/assets/filter_1.txt'
  78. ],
  79. TTL.TWLVE_HOURS()
  80. ],
  81. // uBlock Origin Filter List
  82. [
  83. 'https://ublockorigin.github.io/uAssetsCDN/filters/filters.min.txt',
  84. [
  85. 'https://ublockorigin.pages.dev/filters/filters.min.txt'
  86. ]
  87. ],
  88. // uBlock Origin Badware Risk List
  89. [
  90. 'https://ublockorigin.github.io/uAssetsCDN/filters/badware.min.txt',
  91. [
  92. 'https://ublockorigin.pages.dev/filters/badware.min.txt'
  93. ]
  94. ],
  95. // uBlock Origin Privacy List
  96. [
  97. 'https://ublockorigin.github.io/uAssetsCDN/filters/privacy.min.txt',
  98. [
  99. 'https://ublockorigin.pages.dev/filters/privacy.min.txt'
  100. ]
  101. ],
  102. // uBlock Origin Resource Abuse: merged in uBlock Origin Privacy List
  103. // [
  104. // 'https://ublockorigin.github.io/uAssetsCDN/filters/resource-abuse.txt',
  105. // [
  106. // 'https://ublockorigin.pages.dev/filters/resource-abuse.txt'
  107. // ]
  108. // ],
  109. // uBlock Origin Unbreak
  110. [
  111. 'https://ublockorigin.github.io/uAssetsCDN/filters/unbreak.min.txt',
  112. [
  113. 'https://ublockorigin.pages.dev/filters/unbreak.min.txt'
  114. ]
  115. ],
  116. // AdGuard Base Filter
  117. 'https://filters.adtidy.org/extension/ublock/filters/2_without_easylist.txt',
  118. // AdGuard Mobile AD
  119. 'https://filters.adtidy.org/extension/ublock/filters/11_optimized.txt',
  120. // AdGuard Tracking Protection
  121. 'https://filters.adtidy.org/extension/ublock/filters/3_optimized.txt',
  122. // AdGuard Japanese filter
  123. 'https://filters.adtidy.org/extension/ublock/filters/7_optimized.txt',
  124. // AdGuard Chinese filter (EasyList China + AdGuard Chinese filter)
  125. 'https://filters.adtidy.org/extension/ublock/filters/224_optimized.txt',
  126. // AdGuard Annoyances filter
  127. 'https://filters.adtidy.org/android/filters/14_optimized.txt',
  128. // EasyList Germany filter
  129. [
  130. 'https://easylist.to/easylistgermany/easylistgermany.txt',
  131. [
  132. 'https://easylist-downloads.adblockplus.org/easylistgermany.txt'
  133. ]
  134. ],
  135. // GameConsoleAdblockList
  136. 'https://raw.githubusercontent.com/DandelionSprout/adfilt/master/GameConsoleAdblockList.txt',
  137. // PiHoleBlocklist
  138. // Update almost once per 3 months, let's set a 10 days cache ttl
  139. [
  140. 'https://perflyst.github.io/PiHoleBlocklist/SmartTV-AGH.txt',
  141. [
  142. 'https://raw.githubusercontent.com/Perflyst/PiHoleBlocklist/master/SmartTV-AGH.txt'
  143. ],
  144. TTL.TEN_DAYS()
  145. ],
  146. // Spam404
  147. // Not actively maintained, let's use a 10 days cache ttl
  148. ['https://raw.githubusercontent.com/Spam404/lists/master/adblock-list.txt', null, TTL.TEN_DAYS()],
  149. // Brave First Party & First Party CNAME
  150. 'https://raw.githubusercontent.com/brave/adblock-lists/master/brave-lists/brave-firstparty.txt'
  151. ] as const;
  152. export const PREDEFINED_WHITELIST = [
  153. 'localhost',
  154. 'local',
  155. 'localhost.localdomain',
  156. 'broadcasthost',
  157. 'ip6-loopback',
  158. 'ip6-localnet',
  159. 'ip6-mcastprefix',
  160. 'ip6-allnodes',
  161. 'ip6-allrouters',
  162. 'ip6-allhosts',
  163. 'mcastprefix',
  164. 'skk.moe',
  165. 'analytics.google.com',
  166. 'cloud.answerhub.com',
  167. 'ae01.alicdn.com',
  168. 'whoami.akamai.net',
  169. 'whoami.ds.akahelp.net',
  170. 'pxlk9.net.', // This one is malformed from EasyList, which I will manually add instead
  171. 'instant.page', // No, it doesn't violate anyone's privacy. I will whitelist it
  172. 'piwik.pro',
  173. 'mixpanel.com',
  174. 'cdn.mxpnl.com',
  175. 'heapanalytics.com',
  176. 'segment.com',
  177. 'segmentify.com',
  178. 't.co', // pgl yoyo add t.co to the blacklist
  179. 'survicate.com', // AdGuardDNSFilter
  180. 'perfops.io', // AdGuardDNSFilter
  181. 'd2axgrpnciinw7.cloudfront.net', // ADGuardDNSFilter
  182. 'tb-lb.sb-cd.com', // AdGuard
  183. 'storage.yandexcloud.net', // phishing list
  184. 'login.microsoftonline.com', // phishing list
  185. 'api.xiaomi.com', // https://github.com/jerryn70/GoodbyeAds/issues/281
  186. 'api.io.mi.com', // https://github.com/jerryn70/GoodbyeAds/issues/281
  187. 'cdn.userreport.com', // https://github.com/AdguardTeam/AdGuardSDNSFilter/issues/1158
  188. 'ip-api.com',
  189. 'fastly-analytics.com',
  190. 'syd1.digitaloceanspaces.com',
  191. 's3.nl-ams.scw.cloud',
  192. 'geolocation-db.com',
  193. 'uploads.codesandbox.io',
  194. // Affect Windows ISO download
  195. // https://raw.githubusercontent.com/AdguardTeam/cname-trackers/master/data/combined_disguised_trackers.txt
  196. 'vlscppe.microsoft.com',
  197. // OpenAI use this for A/B testing
  198. // Fuck Peter Lowe Hosts
  199. 'pstmrk.it'
  200. ];
  201. export const PREDEFINED_ENFORCED_BACKLIST = [
  202. 'telemetry.mozilla.org'
  203. ];
  204. export const PREDEFINED_ENFORCED_WHITELIST = [
  205. 'godaddysites.com',
  206. 'web.app',
  207. 'firebaseapp.com',
  208. 'ipfs.nftstorage.link',
  209. 'ipfs.4everland.io',
  210. 'ipfs.cf-ipfs.com',
  211. 'ipfs.dweb.link',
  212. 'ipfs.infura-ipfs.io',
  213. 'ipfs.fleek.cool',
  214. 'repl.co',
  215. 'w3s.link',
  216. 'translate.goog',
  217. 'backblazeb2.com',
  218. 'workers.dev',
  219. 'r2.dev',
  220. 'glitch.me',
  221. 'netlify.app',
  222. 'blogspot.com',
  223. 'appspot.com'
  224. ];