# neu-ece-esl/duckdns_auto_update architecture

> Architecture diagram of the GitHub repository neu-ece-esl/duckdns_auto_update, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/neu-ece-esl/duckdns_auto_update
- Repository: https://github.com/neu-ece-esl/duckdns_auto_update

## Overview

This is a small DuckDNS updater for machines behind NAT: it selects a physical interface, obtains its local IP, and supplies that address to a DuckDNS update. The documented selection uses a configured MAC address, with an optional interface name as fallback; domain and token identify the update target. The README describes the workflow and cron invocation, but no source excerpts were provided, so implementation-level calls and the exact update transport cannot be verified.

Main entry points: [`makefile`](https://github.com/neu-ece-esl/duckdns_auto_update/blob/main/makefile) (Update routine), [`find_IF_using_MAC_addr`](https://github.com/neu-ece-esl/duckdns_auto_update/blob/main/find_IF_using_MAC_addr) (Interface selection), [`.example-domain/if_mac_addr`](https://github.com/neu-ece-esl/duckdns_auto_update/blob/main/.example-domain/if_mac_addr) (MAC address), [`.example-domain/interface`](https://github.com/neu-ece-esl/duckdns_auto_update/blob/main/.example-domain/interface) (Interface fallback)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_configuration["Configuration"]
  node_mac_config["MAC address<br/>[if_mac_addr]"]
  node_interface_config["Interface fallback<br/>[interface]"]
  node_domain_config["DuckDNS domain<br/>[domain]"]
  node_token_config["DuckDNS token<br/>[token]"]
end

subgraph group_runtime["Update runtime"]
  node_make_update["Update routine"]
  node_interface_lookup["Interface selection"]
  node_local_ip["Local IP lookup"]
end

node_cron(("Cron job"))
node_duckdns{{"DuckDNS service"}}

node_cron -->|"runs periodically"| node_make_update
node_mac_config -->|"selects by MAC"| node_interface_lookup
node_interface_config -->|"fallback interface"| node_interface_lookup
node_interface_lookup -->|"provides interface"| node_local_ip
node_make_update -->|"gets local IP"| node_local_ip
node_domain_config -->|"identifies domain"| node_make_update
node_token_config -->|"authenticates update"| node_make_update
node_make_update -->|"updates address"| node_duckdns

click node_make_update "https://github.com/neu-ece-esl/duckdns_auto_update/blob/main/makefile"
click node_mac_config "https://github.com/neu-ece-esl/duckdns_auto_update/blob/main/.example-domain/if_mac_addr"
click node_interface_config "https://github.com/neu-ece-esl/duckdns_auto_update/blob/main/.example-domain/interface"
click node_domain_config "https://github.com/neu-ece-esl/duckdns_auto_update/blob/main/.example-domain/domain"
click node_token_config "https://github.com/neu-ece-esl/duckdns_auto_update/blob/main/.example-domain/token"
click node_interface_lookup "https://github.com/neu-ece-esl/duckdns_auto_update/blob/main/find_IF_using_MAC_addr"
click node_local_ip "https://github.com/neu-ece-esl/duckdns_auto_update/blob/main/makefile"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_mac_config,node_interface_config,node_domain_config,node_token_config toneBlue
class node_make_update,node_interface_lookup,node_local_ip toneAmber
class node_cron,node_duckdns toneIndigo
```

## Components

### Configuration

- [MAC address](https://github.com/neu-ece-esl/duckdns_auto_update/blob/main/.example-domain/if_mac_addr): `.example-domain/if_mac_addr`
- [Interface fallback](https://github.com/neu-ece-esl/duckdns_auto_update/blob/main/.example-domain/interface): `.example-domain/interface`
- [DuckDNS domain](https://github.com/neu-ece-esl/duckdns_auto_update/blob/main/.example-domain/domain): `.example-domain/domain`
- [DuckDNS token](https://github.com/neu-ece-esl/duckdns_auto_update/blob/main/.example-domain/token): `.example-domain/token`

### Update runtime

- [Update routine](https://github.com/neu-ece-esl/duckdns_auto_update/blob/main/makefile): `makefile`
- [Interface selection](https://github.com/neu-ece-esl/duckdns_auto_update/blob/main/find_IF_using_MAC_addr): `find_IF_using_MAC_addr`
- [Local IP lookup](https://github.com/neu-ece-esl/duckdns_auto_update/blob/main/makefile): `makefile`

### Other components

- **Cron job**
- **DuckDNS service**

## Connections

- Cron job → Update routine: runs periodically (evidence: `README.md`)
- MAC address → Interface selection: selects by MAC (evidence: `README.md`)
- Interface fallback → Interface selection: fallback interface (evidence: `README.md`)
- Interface selection → Local IP lookup: provides interface (evidence: `README.md`)
- Update routine → Local IP lookup: gets local IP (evidence: `README.md`)
- DuckDNS domain → Update routine: identifies domain (evidence: `README.md`)
- DuckDNS token → Update routine: authenticates update (evidence: `README.md`)
- Update routine → DuckDNS service: updates address (evidence: `README.md`)
