refactor: remove direct DNS mode

This commit is contained in:
benya
2026-07-21 20:24:25 +03:00
parent 5e4e659cae
commit 15b5b7f792
33 changed files with 24 additions and 1148 deletions
+2 -20
View File
@@ -1,8 +1,7 @@
# OpenWrt RMM Agent
Current stable Go agent: `0.6.0`. It reports runtime health, pending command results,
the last heartbeat transport error after connectivity is restored, and optionally keeps
the router's direct DNS addresses current.
Current stable Go agent: `0.6.1`. It reports runtime health, pending command results,
and the last heartbeat transport error after connectivity is restored.
Production Go agent for OpenWrt, with the shell implementation retained as a fallback runtime.
@@ -29,10 +28,6 @@ SERVER_URL="https://rmm.example.com"
ENROLLMENT_TOKEN="paste-a-one-time-grant-from-your-account"
INTERVAL_SECONDS="30"
TUNNEL_IDENTITY_FILE="/etc/rmm-agent/tunnel_key"
DIRECT_DNS_ENABLED="false"
DNS_UPDATE_INTERVAL_SECONDS="300"
PUBLIC_IPV4_URL="https://api.ipify.org"
PUBLIC_IPV6_URL="https://api6.ipify.org"
```
After enrollment the agent writes:
@@ -84,19 +79,6 @@ The Go agent is available as the production OpenWrt package and supports the mig
Other queued commands are reported as failed with a clear message.
### Direct DNS updates
Direct DNS reporting is opt-in. When enabled, the agent queries the configured HTTPS
endpoints in parallel, validates that their responses are public IPv4/IPv6 addresses, and
sends the complete address state through `/api/agent/dns/update` using its existing device
token. A successful update is refreshed every five minutes by default; failures retry after
one minute and do not make the main heartbeat unhealthy.
The default discovery endpoints are operated by ipify. Clear the IPv6 URL on routers without
public IPv6, or replace either endpoint with trusted HTTPS services under your control. The
agent refuses HTTP URLs, embedded URL credentials, redirects, oversized responses, and
private or reserved addresses.
Build locally:
```sh