diff --git a/htdocs/luci-static/resources/view/homeproxy/node.js b/htdocs/luci-static/resources/view/homeproxy/node.js index 78a1a742..d20078bb 100644 --- a/htdocs/luci-static/resources/view/homeproxy/node.js +++ b/htdocs/luci-static/resources/view/homeproxy/node.js @@ -1050,8 +1050,20 @@ function renderNodeSettings(section, data, features, main_node, routing_mode) { o.default = o.disabled; o.modalonly = true; - o = s.option(form.DynamicList, 'tls_ech_config', _('ECH config')); + 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.validate = L.bind(hp.validateCertificatePath, this); + o.rmempty = false; + 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; } diff --git a/root/etc/homeproxy/scripts/generate_client.uc b/root/etc/homeproxy/scripts/generate_client.uc index dfb7f611..4c567733 100755 --- a/root/etc/homeproxy/scripts/generate_client.uc +++ b/root/etc/homeproxy/scripts/generate_client.uc @@ -241,7 +241,7 @@ function generate_outbound(node) { enabled: true, dynamic_record_sizing_disabled: (node.tls_ech_tls_disable_drs === '1'), pq_signature_schemes_enabled: (node.tls_ech_enable_pqss === '1'), - config: node.tls_ech_config + config_path: node.tls_ech_config_path } : null, utls: !isEmpty(node.tls_utls) ? { enabled: true,