Fix dashboard template bugs, acme date parsing, wireguard sudoers match, and stale docs
- dashboard.html: Fix zones, leases, wg_status, cert key names, add services var
- server.py: Pass services to dashboard template via _get_service_status()
- lib/acme.py: Fix dead third date format (%Y%m%d%H%M%z) using astimezone(UTC)
- lib/wireguard.py: Add -- separator to cp command to match sudoers rule
- lib/nginx.py: Replace shallow dict.copy() with {**...} for DEFAULT_SSL
- AGENTS.md: Update test count 149 -> 154
- docs/api.md: Rename cert field expiry -> expires_at
This commit is contained in:
+86
-18
@@ -74,7 +74,7 @@ Return detailed configuration for a single zone.
|
||||
| `target` | `string` | Zone target (e.g., `"default"`, `"ACCEPT"`, `"REJECT"`) |
|
||||
| `interfaces` | `[string, ...]` | Interfaces assigned to this zone |
|
||||
| `services` | `[string, ...]` | Services allowed through the zone |
|
||||
| `ports` | `[{port: number, proto: string}, ...]` | Explicit port rules |
|
||||
| `ports` | `[string, ...]` | Explicit port rules (format: `"443/tcp"`) |
|
||||
| `masquerade` | `boolean` | Whether masquerade (NAT) is enabled |
|
||||
| `forward_ports` | `[{port: number, proto: string, toaddr: string, toport: number}, ...]` | Port forward rules |
|
||||
| `rich_rules` | `[string, ...]` | Rich rule definitions |
|
||||
@@ -130,7 +130,12 @@ Replace all interfaces assigned to the zone with the provided list.
|
||||
|-------|------|----------|-------------|
|
||||
| `interfaces` | `[string, ...]` | Yes | List of interface names |
|
||||
|
||||
**Response:** `data` is `null` on success.
|
||||
**Response (`data`):**
|
||||
|
||||
| Field | Type | Description |
|
||||
|-------|------|-------------|
|
||||
| `zone` | `string` | Zone name |
|
||||
| `interfaces` | `[string, ...]` | List of interface names now assigned to the zone |
|
||||
|
||||
---
|
||||
|
||||
@@ -148,7 +153,12 @@ Replace all services allowed in the zone with the provided list.
|
||||
|-------|------|----------|-------------|
|
||||
| `services` | `[string, ...]` | Yes | List of firewalld service names |
|
||||
|
||||
**Response:** `data` is `null` on success.
|
||||
**Response (`data`):**
|
||||
|
||||
| Field | Type | Description |
|
||||
|-------|------|-------------|
|
||||
| `zone` | `string` | Zone name |
|
||||
| `services` | `[string, ...]` | List of services now allowed in the zone |
|
||||
|
||||
### Firewall Rules
|
||||
|
||||
@@ -167,7 +177,12 @@ Add a firewalld rich rule to a zone.
|
||||
| `zone` | `string` | Yes | Zone to add the rule to |
|
||||
| `rule` | `string` | Yes | Full rich rule string |
|
||||
|
||||
**Response:** `data` is `null` on success.
|
||||
**Response (`data`):**
|
||||
|
||||
| Field | Type | Description |
|
||||
|-------|------|-------------|
|
||||
| `zone` | `string` | Zone name |
|
||||
| `rule` | `string` | Full rich rule string |
|
||||
|
||||
---
|
||||
|
||||
@@ -186,7 +201,12 @@ Remove an existing rich rule from a zone. The `rule` string must match exactly.
|
||||
| `zone` | `string` | Yes | Zone the rule belongs to |
|
||||
| `rule` | `string` | Yes | Exact rich rule string to remove |
|
||||
|
||||
**Response:** `data` is `null` on success.
|
||||
**Response (`data`):**
|
||||
|
||||
| Field | Type | Description |
|
||||
|-------|------|-------------|
|
||||
| `zone` | `string` | Zone name |
|
||||
| `rule` | `string` | Exact rich rule string that was removed |
|
||||
|
||||
---
|
||||
|
||||
@@ -221,7 +241,12 @@ Toggle masquerade (source NAT) for a zone.
|
||||
| `zone` | `string` | Yes | Zone to configure |
|
||||
| `enable` | `boolean` | Yes | `true` to enable, `false` to disable |
|
||||
|
||||
**Response:** `data` is `null` on success.
|
||||
**Response (`data`):**
|
||||
|
||||
| Field | Type | Description |
|
||||
|-------|------|-------------|
|
||||
| `zone` | `string` | Zone name |
|
||||
| `masquerade` | `boolean` | Whether masquerade is now enabled for the zone |
|
||||
|
||||
---
|
||||
|
||||
@@ -243,7 +268,13 @@ Add a port forwarding rule to a zone.
|
||||
| `toaddr` | `string` | No | Internal destination address |
|
||||
| `toport` | `number` | No | Internal destination port |
|
||||
|
||||
**Response:** `data` is `null` on success.
|
||||
**Response (`data`):**
|
||||
|
||||
| Field | Type | Description |
|
||||
|-------|------|-------------|
|
||||
| `zone` | `string` | Zone name |
|
||||
| `port` | `number` | External port |
|
||||
| `proto` | `string` | Protocol (`"tcp"` or `"udp"`) |
|
||||
|
||||
---
|
||||
|
||||
@@ -265,7 +296,13 @@ Remove a port forwarding rule. The body must match the original rule exactly.
|
||||
| `toaddr` | `string` | No | Internal destination address |
|
||||
| `toport` | `number` | No | Internal destination port |
|
||||
|
||||
**Response:** `data` is `null` on success.
|
||||
**Response (`data`):**
|
||||
|
||||
| Field | Type | Description |
|
||||
|-------|------|-------------|
|
||||
| `zone` | `string` | Zone name |
|
||||
| `port` | `number` | External port |
|
||||
| `proto` | `string` | Protocol (`"tcp"` or `"udp"`) |
|
||||
|
||||
### Info
|
||||
|
||||
@@ -403,7 +440,13 @@ Add a static (reserved) DHCP lease.
|
||||
| `ip` | `string` | Yes | Reserved IP address |
|
||||
| `hostname` | `string` | No | Hostname for the reservation |
|
||||
|
||||
**Response:** `data` is `null` on success.
|
||||
**Response (`data`):**
|
||||
|
||||
| Field | Type | Description |
|
||||
|-------|------|-------------|
|
||||
| `mac` | `string` | MAC address |
|
||||
| `ip` | `string` | Reserved IP address |
|
||||
| `hostname` | `string` | Hostname for the reservation |
|
||||
|
||||
---
|
||||
|
||||
@@ -442,7 +485,13 @@ Add a custom DNS A record served by dnsmasq.
|
||||
| `name` | `string` | Yes | Fully qualified domain name |
|
||||
| `address` | `string` | Yes | IP address to resolve to |
|
||||
|
||||
**Response:** `data` is `null` on success.
|
||||
**Response (`data`):**
|
||||
|
||||
| Field | Type | Description |
|
||||
|-------|------|-------------|
|
||||
| `name` | `string` | Fully qualified domain name |
|
||||
| `address` | `string` | IP address |
|
||||
| `hostname` | `string` | Short hostname |
|
||||
|
||||
---
|
||||
|
||||
@@ -505,7 +554,11 @@ Add a new reverse proxy domain.
|
||||
| `backend_port` | `number` | Yes | Backend server port |
|
||||
| `backend_proto` | `string` | No | Backend protocol (`"http"` or `"https"`); defaults to `"http"` |
|
||||
|
||||
**Response:** `data` is `null` on success.
|
||||
**Response (`data`):**
|
||||
|
||||
| Field | Type | Description |
|
||||
|-------|------|-------------|
|
||||
| `domain` | `string` | Domain name |
|
||||
|
||||
Returns HTTP `400` if the domain is already configured.
|
||||
|
||||
@@ -548,7 +601,11 @@ Update one or more fields of an existing domain entry. Only the fields present i
|
||||
| `backend_port` | `number` | No | Backend server port |
|
||||
| `backend_proto` | `string` | No | Backend protocol |
|
||||
|
||||
**Response:** `data` is `null` on success.
|
||||
**Response (`data`):**
|
||||
|
||||
| Field | Type | Description |
|
||||
|-------|------|-------------|
|
||||
| `domain` | `string` | Domain name |
|
||||
|
||||
Returns HTTP `404` if the domain is not configured.
|
||||
|
||||
@@ -562,7 +619,11 @@ DELETE /api/proxy/domains/<domain>
|
||||
|
||||
Remove a proxy domain and its nginx configuration.
|
||||
|
||||
**Response:** `data` is `null` on success.
|
||||
**Response (`data`):**
|
||||
|
||||
| Field | Type | Description |
|
||||
|-------|------|-------------|
|
||||
| `domain` | `string` | Domain name |
|
||||
|
||||
Returns HTTP `404` if the domain is not configured.
|
||||
|
||||
@@ -648,7 +709,7 @@ Each certificate object:
|
||||
| Field | Type | Description |
|
||||
|-------|------|-------------|
|
||||
| `domain` | `string` | Domain the certificate covers |
|
||||
| `expiry` | `string` | Expiration date (ISO 8601) |
|
||||
| `expires_at` | `string` | Expiration date (ISO 8601) |
|
||||
| `days_until_expiry` | `number` | Remaining days until expiration |
|
||||
| `cert_path` | `string` | Path to the certificate file |
|
||||
| `key_path` | `string` | Path to the private key file |
|
||||
@@ -668,7 +729,7 @@ Return details for a single certificate.
|
||||
| Field | Type | Description |
|
||||
|-------|------|-------------|
|
||||
| `domain` | `string` | Domain |
|
||||
| `expiry` | `string` | Expiration date (ISO 8601) |
|
||||
| `expires_at` | `string` | Expiration date (ISO 8601) |
|
||||
| `days_until_expiry` | `number` | Remaining days |
|
||||
| `cert_path` | `string` | Certificate file path |
|
||||
| `key_path` | `string` | Private key file path |
|
||||
@@ -690,7 +751,6 @@ Request a new certificate for a domain.
|
||||
| Field | Type | Required | Description |
|
||||
|-------|------|----------|-------------|
|
||||
| `domain` | `string` | Yes | Domain to issue the certificate for |
|
||||
| `standalone` | `boolean` | No | Use standalone (TCP) validation; defaults to `false` (HTTP-01 via existing webroot) |
|
||||
| `webroot` | `string` | No | Custom webroot path for HTTP-01 validation |
|
||||
|
||||
**Response:** `data` is `null` on success.
|
||||
@@ -741,7 +801,11 @@ Set or update the ACME account contact email (used by Let's Encrypt for expirati
|
||||
|-------|------|----------|-------------|
|
||||
| `email` | `string` | Yes | Contact email address |
|
||||
|
||||
**Response:** `data` is `null` on success.
|
||||
**Response (`data`):**
|
||||
|
||||
| Field | Type | Description |
|
||||
|-------|------|-------------|
|
||||
| `email` | `string` | Contact email address |
|
||||
|
||||
---
|
||||
|
||||
@@ -888,7 +952,11 @@ Remove a configured peer.
|
||||
|-------|------|----------|-------------|
|
||||
| `name` | `string` | Yes | Peer name to remove |
|
||||
|
||||
**Response:** `data` is `null` on success.
|
||||
**Response (`data`):**
|
||||
|
||||
| Field | Type | Description |
|
||||
|-------|------|-------------|
|
||||
| `name` | `string` | Peer name |
|
||||
|
||||
Returns HTTP `404` if the peer is not found.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user