<commit_before># libunaccept #

`Libunaccept` is a minimal user-space firewall written in C, which allows
both IP network and DNS-based policies for TCP/IP servers.  It can be enabled
for any application without the need to recompile, by using `LD_PRELOAD`
library injection.

The primary goals are simplicity, speed and enabling automated reconfiguration.

Possible uses:

   1. Restrict access to your SMTP server to reduce spam.
   2. Manage incoming DDoS attacks.


## Installation ##

The standard:

    make
    make install

will install `libunaccept.so` in `/usr/local/lib`, create `/etc/libunaccept.d/`
and install a default configuration (which does nothing).

Running `make uninstall` will remove the binary but leave the files in `/etc/`
intact.


## Activation ##

To activate `libunaccept` for a system daemon, the easiest way on modern
Linux distributions is to add the following lines to one of the scripts
which are sourced by the service SysV init startup script:

    # Enable the libunaccept user-space firewall.
    export UNACCEPT_RULES=/etc/libunaccept.d
    export LD_PRELOAD=/usr/local/lib/libunaccept.so

On Debian, it is usually easiest to inject those lines into a file named
`/etc/default/SERVICE`.

On modern RedHat or Fedora distributions, most packages will work if you
add those lines to a file named `/etc/sysconfig/SERVICE`.


## Related projects ##

`Libunaccept` is beening resurrected from obscurity for use as a DDoS
management system at [PageKite](https://pagekite.net/) and an experimental
spam reduction tool for the author's personal SMTP server
([blog post](http://bre.klaki.net/blog/2011/12/11)).

If you use `libunaccept` for something neat, let us know and we'll add a
link to this document.


## Credits and License ##

Libunaccept is Copyright 2011, <NAME> <http://bre.klaki.net/>

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

See the file COPYING for details.
<commit_msg>Clarifying history<commit_after># libunaccept #

`Libunaccept` is a minimal user-space firewall written in C, which allows
both IP network and DNS-based policies for TCP/IP servers.  It can be enabled
for any application without the need to recompile, by using `LD_PRELOAD`
library injection.

The primary goals are simplicity, speed and enabling automated reconfiguration.

Possible uses:

   1. Restrict access to your SMTP server to reduce spam.
   2. Manage incoming DDoS attacks.


## Installation ##

The standard:

    make
    make install

will install `libunaccept.so` in `/usr/local/lib`, create `/etc/libunaccept.d/`
and install a default configuration (which does nothing).

Running `make uninstall` will remove the binary but leave the files in `/etc/`
intact.


## Activation ##

To activate `libunaccept` for a system daemon, the easiest way on modern
Linux distributions is to add the following lines to one of the scripts
which are sourced by the service SysV init startup script:

    # Enable the libunaccept user-space firewall.
    export UNACCEPT_RULES=/etc/libunaccept.d
    export LD_PRELOAD=/usr/local/lib/libunaccept.so

On Debian, it is usually easiest to inject those lines into a file named
`/etc/default/SERVICE`.

On modern RedHat or Fedora distributions, most packages will work if you
add those lines to a file named `/etc/sysconfig/SERVICE`.


## History and Related Projects ##

Originally written in 2006 but never released, `libunaccept`, was resurrected
from obscurity for DDoS management at [PageKite](https://pagekite.net/) and
as an experimental spam reduction tool for the author's personal SMTP server
([blog post](http://bre.klaki.net/blog/2011/12/11)).

If you use `libunaccept` for something neat, let us know and we'll add a
link to this document.


## Credits and License ##

Libunaccept is Copyright 2011, <NAME> <http://bre.klaki.net/>

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

See the file COPYING for details.

{'fraction_non_alphanumeric': 0.0693184461502675, 'fraction_numerical': 0.007908816003721796, 'mean_word_length': 4.162064825930372, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '432460', 'n_tokens_mistral': 1257, 'n_tokens_neox': 1185, 'n_words': 580}