<commit_before># Introduction
This collection of scripts makes it easy to get the OpenVPN server status 
by connecting to its management interface, typically running on TCP port 7505.

# Configuration
Set the socket to connect to in `config/manage.ini`, you can use 
`config/manage.ini.example` as a template.

# Status
To get a list of currently connected clients:

    $ php bin/status.php
    
The output looks like this:

    array(1) {
      'aehohd0eeh8Ai_lappie' =>
      array(2) {
        'client_ip' =>
        string(12) "1.2.3.4"
        'vpn_ip' =>
        array(2) {
          [0] =>
          string(8) "10.8.0.2"
          [1] =>
          string(20) "fd5e:1204:b851::1000"
        }
      }
    }

If needed, more information can be made available in the future.

# Kill
To kill a certain client, i.e. kill its connection (temporary):

    $ php bin/kill.php aehohd0eeh8Ai_lappie

# Block
**TO BE IMPLEMENTED**
To block a certain client:

    $ php bin/block.php aehohd0eeh8Ai_lappie
<commit_msg>add section on managing via ssh<commit_after># Introduction
This collection of scripts makes it easy to get the OpenVPN server status 
by connecting to its management interface, typically running on TCP port 7505.

# Configuration
Set the socket to connect to in `config/manage.ini`, you can use 
`config/manage.ini.example` as a template.

# Status
To get a list of currently connected clients:

    $ php bin/status.php
    
The output looks like this:

    array(1) {
      'aehohd0eeh8Ai_lappie' =>
      array(2) {
        'client_ip' =>
        string(12) "1.2.3.4"
        'vpn_ip' =>
        array(2) {
          [0] =>
          string(8) "10.8.0.2"
          [1] =>
          string(20) "fd5e:1204:b851::1000"
        }
      }
    }

If needed, more information can be made available in the future.

# Kill
To kill a certain client, i.e. kill its connection (temporary):

    $ php bin/kill.php aehohd0eeh8Ai_lappie

# Block
**TO BE IMPLEMENTED**
To block a certain client:

    $ php bin/block.php aehohd0eeh8Ai_lappie

# Managing via SSH
You can also run the scripts on some other server and connect to the management
interface over SSH:

    $ ssh -L7777:localhost:7505 vpn.example.org

This way you don't need to have PHP stuff running on the VPN host. Do not 
forget to update the configuration in `config/manage.ini`.

{'fraction_non_alphanumeric': 0.09071550255536627, 'fraction_numerical': 0.03833049403747871, 'mean_word_length': 2.6818181818181817, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 4, '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': '4273247', 'n_tokens_mistral': 829, 'n_tokens_neox': 773, 'n_words': 272}