-
Notifications
You must be signed in to change notification settings - Fork 40
实验阶段特性
本页面主要介绍一些 μBlock 允许你启用的实验阶段特性。所谓实验阶段特性在我看来对用户很有用,但在设计或实现上目前还不成熟。
实验阶段特性默认处于关闭状态,你可以在控制面板的_设置_ 标签页中启用它们,但我无法保证这些标为“实验性”的特性都可以完美地使用。
如果你遇到无法如预期正常使用的情况,建议你首先在控制面板里禁用这些_"实验阶段特性"_,然后再看看问题是否仍存在。
[重要提示: 本地镜像目前已知会破坏最终被本地缓存的网页字体,参见 issue #291。]
增加用户隐私暴露程度的一种方式是使用内容分发网络(即"CDN")和类似服务。最常见的 CDN 包括 ajax.googleapis.com
、cdnjs.cloudflare.com
、googletagservices.com
等等。这些服务器用于将资源分发到无数的网站。
当从这些 CDN 拉取资源时,通常会在资源的 HTTP 请求中设置一个 referrer header,允许这些无处不在的 CDN 收集与你浏览习惯有关的数据。这种做法对保护隐私来说没好处。
从减少隐私暴露程度的角度出发,μBlock 引入了一项称为本地镜像的实验阶段特性,允许 μBlock 在本地缓存这些从已知的 CDN 拉取的资源,今后如再请求相同的资源,本地可直接提供,无需再从 CDN 拉取,即防止 CDN 收集您的浏览习惯数据。
上图显示出所有到 ajax.googleapis.com
、www.googletagservices.com
和 twitter.com
的连接都被阻止了,所以不会在它们的服务器日志留下任何信息,取而代之的是所请求资源的本地副本,并且没有破坏页面。(令我吃惊的是上图显示出连到 googletagservices.com
的请求没有被 EasyList 和 EasyPrivacy 屏蔽 ,而是被 "Dan Pollock's"、MVPS 和 hpHosts 屏蔽的)。
A quick benchmark -- using reference benchmark, with the feature disabled vs. enabled shows the following:
Disabled:
URLs visited: 60
Domains: 415 / 475
Scripts: 857 / 1264
Outbound cookies: 0 / 130
Net requests: 3,304 / 6,264
Enabled:
URLs visited: 60
Domains: 337 / 397
Scripts: 793 / 1214
Outbound cookies: 0 / 132
Net requests: 3,174 / 6,156
As seen above, a significant amount of connections to third-party ubiquitous CDNs were foiled with local mirroring enabled. This contribute to reducing privacy exposure, without breaking web pages.
Advantages of local mirroring:
- Reduction of privacy exposure
- Less bandwidth
- Faster page load
Disadvantage of local mirroring:
- Higher memory consumption
[Following cut & pasted from here]
I ran a new benchmark with uBlock 0.6.6.0-rc.0 and ABP 1.8.5 with the same lists (except Peter Lowe's because there is no easy convenient way to install it in Adblock Plus -- so I assume users are likely to not bother).
Here is the resulting diff: https://www.diffchecker.com/5z91i47m
In red what ABP blocked which was not blocked by uBlock. In green what uBlock blocked which was not blocked by ABP.
I suspect the only two requests not blocked by uBlock which were blocked by ABP is just the result of the page content changing between the time I benchmarked uBlock and ABP.
Filter lists:
- ABP: Out of box settings + EasyPrivacy, Malware domains, Fanboy's Social Blocking List, Anti-ThirdpartySocial + "Acceptable ads" disabled
- uBlock: Out of box settings + Anti-ThirdpartySocial + Local mirroring enabled and primed (as it would be through normal use).
What local mirroring accomplished in the above benchmark... Prevented connections to:
2mdn.net
ajax.googleapis.com
cloudflare.com
fonts.googleapis.com
googletagservices.com
gstatic.com
janrain.com
jquery.com
twitter.com
And since the remote resources were available locally, preventing the connection didn't cause page breakage.
I had to remove a couple of hostnames which were candidate to be mirrored, as in practice it showed that these could not be safely mirrored: 2mdn.net
, googletagservices.com
, janrain.com
. At this point it does look like the local mirroring feature will really have to be strictly reserved for resources which we know for sure are immutable (libs, fonts, things like that).
Well there were bugs introduced in 0.7.0.0 re local mirroring. These have been fixed. So I put back googletagservices.com
as local mirror candidate, as the breakage was most certainly caused by the bugs, not the fact that the resources were not immutable (they appear to be)..
uBlock Origin - 一款支持 Chromium、Firefox 和 Safari 的高效过滤工具,快速且简洁