refactor: remove direct DNS mode
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-rmm-agent
|
||||
PKG_VERSION:=0.2.0
|
||||
PKG_VERSION:=0.2.1
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_MAINTAINER:=RMM OpenWrt
|
||||
|
||||
@@ -8,7 +8,6 @@ It provides:
|
||||
- HTTPS server URL and polling interval;
|
||||
- one-time enrollment grant input;
|
||||
- connectivity targets and tunnel identity path;
|
||||
- opt-in public IPv4/IPv6 discovery and direct DNS update interval;
|
||||
- explicit lab-only HTTP override;
|
||||
- controlled device identity reset for re-enrollment.
|
||||
|
||||
@@ -68,8 +67,8 @@ application to the router. Do not copy or install the shell runtime at the same
|
||||
cd dist/rmm-openwrt-25.12.4-ramips-mt7621
|
||||
sha256sum -c SHA256SUMS
|
||||
scp \
|
||||
rmm-agent-go-production-0.6.0-r1.apk \
|
||||
luci-app-rmm-agent-0.2.0-r1.apk \
|
||||
rmm-agent-go-production-0.6.1-r1.apk \
|
||||
luci-app-rmm-agent-0.2.1-r1.apk \
|
||||
root@ROUTER_IP:/tmp/
|
||||
```
|
||||
|
||||
@@ -77,8 +76,8 @@ Then install the locally built, unsigned packages over SSH:
|
||||
|
||||
```sh
|
||||
apk add --allow-untrusted \
|
||||
/tmp/rmm-agent-go-production-0.6.0-r1.apk \
|
||||
/tmp/luci-app-rmm-agent-0.2.0-r1.apk
|
||||
/tmp/rmm-agent-go-production-0.6.1-r1.apk \
|
||||
/tmp/luci-app-rmm-agent-0.2.1-r1.apk
|
||||
/etc/init.d/rpcd restart
|
||||
/etc/init.d/uhttpd restart
|
||||
```
|
||||
|
||||
@@ -18,12 +18,6 @@ var callRcInit = rpc.declare({
|
||||
params: [ 'name', 'action' ]
|
||||
});
|
||||
|
||||
function validateDiscoveryURL(sectionId, value) {
|
||||
if (!value || /^https:\/\/[A-Za-z0-9.-]+(?::[0-9]+)?(?:\/.*)?$/.test(value))
|
||||
return true;
|
||||
return _('Public IP discovery must use an HTTPS URL without embedded credentials.');
|
||||
}
|
||||
|
||||
return view.extend({
|
||||
load: function() {
|
||||
return Promise.all([ uci.load('rmm-agent'), callServiceList('rmm-agent') ]);
|
||||
@@ -76,36 +70,6 @@ return view.extend({
|
||||
option.placeholder = '1.1.1.1 8.8.8.8';
|
||||
option.rmempty = false;
|
||||
|
||||
section = map.section(form.NamedSection, 'main', 'agent', _('Direct DNS'));
|
||||
section.anonymous = true;
|
||||
section.addremove = false;
|
||||
|
||||
option = section.option(form.Flag, 'direct_dns_enabled', _('Update public DNS addresses'));
|
||||
option.default = '0';
|
||||
option.rmempty = false;
|
||||
option.description = _('Opt-in feature for Go agent 0.6.0 or newer. The router periodically reports its public addresses to RMM.');
|
||||
|
||||
option = section.option(form.Value, 'dns_update_interval_seconds', _('Update interval'));
|
||||
option.datatype = 'range(60,86400)';
|
||||
option.default = '300';
|
||||
option.rmempty = false;
|
||||
option.depends('direct_dns_enabled', '1');
|
||||
|
||||
option = section.option(form.Value, 'public_ipv4_url', _('Public IPv4 discovery URL'));
|
||||
option.placeholder = 'https://api.ipify.org';
|
||||
option.default = 'https://api.ipify.org';
|
||||
option.rmempty = false;
|
||||
option.depends('direct_dns_enabled', '1');
|
||||
option.validate = validateDiscoveryURL;
|
||||
|
||||
option = section.option(form.Value, 'public_ipv6_url', _('Public IPv6 discovery URL'));
|
||||
option.placeholder = 'https://api6.ipify.org';
|
||||
option.default = 'https://api6.ipify.org';
|
||||
option.rmempty = true;
|
||||
option.description = _('Clear this field on routers without public IPv6.');
|
||||
option.depends('direct_dns_enabled', '1');
|
||||
option.validate = validateDiscoveryURL;
|
||||
|
||||
section = map.section(form.NamedSection, 'main', 'agent', _('Advanced settings'));
|
||||
section.anonymous = true;
|
||||
section.addremove = false;
|
||||
|
||||
Reference in New Issue
Block a user