summaryrefslogtreecommitdiff
path: root/README.md
blob: ad3434bfe9779201d98623d43af0faf76cf2c1b6 (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
66
67
68
69
70
71
72
73
74
75
76
# 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. The server part has simlar functionality
as in earlier Hydrilla releases and should be mostly usable at this point. The
proxy part is still being developed, but you can play with it nevertheless if
you're brave 😉

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/))
* flask
* jsonschema (>= 3.0)
* beautifulsoup4
* html5lib
* setuptools
* setuptools_scm
* wheel
* babel (Python library)
* build (a PEP517 package builder)

This project also utilizes reuse, 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 build
```
before running anything. Otherwise, missing files 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.

Under (at least) Mozilla browsers, certificate pinning may cause mitmproxy's
generated certificates to still be rejected. This generally happens on Google
and Mozilla websites. To be able to access these through proxy, go to
about:config and set the security.cert_pinning.enforcement_level preference to
0.

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 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 of 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.