source: code/trunk/README.md@ 147

Last change on this file since 147 was 147, checked in by Izuru Yakumo, 15 months ago

コードのリファクタリングが完了しました

Signed-off-by: Izuru Yakumo <yakumo.izuru@…>

File size: 2.9 KB
RevLine 
[147]1# Yukari's Gap
[1]2
[147]3Web content sanitizer proxy as a service, fork of [MortyProxy](https://github.com/asciimoo/morty) with some suggestions from the issue tracker applied, named after [the youkai you shouldn't ever come near](https://en.touhouwiki.net/wiki/Yukari_Yakumo)
[81]4
[147]5Yukari's Gap rewrites web pages to exclude malicious HTML tags and attributes. It also replaces external resource references to prevent third party information leaks.
[1]6
[147]7The main goal of this tool is to provide a result proxy for [searx](https://asciimoo.github.com/searx/), but it can be used as a standalone sanitizer service too.
[1]8
[6]9Features:
[1]10
[147]11* HTML sanitization
12* Rewrites HTML/CSS external references to locals
13* JavaScript blocking
14* No Cookies forwarded
15* No Referrers
16* No Caching/Etag
17* Supports GET/POST forms and IFrames
18* Optional HMAC URL verifier key to prevent service abuse
[1]19
20
21## Installation and setup
[147]22Requirement: Go version 1.16 or higher.
[1]23
24```
[142]25$ go install marisa.chaotic.ninja/yukari@latest
26$ "$GOPATH/bin/yukari" --help
[1]27```
28
[138]29### Usage
30
31```
32 -debug
33 Debug mode (default true)
34 -followredirect
35 Follow HTTP GET redirect
[140]36 -hashparam string
[142]37 User-defined requesting string HASH parameter name (ie: '/?hash=...' or '/?h=...') (default "yukarihash")
[138]38 -ipv6
39 Allow IPv6 HTTP requests (default true)
40 -key string
41 HMAC url validation key (base64 encoded) - leave blank to disable validation
42 -listen string
43 Listen address (default "127.0.0.1:3000")
44 -proxy string
45 Use the specified HTTP proxy (ie: '[user:pass@]hostname:port'). Overrides -socks5, -ipv6.
46 -proxyenv
47 Use a HTTP proxy as set in the environment (HTTP_PROXY, HTTPS_PROXY and NO_PROXY). Overrides -proxy, -socks5, -ipv6.
48 -socks5 string
49 Use a SOCKS5 proxy (ie: 'hostname:port'). Overrides -ipv6.
50 -timeout uint
51 Request timeout (default 5)
[140]52 -urlparam string
[142]53 User-defined requesting string URL parameter name (ie: '/?url=...' or '/?u=...') (default "yukariurl")
[138]54 -version
55 Show version
56```
57
[101]58### Environment variables
[1]59
[142]60Yukari can additionally be configured using the following environment variables:
61- `YUKARI_ADDRESS`: Listen address (default to `127.0.0.1:3000`)
62- `YUKARI_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- `YUKARI_URL_PARAM`: User-defined requesting string URL parameter name (ie: `/?url=...` or `/?u=...`) (default `yukariurl`)
64- `YUKARI_HASH_PARAM`: User-defined requesting string HASH parameter name (ie: `/?hash=...` or `/?h=...`) (default `yukarihash`)
[101]65- `DEBUG`: Enable/disable proxy and redirection logs (default to `true`). Set to `false` to disable.
66
[48]67### Test
68
69```
[142]70$ cd "$GOPATH/src/marisa.chaotic.ninja/yukari"
[48]71$ go test
72```
73
74
75### Benchmark
76
77```
[142]78$ cd "$GOPATH/src/marisa.chaotic.ninja/yukari"
[48]79$ go test -benchmem -bench .
80```
81
82
[1]83## Bugs
[142]84Bugs or suggestions? Visit the [issue tracker](https://git.chaotic.ninja/yakumo.izuru/yukari/issues).
Note: See TracBrowser for help on using the repository browser.