1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-11-16 23:42:39 +01:00
Commit Graph

13 Commits

Author SHA1 Message Date
Raymond Hill
00fb5f18b2
Add to error message 2023-12-26 11:32:08 -05:00
Raymond Hill
a969a672e0
Change official description in source code top comment 2023-12-04 12:10:34 -05:00
Raymond Hill
67fb969572
Refactoring: Replace DOM events with broadcast channels
Broadcast channels are more suited to uBO than DOM events to dispatch
notifications to different parts of uBO.

DOM events can only be dispatched to local context, broadcast channels
dispatch to all contexts (i.e. background process, workers, auxiliary
pages) -- this last behavior is better suited to uBO to communicate
internal changes to all potential listeners, not just those in the local
context.

Additionally, broadcasting to content scripts is now done through
tabs.sendMessage() instead of through potentially opened message
ports, this simplifies broadcasting to content scripts, and this
doesn't require to have long-lived message ports in content
scripts.
2023-12-01 14:35:28 -05:00
Raymond Hill
0b871e6546
If response is 404, skip trying other CDNs
When there is a 404 response, in all likelihood other
CDNs will also return 404, no point pointlessly fetching
from others.
2023-11-14 17:39:48 -05:00
Raymond Hill
92c0088f64
Keep assetKey and diffName well separated 2023-11-13 14:55:52 -05:00
Raymond Hill
7b2149e595
Fix quirks re. diff-updater 2023-11-13 09:42:31 -05:00
Raymond Hill
4422926b63
Add more details to error message 2023-11-11 13:25:58 -05:00
Raymond Hill
856e8de64c
Diff-updater: report URL without the hash part 2023-11-08 07:16:23 -05:00
Raymond Hill
1cf634cce0
Leave out hash part when extracting patch file name
Related commit:
aeff955667
2023-11-05 08:03:43 -05:00
Raymond Hill
aeff955667
Extract list name from hash portion of ! Diff-Path: 2023-11-03 18:39:14 -04:00
Raymond Hill
abd8577096
Distinguish diff patch not-available from not-yet-available
A not-yet-available won't cause a list to become candidate for
full update.

A not-available will cause the list to be candidate for full
update.
2023-10-31 10:52:03 -04:00
Raymond Hill
2344cbdeca
Harden diff-updater against unexpected errors
The diff-updater worker will terminate upon unexpected
error, in order to avoid a stalled updater.
2023-10-30 13:47:24 -04:00
Raymond Hill
d05ff8ffeb
Add support for diff-patching filter lists
Related discussion:
https://github.com/ameshkov/diffupdates

The benefits of diff-patching filter lists is much shorter update
schedule and significantly less bandwidth consumed.

At the moment, only default filter lists are subject to be
diff-patched.

External filter lists can make their lists diff-patchable by
following the specification link above.

Only filter lists fetched by the auto-updater are candidate for
diff-patching.

Forcing a manual update of the filter lists will prevent the
diff-patcher from kicking in until one or more lists are
auto-updated.

Some back-of-the-envelop calculations regarding the load on free
CDN solutions used by uBO to distribute its own filter lists:

Currently, for each CDN (with lists updating after days):
~560 M req/month, ~78 TB/month

With diff-patching lists on a 6-hour schedule:
~390 M req/month, 1 TB/month

Those estimates were done according to statistics shown by
jsDelivr, which is one of 4 CDNs picked randomly when a list
updates:
https://www.jsdelivr.com/package/gh/uBlockOrigin/uAssetsCDN?tab=stats
2023-10-30 12:30:46 -04:00