Skip to content

Commit

Permalink
feat(client): add support for ech_config_path
Browse files Browse the repository at this point in the history
  • Loading branch information
saldry committed Dec 5, 2024
1 parent c55edcd commit 7f620fc
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
14 changes: 13 additions & 1 deletion htdocs/luci-static/resources/view/homeproxy/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
_('<strong>Save your configuration before uploading files!</strong>'));
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;
}

Expand Down
2 changes: 1 addition & 1 deletion root/etc/homeproxy/scripts/generate_client.uc
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 7f620fc

Please sign in to comment.