Veil server

Farooq Karimi Zadeh 5e64614045 Wrong msgs -> Correct msgs 3 months ago
.gitignore 2f53c1ed70 Initial commit 4 months ago
LICENSE 58eea7b31d Adding licence 4 months ago
README.md 0f57dac6b4 Fixing a mistake 4 months ago
badsites.py 5e64614045 Wrong msgs -> Correct msgs 3 months ago
bs_panel_template.html 9006a9e109 Removing vote section 4 months ago
bsconfig.sample.py 50073fda6e Sample config 4 months ago

README.md

veil-server

This is code of Veil server-side. A project which tries to censor inappropriate images from users.

API

  • /: Retrieve a list of sites an pages with inappropriate images. No arguments.

  • /vote: Vote for a page or site because of having inappropriate images. IP address is recorded for each vote. site's hostname(optionally with port) or page's address must be passed as addr.

  • /unvote: Remove vote for a page or site. Argument: addr(See /vote)

  • /panel: See the administration panel. No arguments.

  • /addnew: Add new pages and sites to DB. With this the pages are added as admin voted with vote count = -1. Password must be passed as password and a list of sites' hostname and pages address one per line as data.

  • /delete: Delete a site or address from DB. Arguments: password and addr

Config

Create a Python class named BSConfig inside a file named bsconfig.py. The class must have the following properties:

  • db_path: Path to the JSON DB(It will create one if there is no file with such name there.

  • bindto: The IP address of the system it should bind to.

  • port: The port it should listen to. The Veil client connects to port 6101.

  • password: Hash of your password using Python's hash() function.

  • db_update_interval: The interval in seconds between the times DB is written to disk.

  • panel_template_path: Path to panel's template.

See bsconfig.sample.py for an example.

Licence

It is under ISC licence(as permissive as MIT). See LICENSE.