feat: add srv record support and improved documentation for txt records
This commit is contained in:
parent
9cc6330f85
commit
188b527219
3 changed files with 34 additions and 0 deletions
|
|
@ -20,3 +20,14 @@ unbound_zones:
|
||||||
|
|
||||||
- name: "server.example.internal"
|
- name: "server.example.internal"
|
||||||
value: "192.168.1.0"
|
value: "192.168.1.0"
|
||||||
|
|
||||||
|
- name: "example.internal"
|
||||||
|
type: "TXT"
|
||||||
|
value: "v=spf1 include:example.internal ~all"
|
||||||
|
|
||||||
|
- name: "_sip._tcp.example.internal"
|
||||||
|
type: "SRV"
|
||||||
|
priority: 10
|
||||||
|
weight: 60
|
||||||
|
port: 5060
|
||||||
|
value: "server.example.internal"
|
||||||
|
|
|
||||||
21
readme.md
21
readme.md
|
|
@ -31,4 +31,25 @@ unbound_zones:
|
||||||
value: "10.0.1.10"
|
value: "10.0.1.10"
|
||||||
- name: "server2.internal.example.com"
|
- name: "server2.internal.example.com"
|
||||||
value: "10.0.1.11"
|
value: "10.0.1.11"
|
||||||
|
- name: "internal.example.com"
|
||||||
|
type: "TXT"
|
||||||
|
value: "v=spf1 include:internal.example.com ~all"
|
||||||
|
- name: "_sip._tcp.internal.example.com"
|
||||||
|
type: "SRV"
|
||||||
|
priority: 10
|
||||||
|
weight: 60
|
||||||
|
port: 5060
|
||||||
|
value: "server1.internal.example.com"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Supported Record Types
|
||||||
|
|
||||||
|
| Type | Required Fields | Description |
|
||||||
|
|------|----------------|-------------|
|
||||||
|
| `A` (default) | `name`, `value` | IPv4 address record |
|
||||||
|
| `AAAA` | `name`, `value`, `type` | IPv6 address record |
|
||||||
|
| `CNAME` | `name`, `value`, `type` | Canonical name |
|
||||||
|
| `MX` | `name`, `value`, `type`, `priority` | Mail exchange |
|
||||||
|
| `TXT` | `name`, `value`, `type` | Text record |
|
||||||
|
| `SRV` | `name`, `value`, `type`, `priority`, `weight`, `port` | Service locator |
|
||||||
|
| `PTR` | `name`, `value`, `type` | Pointer record |
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,8 @@ server:
|
||||||
local-data: "{{ record.name }}. IN CNAME {{ record.value }}"
|
local-data: "{{ record.name }}. IN CNAME {{ record.value }}"
|
||||||
{% elif record.get('type', 'A') == 'TXT' %}
|
{% elif record.get('type', 'A') == 'TXT' %}
|
||||||
local-data: "{{ record.name }}. IN TXT \"{{ record.value }}\""
|
local-data: "{{ record.name }}. IN TXT \"{{ record.value }}\""
|
||||||
|
{% elif record.get('type', 'A') == 'SRV' %}
|
||||||
|
local-data: "{{ record.name }}. IN SRV {{ record.priority }} {{ record.weight }} {{ record.port }} {{ record.value }}."
|
||||||
{% elif record.get('type', 'A') == 'PTR' %}
|
{% elif record.get('type', 'A') == 'PTR' %}
|
||||||
local-data: "{{ record.name }}. IN PTR {{ record.value }}"
|
local-data: "{{ record.name }}. IN PTR {{ record.value }}"
|
||||||
{% else %}
|
{% else %}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue