-
Notifications
You must be signed in to change notification settings - Fork 1
Installation
- Node.js
- npm
- grunt-cli
- Ruby / Gem
- compass
- Go 1.4+
Maud needs to connect to a MongoDB server on startup; by default, it will try to connect to localhost:27017
, but a different location can be specified with the -dburl
flag.
- Clone the repo
git clone https://github.com/hamcha/maud
- Get inside
cd maud
- Install the deps
npm install
(requires npm and compass) - Copy
info.json.sample
toinfo.json
and customize it (if you want, do the same withadmin.conf.sample
andcaptcha.conf.sample
) -
make
(requires grunt-cli and the deps) - You're there, just check the options
./maud -h
If you have Docker installed, you can pull the latest maud build from Docker Hub via docker pull silverweed/maud:latest
.
See the instructions on the repo for the details.
Maud has a module for blacklisting users based on their IP and/or User Agent. If want to use it, you'll need to create a blacklist.conf
file containing a JSON object with key-pairs of banned users, like:
{
"User 1": {
"Criteria": "ALL", // must match both IP and UA checks; change to another string to match any of them
"IP": "^192\.", // can use regexes for IP
"UserAgent": "^Mozilla", // can use regexes for UA too
"Reason": "Being nagging", // this will be displayed to the banned user (may be empty)
"Action": "ban" // "ban": disallow access to this user; "captcha": require captcha for replying. CASE SENSITIVE, so use lowercase "ban" and "captcha".
}
}
If you ever use the "captcha" action, you need to configure the capthas too. Please note that maud doesn't do HTTPS (which means basic auth is totally unencrypted and interceptable) so you should use a HTTPS reverse proxy (such as nginx) to secure your connection.
There's an additional check used for crunchy.rocks, that is, GeoIP checking and forcing captchas on all non-italian hosts. To download the GeoIP database, you can use this simple command:
curl http://geolite.maxmind.com/download/geoip/database/GeoLite2-Country.mmdb.gz | gunzip > geoip.mmdb
Step 1.
git clone https://github.com/golang/go --branch release-branch.go1.4 --single-branch
cd go/src
bash all.bash
Step 2. Add go/bin to your $PATH
(or ln -s
the files somewhere)
Step 3. Remember to set $GOPATH
to somewhere
Configuring the captchas is required only if you use the "captcha" Action in the blacklist.conf
file.
If you do, you need to provide a captcha.conf
file containing a JSON array of objects with the conf values.
Captchas consist in:
- an image which will be shown in the reply form
- a question which will be presented to the user
- an answer to said question.
Sample configuration:
[
{
"ImgPath": "/static/images/foo.png",
"Question": "what number is this?",
"Answer": "42"
},
{
"ImgPath": "/static/images/bar.png",
"Question": "what word is this?",
"Answer": "sedimentary"
}
]
Answer is not case sensitive and whitespaces don't matter (i.e. Maud Pie is the same as maudpie).