Skip to content
This repository has been archived by the owner on Sep 19, 2020. It is now read-only.

"Malware domains" list fails to update #244

Open
6 of 9 tasks
andreygursky opened this issue Apr 7, 2020 · 3 comments
Open
6 of 9 tasks

"Malware domains" list fails to update #244

andreygursky opened this issue Apr 7, 2020 · 3 comments
Labels
something to address something to address

Comments

@andreygursky
Copy link

Prerequisites

  • I performed a cursory search of the issue tracker to avoid opening a duplicate issue
  • This is not a support issue or a question
    • Support issues and questions are handled at /r/uMatrix
  • I tried to reproduce the issue when...
    • uMatrix is the only extension
    • uMatrix with default lists/settings
    • using a new, unmodified browser profile
  • I am running the latest version of uMatrix
  • I checked the documentation to understand that the issue I report is not a normal behavior
  • I used the logger to rule out that the issue is caused by my ruleset

Description

Since a couple of months uMatrix is not able to update the default "Malware domains" [1] list on a 64 kbit/s connection. The reason is a timeout. I'm not sure whether the size of that file has grown rapidly or the server stopped to deliver this text file in a compressed format.

The default 30 seconds timeout is hardcoded here [2]

// src/js/assets.js
        xhr.timeout = 30000;

It looks like it was previously adjustable [3]:

var xhrTimeout = vAPI.localStorage.getItem('xhrTimeout') || 30000;

and this functionality has been restored recently [4]:

// src/js/assets.js
    const timeoutAfter = µMatrix.rawSettings.assetFetchTimeout * 1000 || 30000;

Thus I'd like kindly to ask to make at least this only change available (or if not possible, then raise the hardcoded default timeout temporary) in the next release.

Thanks.

A specific URL where the issue occurs

Steps to Reproduce

  1. Ensure your internet provider throttles the connection bandwidth to 64 kbit/s.
  2. Ensure the mentioned "Malware domains" [1] list is outdated.
  3. Try to update assets.
  4. The update for the mentioned list will always fail.

Ruleset

Supporting evidence

$ wget https://mirror.cedia.org.ec/malwaredomains/justdomains
$ ls -l justdomains 
-rw-r--r-- 1 594673 Mar  4 23:42 malwaredomains/justdomains

More than 74 seconds are needed to download this file at 64 kbit/s.

Your environment

  • uMatrix version: 1.4.0
  • Browser Name and version: Firefox 74.0
  • Operating System and version: Debian GNU/Linux testing (Bullseye)

[1] https://mirror.cedia.org.ec/malwaredomains/justdomains
[2] https://github.com/gorhill/uMatrix/blob/1.4.0/src/js/assets.js#L116
[3] gorhill/uMatrix@c2d7096
[4] gorhill/uMatrix@9b29230

@uBlock-user
Copy link
Contributor

@andreygursky Open 'More' pane and set assetFetchTimeout to 60 or some bigger value, that should help.

@gorhill
Copy link
Member

gorhill commented Apr 7, 2020

Please try the dev build of uMatrix, it's better equipped to deal with slow connection as it takes into account progress events when downloading assets in order to determinate whether there is a time out condition.

@uBlock-user uBlock-user added the something to address something to address label Apr 7, 2020
@andreygursky
Copy link
Author

@uBlock-user, thanks, I've tried this but my changes were ignored. Then I've figured out the option is too new for uMatrix 1.4.0.

@gorhill, updated. Now it is better, thanks!

as it takes into account progress events when downloading assets in order to determinate whether there is a time out condition.

Indeed, the issue is actually not that no data is transmitted for 30 seconds but only rather slow. From what iftop shows, once a first timeout hits, Firefox seems to continue downloading, but since uMatrix 1.4.0 receives the timeout event, it starts the same download from a mirror, then I see 2 concurrent downloads in iftop, which makes it even worse.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
something to address something to address
Projects
None yet
Development

No branches or pull requests

3 participants