From 6fdafc4155899da13c17ab4a6f5d78bc90cc18ef Mon Sep 17 00:00:00 2001 From: William Fleurant Date: Sat, 18 Nov 2023 09:38:47 +0100 Subject: luci-app-yggdrasil: support public key in config generation Signed-off-by: William Fleurant --- .../htdocs/luci-static/resources/protocol/yggdrasil.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'protocols/luci-proto-yggdrasil/htdocs/luci-static/resources/protocol/yggdrasil.js') diff --git a/protocols/luci-proto-yggdrasil/htdocs/luci-static/resources/protocol/yggdrasil.js b/protocols/luci-proto-yggdrasil/htdocs/luci-static/resources/protocol/yggdrasil.js index 3b878799a1..849242abff 100644 --- a/protocols/luci-proto-yggdrasil/htdocs/luci-static/resources/protocol/yggdrasil.js +++ b/protocols/luci-proto-yggdrasil/htdocs/luci-static/resources/protocol/yggdrasil.js @@ -50,10 +50,12 @@ var cbiKeyPairGenerate = form.DummyValue.extend({ 'class':'btn', 'click':ui.createHandlerFn(this, function(section_id,ev) { var prv = this.section.getUIElement(section_id,'private_key'), + pub = this.section.getUIElement(section_id,'public_key'), map = this.map; return generateKey().then(function(keypair){ prv.setValue(keypair.priv); + pub.setValue(keypair.pub); map.save(null,true); }); },section_id) @@ -189,6 +191,10 @@ return network.registerProtocol('yggdrasil', o.password=true; o.validate=validatePrivateKey; + o=s.taboption('general',form.Value,'public_key',_('Public key'),_('The public key for your Yggdrasil node')); + o.optional=true; + o.validate=validatePublicKey; + s.taboption('general',cbiKeyPairGenerate,'_gen_server_keypair',' '); o=s.taboption('advanced',form.Value,'mtu',_('MTU'),_('A default MTU of 65535 is set by Yggdrasil. It is recomended to utilize the default.')); -- cgit v1.2.3