summaryrefslogtreecommitdiff
path: root/README.md
blob: a3ee090bd6f4084b5d83392f8cae472dee27175f (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# Hydrilla&Haketilo

Haketilo is a tool to modify pages being opened in a web browser. It can block
pages' scripts and optionally inject user-specified ones.

Haketilo started as a browser extension (a WebExtension) with a dedicated
user scripts repository server, Hydrilla. Haketilo is now being rewritten as an
HTTP proxy. This repository contains combined sources of Hydrilla and Haketilo
which are going to be distributed together.

This source tree is a work in progress and is thus a complete mess. You can see
some unused or inadequate source files (and even UML diagrams) flying around.
The Hydrilla part is currently not functional. You can play with the proxy part
if you really want (for brave people only 😉).

You're going to need at least Python 3.7 plus the following Python libraries
* mitmproxy 8 (sadly, not in Debian yet)
* immutables (also not in Debian but if you are familiar with git-buildpackage,
  you can utilize [my own packaging of it](https://git.koszko.org/immutables/))
* click
* jsonschema (>= 3.0)
* beautifulsoup4
* html5lib
* babel

This project also utilizes flask, reuse, setuptools, setuptools_scm, wheel,
pytest and mypy but those are either development-only dependencies or just not
required for the actual Haketilo proxy.

Make sure to run
```
./setup.py compile_catalog
```
before running anything. A missing message catalog can make things break.

Create directory ~/.haketilo/store/temporary_malcontent/ and put there all the
[built Haketilo packages](https://hydrillabugs.koszko.org/projects/hydrilla/wiki/Hydrilla_on-disk_data_format) that you'd like to use. You can use
[hydrilla builder](https://hydrillabugs.koszko.org/projects/hydrilla/wiki/Releases)
and the [repository of fixes for JS-encumbered websites](https://git.koszko.org/hydrilla-fixes-bundle/).

Now, run
```
PYTHONPATH=./src/ python3 -m mitmproxy_launcher
```

Next, open your browser, go to settings and import the certificate that got
generated under ~/.haketilo/mitmproxy/mitmproxy-ca-cert.pem. You can now browse
to some site for which you configured a Haketilo user script to run. I usually
visit https://opencores.org/projects for which was the first Haketilo script was
written...

There's some work to do before any of this will be usable to normal human
beings. Help appreciated.

## Copying

Hydrilla is Copyright (C) 2021-2022 Wojtek Kosior and contributors, entirely available under the GNU Affero General Public License version 3 or later. Some files might also give you broader permissions, see comments inside them.

*I, Wojtek Kosior, thereby promise not to sue for violation of this project's license. Although I request that you do not make use this code in a proprietary program, I am not going to enforce this in court.*

## Contributing

Please visit our Redmine instance at https://hydrillabugs.koszko.org.

You can also write an email to koszko@koszko.org.