ref: master
./README.md
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# antispam API This is a simple bare-bones API for the [antispam project][antispam]. It's written in Go and spits a simple daemon. [antispam]: https://sr.ht/~porcellis/antispam ## Running Generate the daemon using `make(1)`. There's a rule that'll fetch the latest data from the [repository][repository], crunch it as JSON and compile the daemon. Then you can just run: ```sh $ antispam serve ``` It'll go live on port 8121. You can supply an alternative port passing a second argument like `:3333`. Serve it via a reverse proxy on your server and you're done. A public instance is available at [antiweb.eletrotupi.com](https://antiweb.eletrotupi.com). [repository]: https://git.sr.ht/~porcellis/antispam ## Endpoints The API will either returns 200 (OK) if the domain is on the list or 404 (Not Found) if not. `GET /domains` - Spits the list of domains `GET /domains/:domain` - Verify if the domain is on the list `GET /usernames` - Return the list of usernames `GET /usernames/:username` - Verify if the username is on the list ## License MIT License. Check [COPYING][copying] [copying]: ./COPYING |