<commit_before># dynonym

`dynonym` is a minimalistic HTTP server that manages dynamic DNS records. It operates on the edge between the Web and the Domain Name System, taking care of the following tasks:

1. Listening for incoming update requests via HTTP.
2. Verifying authentication and authorization.
3. Forwarding the request to a DNS server using [RFC 2136][30].

`dynonym` is written in [Rust][10] and built on top of [Rocket][20]. Its functionality is inspired by [No-IP][40] and [DynDNS][50].

## Prerequisites

Using `dynonym` makes almost no sense without a DNS server that allows for dynamic updates using [RFC 2136][30]: While most commands will still work, the very basic update functionality will fail as soon as the first update request comes in. Therefore, it is recommended to setup your DNS server first. Doing this goes beyond the scope of this explanation! Look at the documentation of your DNS server!

If you want to compile `dynonym`, you will need a nightly version of the Rust compiler and the Cargo package manager. Consider using [`rustup`][60]!

## Installation

TODO

## Configuration

`dynonym` uses a TOML-encoded configuration file. While it is possible to write it by hand, it easier to use the command line tool. The most important commands are listed below. In case you are searching for a more advanced feature not listed here, consider using `--help` in any context!

- `dynonym configure default`

  Creates a default configuration. You may want to specify the configuration file using `--config <FILE>`.

- `dynonym configure dns --socket <ADDR>`

  Specifies the socket address (IP address and port) of your DNS server. You will need to adjust these settings in order to get `dynonym` working.

- `dynonym configure users add <USER>`

  Adds a user. Since there is no default user within the default configuration, you will need to add one. (Note: This is not a bug but a security feature!)

- `dynonym configure users auth <USER> <DOMAIN>`

  Authorizes a user to update a domain.

## Running the server

Type `dynonym serve`!

This command will start the HTTP server and listen for incoming update requests. You can stop the server with `Ctrl+C`.

The server creates a lock file that is auto-removed when the server stops. The lock file makes sure that only one instance is running at a time. It contains the process ID. Under Linux, you may use `kill -s SIGINT $(< dynonym.lock)` to stop a server instance running in the background. You can specify the lock file using `--lock <FILE>`.

## Routes
<commit_msg>Enhancement<commit_after># dynonym

`dynonym` is a minimalistic HTTP server that manages dynamic DNS records. It operates on the edge between the Web and the Domain Name System, taking care of the following tasks:

1. Listening for incoming update requests via HTTP.
2. Verifying authentication and authorization.
3. Forwarding the request to a DNS server using [RFC 2136][30].

`dynonym` is written in [Rust][10] and built on top of [Rocket][20]. Its functionality is inspired by [No-IP][40] and [DynDNS][50].

## Prerequisites

Using `dynonym` makes almost no sense without a DNS server that allows for dynamic updates using [RFC 2136][30]: While most commands will still work, the very basic update functionality will fail as soon as the first update request comes in. Therefore, it is recommended to setup your DNS server first. Doing this goes beyond the scope of this explanation! Look at the documentation of your DNS server!

If you want to compile `dynonym`, you will need a nightly version of the Rust compiler and the Cargo package manager. Consider using [`rustup`][60]!

## Installation

TODO

## Configuration

`dynonym` uses a TOML-encoded configuration file. While it is possible to write it by hand, it easier to use the command line tool. The most important commands are listed below. In case you are searching for a more advanced feature not listed here, consider using `--help` in any context!

- `dynonym configure default`

  Creates a default configuration. You may want to specify the configuration file using `--config <FILE>`.

- `dynonym configure dns --socket <ADDR>`

  Specifies the socket address (IP address and port) of your DNS server. You will need to adjust these settings in order to get `dynonym` working with your DNS server.

- `dynonym configure users add <USER>`

  Adds a user. Since there is no default user within the default configuration, you will need to add one. (Note: This is not a bug but a security feature!)

- `dynonym configure users auth <USER> <DOMAIN>`

  Authorizes a user to update a domain.

## Running the server

Type `dynonym serve`!

This command will start the HTTP server and listen for incoming update requests. You can stop the server with `Ctrl+C`.

The server creates a lock file that is auto-removed when the server stops. The lock file makes sure that only one instance is running at a time. It contains the process ID. Under Linux, you may use `kill -s SIGINT $(< dynonym.lock)` to stop a server instance running in the background. You can specify the lock file using `--lock <FILE>`.

## Routes

{'fraction_non_alphanumeric': 0.06246340035135663, 'fraction_numerical': 0.009759906304899472, 'mean_word_length': 4.2339121552604695, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 15, 'https://': 0, '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': '1609821', 'n_tokens_mistral': 1347, 'n_tokens_neox': 1284, 'n_words': 804}