# fastbangs
This project functions as a meta search engine, resolving shortcuts to other search engines we call "bangs" (which work the same as the bangs from duckduckgo). When no bang is given, the user will be redirected to a default search engine, which is configurable by each user. This evaluation is done on the client; the server doesn't ever see your search query.  
The server keeps its own list of bangs, initialized with those from duckduckgo. Users are thus able to submit their own bangs on the website, which need to be approved by an administrator before coming into effect for all users.

There is a public instance running at [search.metamuffin.org](https://search.metamuffin.org), running on a server in germany.

## Configuration
Configuration is done through environment variables. The following may be used:
- PORT: port to bind to. Default: 20546
- BIND\_ADDR: address to bind to. Default: any ipv4/ipv6 interface
- BASE\_URL: url of the deployed website, without trailing slash. Default: "http://localhost:20546"
- ADMIN\_USER: username for logging into the interface for accepting/rejecting bangs. Default: "bleb"
- ADMIN\_PW\_HASH: hash of the passwort used for logging in. Default: ""

On the password hash:  
The default setting makes it impossible to log in, forcing you to set your own. You DON'T NEED TO DO THIS if you don't plan on adding custom bangs. The format is the sha512 hash of the password, converted to base64.
You can generate a password using the following command: `echo -n YOUR_PASSWORD | sha512sum | awk '{print $1}' | xxd -r -p | base64 | tr -d '\n'`
