source: code/trunk/README.md@ 101

Last change on this file since 101 was 101, checked in by mathieu.brunot, 6 years ago

:memo: Add sample env var and docker doc

Signed-off-by: mathieu.brunot <mathieu.brunot@…>

File size: 1.9 KB
Line 
1# Morty
2
3[![Build Status](https://travis-ci.org/asciimoo/morty.svg)](https://travis-ci.org/asciimoo/morty)
4[![License: AGPL v3](https://img.shields.io/badge/License-AGPL%20v3-blue.svg)](https://www.gnu.org/licenses/agpl-3.0)
5
6Web content sanitizer proxy as a service
7
8Morty rewrites web pages to exclude malicious HTML tags and attributes. It also replaces external resource references to prevent third party information leaks.
9
10The main goal of morty is to provide a result proxy for [searx](https://asciimoo.github.com/searx/), but it can be used as a standalone sanitizer service too.
11
12Features:
13
14 - HTML sanitization
15 - Rewrites HTML/CSS external references to locals
16 - JavaScript blocking
17 - No Cookies forwarded
18 - No Referrers
19 - No Caching/Etag
20 - Supports GET/POST forms and IFrames
21 - Optional HMAC URL verifier key to prevent service abuse
22
23
24## Installation and setup
25Requirement: Go version 1.10 or higher.
26
27```
28$ go get github.com/asciimoo/morty
29$ "$GOPATH/bin/morty" --help
30```
31
32### Environment variables
33
34Morty can be configured using the following environment variables:
35- `MORTY_ADDRESS`: Listen address (default to `127.0.0.1:3000`)
36- `MORTY_KEY`: HMAC url validation key (base64 encoded) to prevent direct URL opening. Leave blank to disable validation. Use `openssl rand -base64 33` to generate.
37- `DEBUG`: Enable/disable proxy and redirection logs (default to `true`). Set to `false` to disable.
38
39### Docker
40
41```
42docker run -e DEBUG=false -e MORTY_ADDRESS=0.0.0.0:3000 -v ./rules.json:/etc/filtron/rules.json:rw dalf/morty
43```
44
45```
46docker run -e DEBUG=false -v ./rules.json:/etc/filtron/rules.json:rw dalf/morty -listen 0.0.0.0:3000
47```
48
49
50### Test
51
52```
53$ cd "$GOPATH/src/github.com/asciimoo/morty"
54$ go test
55```
56
57
58### Benchmark
59
60```
61$ cd "$GOPATH/src/github.com/asciimoo/morty"
62$ go test -benchmem -bench .
63```
64
65
66## Bugs
67
68Bugs or suggestions? Visit the [issue tracker](https://github.com/asciimoo/morty/issues).
Note: See TracBrowser for help on using the repository browser.