# Yukari's Gap Web 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) Yukari's Gap rewrites web pages to exclude malicious HTML tags and attributes. It also replaces external resource references to prevent third party information leaks. The 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. Features: * HTML sanitization * Rewrites HTML/CSS external references to locals * JavaScript blocking * No Cookies forwarded * No Referrers * No Caching/Etag * Supports GET/POST forms and IFrames * Optional HMAC URL verifier key to prevent service abuse ## Installation and setup Requirement: Go version 1.16 or higher (thus making it incompatible with MortyProxy's own requirement, but also to use `go embed`) ``` $ go install marisa.chaotic.ninja/yukari/cmd/yukari@latest $ "$GOPATH/bin/yukari" --help ``` ### Usage See `yukari(1)` ### Environment variables Yukari can additionally be configured using the following environment variables: - `YUKARI_ADDRESS`: Listen address (default to `127.0.0.1:3000`) - `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. - `YUKARI_URL_PARAM`: User-defined requesting string URL parameter name (ie: `/?url=...` or `/?u=...`) (default `yukariurl`) - `YUKARI_HASH_PARAM`: User-defined requesting string HASH parameter name (ie: `/?hash=...` or `/?h=...`) (default `yukarihash`) - `DEBUG`: Enable/disable proxy and redirection logs (default to `true`). Set to `false` to disable. ### Test ``` $ cd "$GOPATH/src/marisa.chaotic.ninja/yukari" $ go test ``` ### Benchmark ``` $ cd "$GOPATH/src/marisa.chaotic.ninja/yukari" $ go test -benchmem -bench . ``` ## Bugs Bugs or suggestions? Mail [yukari-dev@chaotic.ninja](mailto:yukari-dev@chaotic.ninja)