Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ashwinvis/umatrix2ublock
Migrate rulesets from uMatrix to uBlock-Origin
https://github.com/ashwinvis/umatrix2ublock
ublock-origin umatrix
Last synced: 3 months ago
JSON representation
Migrate rulesets from uMatrix to uBlock-Origin
- Host: GitHub
- URL: https://github.com/ashwinvis/umatrix2ublock
- Owner: ashwinvis
- License: apache-2.0
- Created: 2020-02-26T15:31:58.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-07-20T10:38:14.000Z (over 3 years ago)
- Last Synced: 2024-10-15T20:23:03.180Z (3 months ago)
- Topics: ublock-origin, umatrix
- Language: Python
- Homepage:
- Size: 12.7 KB
- Stars: 21
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
umatrix2ublock
==============Migrate rulesets from uMatrix_ to uBlock-Origin_.
.. warning::
Websites are very likely to break with this setup, so have uBlock-Origin disabled
in private windows such that you have a fallback option.An effort is made to retain similar functionality and blocking as before.
Usage
-----1. Opt-in under uBlock-Origin_ settings: "I am an advanced_ user". Then block_
3rd-party scripts and frames globally. Alternatively block only 3rd-party
frames_ (less breakage)... image:: https://user-images.githubusercontent.com/9155111/75366608-44884300-58bf-11ea-88ff-8ca3252fd763.png
2. Either enable "Custom" Firefox Enhanced Tracking protection to block all
third-party cookies, or use Cookie-AutoDelete_.3. Export your existing uMatrix_ and uBlock-Origin_ rules into text files.
Execute it something similar to::cd examples/
python ../umatrix2ublock.py my-umatrix-rules.txt my-ublock-dynamic-rules_2020-02-26_14.07.25.txtto obtain a merged ruleset ``my-ublock-dynamic-rules.txt`` compatible with
uBlock-Origin_.4. Import the merged ruleset into uBlock-Origin_.
Background
----------In my browser, I originally had uBlock-Origin_ (with its default settings) and
uMatrix_.I started using uMatrix_ to block all third-party requests by default (except
css and images), and whitelisting a few requests to make the website is
functional... image:: https://user-images.githubusercontent.com/585534/33213085-ff74afd8-d0f3-11e7-8232-4c204925d274.png
I realized later that most of the time, I was just whitelisting scripts and
XHRs. Which meant in principle, I can rely on custom settings as mentioned
above. I simply needed to migrate my uMatrix_ rules that I had aggregated over
several months to serve the same purpose... _advanced: https://github.com/gorhill/uBlock/wiki/Advanced-user-features
.. _block: https://github.com/gorhill/uBlock/wiki/Dynamic-filtering:-Benefits-of-blocking-3rd-party-script-and-iframe-tags
.. _frames: https://github.com/gorhill/uBlock/wiki/Dynamic-filtering:-Benefits-of-blocking-3rd-party-iframe-tags
.. _uMatrix: https://github.com/gorhill/uMatrix
.. _uBlock-Origin: https://github.com/gorhill/uBlock
.. _Cookie-AutoDelete: https://github.com/Cookie-AutoDelete/Cookie-AutoDelete