diff --git a/luci-app-homeproxy/htdocs/luci-static/resources/view/homeproxy/node.js b/luci-app-homeproxy/htdocs/luci-static/resources/view/homeproxy/node.js index 6de7fe2..35b569d 100644 --- a/luci-app-homeproxy/htdocs/luci-static/resources/view/homeproxy/node.js +++ b/luci-app-homeproxy/htdocs/luci-static/resources/view/homeproxy/node.js @@ -1086,30 +1086,28 @@ function renderNodeSettings(section, data, features, main_node, routing_mode) { o.onclick = L.bind(hp.uploadCertificate, this, _('certificate'), 'client_ca'); o.modalonly = true; - if (features.with_ech) { - o = s.option(form.Flag, 'tls_ech', _('Enable ECH'), - _('ECH (Encrypted Client Hello) is a TLS extension that allows a client to encrypt the first part of its ClientHello message.')); - o.depends('tls', '1'); - o.modalonly = true; + o = s.option(form.Flag, 'tls_ech', _('Enable ECH'), + _('ECH (Encrypted Client Hello) is a TLS extension that allows a client to encrypt the first part of its ClientHello message.')); + o.depends('tls', '1'); + o.modalonly = true; - o = s.option(form.Flag, 'tls_ech_enable_pqss', _('Enable PQ signature schemes')); - o.depends('tls_ech', '1'); - o.modalonly = true; + o = s.option(form.Flag, 'tls_ech_enable_pqss', _('Enable PQ signature schemes')); + o.depends('tls_ech', '1'); + o.modalonly = true; - o = s.option(form.Value, 'tls_ech_config_path', _('ECH config path'), - _('The path to the ECH config, in PEM format. If empty, load from DNS will be attempted.')); - o.value('/etc/homeproxy/certs/client_ech_conf.pem'); - o.depends('tls_ech', '1'); - o.modalonly = true; + o = s.option(form.Value, 'tls_ech_config_path', _('ECH config path'), + _('The path to the ECH config, in PEM format. If empty, load from DNS will be attempted.')); + o.value('/etc/homeproxy/certs/client_ech_conf.pem'); + o.depends('tls_ech', '1'); + o.modalonly = true; - o = s.option(form.Button, '_upload_ech_config', _('Upload ECH config'), - _('Save your configuration before uploading files!')); - o.inputstyle = 'action'; - o.inputtitle = _('Upload...'); - o.depends({'tls_ech': '1', 'tls_ech_config_path': '/etc/homeproxy/certs/client_ech_conf.pem'}); - o.onclick = L.bind(hp.uploadCertificate, this, _('ECH config'), 'client_ech_conf'); - o.modalonly = true; - } + o = s.option(form.Button, '_upload_ech_config', _('Upload ECH config'), + _('Save your configuration before uploading files!')); + o.inputstyle = 'action'; + o.inputtitle = _('Upload...'); + o.depends({'tls_ech': '1', 'tls_ech_config_path': '/etc/homeproxy/certs/client_ech_conf.pem'}); + o.onclick = L.bind(hp.uploadCertificate, this, _('ECH config'), 'client_ech_conf'); + o.modalonly = true; if (features.with_utls) { o = s.option(form.ListValue, 'tls_utls', _('uTLS fingerprint'), diff --git a/luci-app-homeproxy/root/etc/homeproxy/scripts/migrate_config.uc b/luci-app-homeproxy/root/etc/homeproxy/scripts/migrate_config.uc index e9f8741..22a5e02 100755 --- a/luci-app-homeproxy/root/etc/homeproxy/scripts/migrate_config.uc +++ b/luci-app-homeproxy/root/etc/homeproxy/scripts/migrate_config.uc @@ -186,8 +186,15 @@ uci.foreach(uciconfig, ucidnsrule, (cfg) => { if (dns_server_migration[cfg.server]) { if (dns_server_migration[cfg.server].strategy) uci.set(uciconfig, cfg['.name'], 'strategy', dns_server_migration[cfg.server].strategy); + if (dns_server_migration[cfg.server].client_subnet) uci.set(uciconfig, cfg['.name'], 'client_subnet', dns_server_migration[cfg.server].client_subnet); + + if (dns_server_migration[cfg.server].rcode) { + uci.set(uciconfig, cfg['.name'], 'action', 'predefined'); + uci.set(uciconfig, cfg['.name'], 'rcode', dns_server_migration[cfg.server].rcode); + uci.delete(uciconfig, cfg['.name'], 'server'); + } } });