<commit_before>openvpn
=======

Repo openvpn holds an OpenVPN image.

Start the server with a command like:

```
docker run -d -p 1199:1199/udp --privileged --net=host --name vpn-server \
   -e HOST=$(hostname) -e SERVER_IP=10.0.47.0 -e IP_MASK=255.255.255.128 \
   -v /etc/openvpn/:/certs hkjn/openvpn
```

Running a server on $(hostname) requires that /etc/openvpn exists and contains the
following files:
* `ca.pem`: The CA certificate.
* `$(hostname)-key.pem`: The key for the server.
* `$(hostname).pem`: The certificate for the server.
* `dh.pem`: Diffie-Hellman parameters.

## Generating certs

The certificates can be generated using `hkjn/pki`:

```
$ docker run -v /etc/openvpn:/certs hkjn/pki initca
$ docker run -v /etc/openvpn:/certs hkjn/pki gencert $(hostname)

```

## Generating DH params

The Diffie-Hellman parameters can be generated with:

```
openssl dhparam -outform PEM -out dhparam.pem 4096
```<commit_msg>Suggested /etc/vpn<commit_after>openvpn
=======

Repo openvpn holds an OpenVPN image.

Start the server with a command like:

```
docker run -d -p 1199:1199/udp --privileged --net=host --name vpn-server \
   -e HOST=$(hostname) -e SERVER_IP=10.0.47.0 -e IP_MASK=255.255.255.128 \
   -v /etc/vpn/:/certs hkjn/openvpn
```

Running a server on $(hostname) requires that /etc/vpn exists and contains the
following files:
* `ca.pem`: The CA certificate.
* `$(hostname)-key.pem`: The key for the server.
* `$(hostname).pem`: The certificate for the server.
* `dh.pem`: Diffie-Hellman parameters.

## Generating certs

The certificates can be generated using `hkjn/pki`:

```
$ docker run -v /etc/vpn:/certs hkjn/pki initca
$ docker run -v /etc/vpn:/certs hkjn/pki gencert $(hostname)

```

## Generating DH params

The Diffie-Hellman parameters can be generated with:

```
openssl dhparam -outform PEM -out dhparam.pem 4096
```
{'fraction_non_alphanumeric': 0.1457096600107933, 'fraction_numerical': 0.032379924446842956, 'mean_word_length': 3.7783505154639174, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5023047', 'n_tokens_mistral': 770, 'n_tokens_neox': 684, 'n_words': 209}