Changeset 142 in code


Ignore:
Timestamp:
Aug 26, 2023, 11:57:19 AM (22 months ago)
Author:
Izuru Yakumo
Message:

Rebrand to Yukari's Gap

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

Location:
trunk
Files:
3 added
5 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/.gitignore

    r49 r142  
    1 morty
     1yukari
  • trunk/CHANGELOG.md

    r77 r142  
     1# v0.2.1 - 2023.08.26
     2Applied some suggestions from the issue tracker, and
     3rebrand this fork.
     4
    15# v0.2.0 - 2018.05.28
    26
  • trunk/Makefile

    r93 r142  
    1 APP_NAME=morty
     1all: build
    22
     3bench:
     4        go test -benchmem -bench .
    35build:
    4         docker rmi -f $(APP_NAME):latest
    5         docker build -t $(APP_NAME) .
    6 
    7 run:
    8         @echo "\n /!\ DO NOT use in production\n"
    9         docker run --rm -t -i --net=host --name="$(APP_NAME)" $(APP_NAME)
     6        go build -o yukari
     7clean:
     8        rm -f yukari
     9test:
     10        go test
  • trunk/README.md

    r140 r142  
    1 # Morty
     1# Yukari
    22
    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)
     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 [Yes, that Gap Youkai](https://en.touhouwiki.net/wiki/Yukari_Yakumo)
    64
    7 Web content sanitizer proxy as a service
     5Yukari rewrites web pages to exclude malicious HTML tags and attributes. It also replaces external resource references to prevent third party information leaks.
    86
    9 Morty rewrites web pages to exclude malicious HTML tags and attributes. It also replaces external resource references to prevent third party information leaks.
    10 
    11 The 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.
     7The main goal of yukari is to provide a result proxy for [searx](https://asciimoo.github.com/searx/), but it can be used as a standalone sanitizer service too.
    128
    139Features:
     
    2723
    2824```
    29 $ go install github.com/asciimoo/morty@latest
    30 $ "$GOPATH/bin/morty" --help
     25$ go install marisa.chaotic.ninja/yukari@latest
     26$ "$GOPATH/bin/yukari" --help
    3127```
    3228
     
    3935        Follow HTTP GET redirect
    4036  -hashparam string
    41         User-defined requesting string HASH parameter name (ie: '/?hash=...' or '/?h=...') (default "mortyhash")
     37        User-defined requesting string HASH parameter name (ie: '/?hash=...' or '/?h=...') (default "yukarihash")
    4238  -ipv6
    4339        Allow IPv6 HTTP requests (default true)
     
    5551        Request timeout (default 5)
    5652  -urlparam string
    57         User-defined requesting string URL parameter name (ie: '/?url=...' or '/?u=...') (default "mortyurl")
     53        User-defined requesting string URL parameter name (ie: '/?url=...' or '/?u=...') (default "yukariurl")
    5854  -version
    5955        Show version
     
    6258### Environment variables
    6359
    64 Morty can additionally be configured using the following environment variables:
    65 - `MORTY_ADDRESS`: Listen address (default to `127.0.0.1:3000`)
    66 - `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.
    67 - `MORTY_URL_PARAM`: User-defined requesting string URL parameter name (ie: `/?url=...` or `/?u=...`) (default `mortyurl`)
    68 - `MORTY_HASH_PARAM`: User-defined requesting string HASH parameter name (ie: `/?hash=...` or `/?h=...`) (default `mortyhash`)
     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`)
    6965- `DEBUG`: Enable/disable proxy and redirection logs (default to `true`). Set to `false` to disable.
    70 
    71 ### Docker
    72 
    73 ```
    74 docker run -e DEBUG=false -e MORTY_ADDRESS=0.0.0.0:3000 dalf/morty
    75 ```
    76 
    77 ```
    78 docker run -e DEBUG=false dalf/morty -listen 0.0.0.0:3000
    79 ```
    80 
    8166
    8267### Test
    8368
    8469```
    85 $ cd "$GOPATH/src/github.com/asciimoo/morty"
     70$ cd "$GOPATH/src/marisa.chaotic.ninja/yukari"
    8671$ go test
    8772```
     
    9176
    9277```
    93 $ cd "$GOPATH/src/github.com/asciimoo/morty"
     78$ cd "$GOPATH/src/marisa.chaotic.ninja/yukari"
    9479$ go test -benchmem -bench .
    9580```
     
    9782
    9883## Bugs
    99 
    100 Bugs or suggestions? Visit the [issue tracker](https://github.com/asciimoo/morty/issues).
     84Bugs or suggestions? Visit the [issue tracker](https://git.chaotic.ninja/yakumo.izuru/yukari/issues).
  • trunk/config/config.go

    r140 r142  
    2020
    2121func init() {
    22         default_listen_addr := os.Getenv("MORTY_ADDRESS")
     22        default_listen_addr := os.Getenv("YUKARI_ADDRESS")
    2323        if default_listen_addr == "" {
    2424                default_listen_addr = "127.0.0.1:3000"
    2525        }
    26         default_url_parameter := os.Getenv("MORTY_URL_PARAM")
     26        default_url_parameter := os.Getenv("YUKARI_URL_PARAM")
    2727        if default_url_parameter == "" {
    28                 default_url_parameter = "mortyurl"
     28                default_url_parameter = "yukariurl"
    2929        }
    30         default_hash_parameter := os.Getenv("MORTY_HASH_PARAM")
     30        default_hash_parameter := os.Getenv("YUKARI_HASH_PARAM")
    3131        if default_hash_parameter == "" {
    32                 default_hash_parameter = "mortyhash"
     32                default_hash_parameter = "yukarihash"
    3333        }
    34         default_key := os.Getenv("MORTY_KEY")
     34        default_key := os.Getenv("YUKARI_KEY")
    3535        DefaultConfig = &Config{
    3636                Debug:          os.Getenv("DEBUG") != "false",
  • trunk/go.mod

    r140 r142  
    1 module github.com/asciimoo/morty
     1module marisa.chaotic.ninja/yukari
    22
    33go 1.14
Note: See TracChangeset for help on using the changeset viewer.