HTTPS SSH

Knock Daemon

Welcome to Knock Daemon source code repository

https://knock.center

Copyright (C) 2013/2017 Laurent Labatut / Laurent Champagnac

Source code

  • We are pep8 compliant (as far as we can, with some exemptions)
  • We use a right margin of 360 characters (please don't talk me about 80 chars)
  • Daemon code is located inside "./knockdaemon"
  • Unittests are located inside "./knockdaemon_test"
  • All test files must begin with test_, should implement setUp & tearDown methods
  • All tests must adapt to any running directory
  • The whole daemon is backed by gevent (http://www.gevent.org/), and rely on pythonsol lib (https://bitbucket.org/LoloCH/pythonsol)
  • The daemon is not using threads but relies on coroutines (gevent greenlets)
  • We are still bound to python 2.7 (we will move to python 3 later on)
  • We are using docstring (:return, :rtype, :param, :type etc..), PyCharm "noinspection", feel free to use them
  • User running tests must be able to raise rlimit to 1048576
  • User running tests must be able to fire several commands as sudo without password

CentOs : /usr/bin/yum,/usr/sbin/dmidecode,/usr/sbin/smartctl,/sbin/sysctl,/usr/sbin/uwsgi,/bin/cat Debian : /usr/bin/apt-get,/usr/sbin/dmidecode,/usr/sbin/smartctl,/sbin/sysctl,/usr/bin/uwsgi,/bin/cat

Requirements

  • Debian 8 Jessie or greater, Ubuntu equivalent, x64, Python 2.7
  • Debian 7 Wheezy is supported by unittests & build system
  • REHL 7 or CentOs 7, x64, Python 2.7
  • Windows Vista or greater, Windows Server 2008 or greater, x64, Python 2.7

Unittests

To run unittests, you will need:

For windows :

  • redis installed
  • squid installed and configured

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA