A01NR_Introduction

Program Structure

Contents

Earlier versions

In earlier versions of Net Responsibility where shipped with several different executables, such as

net-responsibility-daemon
net-responsibility-report
net-responsibility-config-cli
net-responsibility-config-gui

In NR 3.0 this concept changed. Now all functionality is found within net-responsibility, so the above commands would be replaced with:

net-responsibility --daemon
net-responsibility --report
net-responsibility --config

Registration and settings

To be able to install Net Responsibility you'll need to register an account with your specific settings. The software will download these settings automatically, and if the local config file is edited, a new one is downloaded.

Structure chart

Net Responsibility structure chart

The class MainApplication is the base and it inherits Poco::Util::ServerApplication. This is where the arguments are processed, the Database loaded, the configfile loaded. When that's done, the different Subsystems are run.

Subsystems

Currently there are three different Subsystems: ConfigSubsystem, ReportSubsystem and SnifferSubsystem. These are all loaded, and they determine themself whether to run any code or not.

Configuration

During the installation process one has to input the username and password used in the registration process. This is done by running one of these commands

net-responsibility --config
net-responsibility --config --username=X --password=Y

You should only need to configure Net Responsibility once. Whenever the settings are changed online, they're also downloaded automatically.

Reports

Net Responsibility is designed to sniff all internet traffic and regularly send reports based upon it. Every time ReportSubsystem starts, it checks if it's time to send a report. This also means that a computer that's running several days in a row, will not send a report, until the computer or Net Responsibility restarts.

One may also send reports manually by running

net-responsibility --report

To make sure Net Responsibility is installed and working as supposed, you may run

net-responsibility --test-report

This command will send a short test report to the user's email address and the accountability partners.

The Report class is made to create and send the reports. This class is loaded at runtime, and is designed as a plugin. This way you may create your own report plugin to generate differently formatted reports. It is not yet fully implemented, since one cannot choose plugin, or set up your own custom settings online. More work on this will be done later.

Sniffer

The SnifferSubsystem will first determine if another instance of Net Responsibility is up and sniffing. This check is based upon the pidfile. If another instance is found, Net Responsibility will only shut down and let the other instance alone. Otherwise, it will start it's own sniffer and run until the program is interrupted.

The sniffer basically listens to the internet traffic, and for each hit it processed by Filter.isMatch() to find out if it's appropriate or not. All the URLs are stored in the Database.

The idea is to open up the possibility to write your own sniffer plugins. That way one could have sniffers based on libpcap, DansGuardian, Squid, an own Poco proxy or anything else that could be of interest :)