Sign inSign up

boostchicken/lol

By boostchicken

•Updated almost 3 years ago

bunnylol clone in go. github.com/boostchicken/lol

Image
0

5.9K

boostchicken/lol repository overview

⁠boostchicken - lol

A clone of Meta's bunnylol service written in go, configuration is via a YAML file, check the example in the repo.

⁠Usage
  1. Deploy the docker container and expose the port you configured
  2. Create a custom search engine in your browser of choice
Default: https://127.0.0.1:8080/lol?q=%s
Reverse Proxy: https://lol.boostchicken.dev/lol?q=%s
⁠UI

There is a barebones UI that lists all commmands

Default: https://127.0.0.1:8080/
Reverse Proxy: https://lol.boostchicken.dev/
⁠Config Types
  • Alias - A straight redirect to a URL, no arguments used. (e.g.)
- command: gh
  type: Alias
  value: https://www.github.com

gh -> http://www.github.com⁠

  • Redirect - A redirect that accepts one argument to printf
- command: ghuser
  type: Redirect
  value: https://www.github.com/%s

ghuser boostchicken -> https://www.github.com/boostchicken⁠

  • RedirectVarArgs - A redirect that explodes all params on space and does allows multiple args into printf
- command: ghr
  type: RedirectVarArgs
  value: https://www.github.com/%s/%s

ghr boostchicken lol -> https://www.github.com/boostchicken/lol⁠

⁠Config

GET /rehash

Reloads the configuration. For use after editing config via filesystem

PUT /config

Replaces the configuration file in memory, does not write it to disk. Rehashes server after update. This will not cause the server to rebind

Headers

  1. Content-Type application/yaml

Body

  • A config string that matches your header format (Yaml, JSON, TOML, etc)
---
bind: "0.0.0.0:6969"
entries: 
  - command: g
    type: Redirect
    value: https://www.google.com/search?q=%s
  - command: github
    type: RedirectVarArgs
    value: https://www.github.com/%s/%s
  - command: pihole
    type: Alias   
    value: http://pi.hole

Headers

GET /config

Returns the current config in YAML

  • Content-Type: application/yaml

Body

---
bind: "0.0.0.0:6969"
entries: 
  - command: g
    type: Redirect
    value: https://www.google.com/search?q=%s

⁠Docker Build

Publish Docker image

⁠Docker Hub

boostchicken/lol:latest⁠

⁠Github Repo

ghcr.io/boostchicken/lol:latest⁠

⁠Config Mounting example

-v /tmp/config.yaml:/go/config.yaml

Tag summary

Content type

Image

Digest

sha256:016d8a612…

Size

122.7 MB

Last updated

about 3 years ago

docker pull boostchicken/lol