source: code/trunk/README.md@ 138

Last change on this file since 138 was 138, checked in by 3nprob, 4 years ago

Update README

  • Include parameters
  • Remove unused Docker volume from example
File size: 2.7 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[![Docker Pulls](https://img.shields.io/docker/pulls/dalf/morty)](https://hub.docker.com/r/dalf/morty)
6
7Web content sanitizer proxy as a service
8
9Morty rewrites web pages to exclude malicious HTML tags and attributes. It also replaces external resource references to prevent third party information leaks.
10
11The 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.
12
13Features:
14
15 - HTML sanitization
16 - Rewrites HTML/CSS external references to locals
17 - JavaScript blocking
18 - No Cookies forwarded
19 - No Referrers
20 - No Caching/Etag
21 - Supports GET/POST forms and IFrames
22 - Optional HMAC URL verifier key to prevent service abuse
23
24
25## Installation and setup
26Requirement: Go version 1.10 or higher.
27
28```
29$ go get github.com/asciimoo/morty
30$ "$GOPATH/bin/morty" --help
31```
32
33### Usage
34
35```
36 -debug
37 Debug mode (default true)
38 -followredirect
39 Follow HTTP GET redirect
40 -ipv6
41 Allow IPv6 HTTP requests (default true)
42 -key string
43 HMAC url validation key (base64 encoded) - leave blank to disable validation
44 -listen string
45 Listen address (default "127.0.0.1:3000")
46 -proxy string
47 Use the specified HTTP proxy (ie: '[user:pass@]hostname:port'). Overrides -socks5, -ipv6.
48 -proxyenv
49 Use a HTTP proxy as set in the environment (HTTP_PROXY, HTTPS_PROXY and NO_PROXY). Overrides -proxy, -socks5, -ipv6.
50 -socks5 string
51 Use a SOCKS5 proxy (ie: 'hostname:port'). Overrides -ipv6.
52 -timeout uint
53 Request timeout (default 5)
54 -version
55 Show version
56```
57
58### Environment variables
59
60Morty can additionally be configured using the following environment variables:
61- `MORTY_ADDRESS`: Listen address (default to `127.0.0.1:3000`)
62- `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.
63- `DEBUG`: Enable/disable proxy and redirection logs (default to `true`). Set to `false` to disable.
64
65### Docker
66
67```
68docker run -e DEBUG=false -e MORTY_ADDRESS=0.0.0.0:3000 dalf/morty
69```
70
71```
72docker run -e DEBUG=false dalf/morty -listen 0.0.0.0:3000
73```
74
75
76### Test
77
78```
79$ cd "$GOPATH/src/github.com/asciimoo/morty"
80$ go test
81```
82
83
84### Benchmark
85
86```
87$ cd "$GOPATH/src/github.com/asciimoo/morty"
88$ go test -benchmem -bench .
89```
90
91
92## Bugs
93
94Bugs or suggestions? Visit the [issue tracker](https://github.com/asciimoo/morty/issues).
Note: See TracBrowser for help on using the repository browser.