diff options
author | William Fleurant <meshnet@protonmail.com> | 2023-11-18 09:38:47 +0100 |
---|---|---|
committer | William Fleurant <meshnet@protonmail.com> | 2023-11-18 09:38:47 +0100 |
commit | 6fdafc4155899da13c17ab4a6f5d78bc90cc18ef (patch) | |
tree | f13688a8c02d4a5622f07f515fc23475fda0d17d /protocols/luci-proto-yggdrasil/htdocs/luci-static/resources/protocol/yggdrasil.js | |
parent | e6a1f119e6ec2eed48ea583d8176c21bf658a499 (diff) |
luci-app-yggdrasil: support public key in config generation
Signed-off-by: William Fleurant <meshnet@protonmail.com>
Diffstat (limited to 'protocols/luci-proto-yggdrasil/htdocs/luci-static/resources/protocol/yggdrasil.js')
-rw-r--r-- | protocols/luci-proto-yggdrasil/htdocs/luci-static/resources/protocol/yggdrasil.js | 6 |
1 files changed, 6 insertions, 0 deletions
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.')); |