luci-app-sshtunnel: servers: make a link to man ssh_config
Use Debian man pages because it has many versions and languages. Signed-off-by: Sergey Ponomarev <stokito@gmail.com>
This commit is contained in:
parent
8755aa3a71
commit
059850ba0c
1 changed files with 26 additions and 17 deletions
|
@ -46,9 +46,12 @@ return view.extend({
|
||||||
o = s.taboption('general', form.Value, 'user', _('User'));
|
o = s.taboption('general', form.Value, 'user', _('User'));
|
||||||
o.default = 'root';
|
o.default = 'root';
|
||||||
|
|
||||||
o = s.taboption('general', form.ListValue, 'IdentityFile', _('Key file'),
|
o = s.taboption('general', form.ListValue, 'IdentityFile', _('Identity Key'),
|
||||||
_('Private key file with authentication identity. ' +
|
_('Private key file with authentication identity.') + '<br />' +
|
||||||
'See <em>ssh_config IdentityFile</em>')
|
_('If not specified then a default will be used.') + '<br />' +
|
||||||
|
_('For Dropbear %s').format('<code>id_dropbear</code>') + '<br />' +
|
||||||
|
_('For OpenSSH %s').format('<code>id_rsa, id_ed25519, id_ecdsa</code>') +
|
||||||
|
_manSshConfig('IdentityFile')
|
||||||
);
|
);
|
||||||
o.value('');
|
o.value('');
|
||||||
for (var sshKeyName of sshKeyNames) {
|
for (var sshKeyName of sshKeyNames) {
|
||||||
|
@ -57,7 +60,7 @@ return view.extend({
|
||||||
o.optional = true;
|
o.optional = true;
|
||||||
|
|
||||||
|
|
||||||
o = s.taboption('advanced', form.ListValue, 'LogLevel', _('Log level'), 'See <em>ssh_config LogLevel</em>');
|
o = s.taboption('advanced', form.ListValue, 'LogLevel', _('Log level'));
|
||||||
o.value('QUIET', 'QUIET');
|
o.value('QUIET', 'QUIET');
|
||||||
o.value('FATAL', 'FATAL');
|
o.value('FATAL', 'FATAL');
|
||||||
o.value('ERROR', 'ERROR');
|
o.value('ERROR', 'ERROR');
|
||||||
|
@ -70,8 +73,8 @@ return view.extend({
|
||||||
o.modalonly = true;
|
o.modalonly = true;
|
||||||
|
|
||||||
o = s.taboption('advanced', form.ListValue, 'Compression', _('Use compression'),
|
o = s.taboption('advanced', form.ListValue, 'Compression', _('Use compression'),
|
||||||
_('Compression may be useful on slow connections. ' +
|
_('Compression may be useful on slow connections.') +
|
||||||
'See <em>ssh_config Compression</em>')
|
_manSshConfig('Compression')
|
||||||
);
|
);
|
||||||
o.value('yes', _('Yes'));
|
o.value('yes', _('Yes'));
|
||||||
o.value('no', _('No'));
|
o.value('no', _('No'));
|
||||||
|
@ -87,18 +90,17 @@ return view.extend({
|
||||||
o.optional = true;
|
o.optional = true;
|
||||||
o.modalonly = true;
|
o.modalonly = true;
|
||||||
|
|
||||||
o = s.taboption('advanced', form.Value, 'ServerAliveCountMax', _('Server alive count max'),
|
o = s.taboption('advanced', form.Value, 'ServerAliveCountMax', _('Server keep alive attempts'),
|
||||||
_('The number of server alive messages which may be sent before SSH disconnects from the server. ' +
|
_('The number of server alive messages which may be sent before SSH disconnects from the server.') +
|
||||||
'See <em>ssh_config ServerAliveCountMax</em>')
|
_manSshConfig('ServerAliveCountMax')
|
||||||
);
|
);
|
||||||
o.placeholder = '3';
|
o.placeholder = '3';
|
||||||
o.datatype = 'uinteger';
|
o.datatype = 'uinteger';
|
||||||
o.optional = true;
|
o.optional = true;
|
||||||
o.modalonly = true;
|
o.modalonly = true;
|
||||||
|
|
||||||
o = s.taboption('advanced', form.Value, 'ServerAliveInterval', _('Server alive interval'),
|
o = s.taboption('advanced', form.Value, 'ServerAliveInterval', _('Server keep alive interval (seconds)'),
|
||||||
_('Keep-alive interval (seconds). ' +
|
_manSshConfig('ServerAliveInterval')
|
||||||
'See <em>ssh_config ServerAliveInterval</em>')
|
|
||||||
);
|
);
|
||||||
o.optional = true;
|
o.optional = true;
|
||||||
o.default = '60';
|
o.default = '60';
|
||||||
|
@ -106,9 +108,9 @@ return view.extend({
|
||||||
o.modalonly = true;
|
o.modalonly = true;
|
||||||
|
|
||||||
o = s.taboption('advanced', form.ListValue, 'CheckHostIP', _('Check host IP'),
|
o = s.taboption('advanced', form.ListValue, 'CheckHostIP', _('Check host IP'),
|
||||||
_('Check the host IP address in the <code>known_hosts</code> file. ' +
|
_('Check the host IP address in the %s file.').format('<code>known_hosts</code>') + '<br />' +
|
||||||
'This allows ssh to detect whether a host key changed due to DNS spoofing. ' +
|
_('This allows SSH to detect whether a host key changed due to DNS spoofing.') +
|
||||||
'See <em>ssh_config CheckHostIP</em>')
|
_manSshConfig('CheckHostIP')
|
||||||
);
|
);
|
||||||
o.value('yes', _('Yes'));
|
o.value('yes', _('Yes'));
|
||||||
o.value('no', _('No'));
|
o.value('no', _('No'));
|
||||||
|
@ -116,8 +118,9 @@ return view.extend({
|
||||||
o.modalonly = true;
|
o.modalonly = true;
|
||||||
|
|
||||||
o = s.taboption('advanced', form.ListValue, 'StrictHostKeyChecking', _('Strict host key checking'),
|
o = s.taboption('advanced', form.ListValue, 'StrictHostKeyChecking', _('Strict host key checking'),
|
||||||
_('Refuse to connect to hosts whose host key has changed. ' +
|
_('Refuse to connect to hosts whose host key has changed.') +
|
||||||
'See <em>ssh_config StrictHostKeyChecking</em>'));
|
_manSshConfig('StrictHostKeyChecking')
|
||||||
|
);
|
||||||
o.value('accept-new', _('Accept new and check if not changed'));
|
o.value('accept-new', _('Accept new and check if not changed'));
|
||||||
o.value('yes', _('Yes'));
|
o.value('yes', _('Yes'));
|
||||||
o.value('no', _('No'));
|
o.value('no', _('No'));
|
||||||
|
@ -149,3 +152,9 @@ function _findAllPossibleIdKeys(entries) {
|
||||||
}
|
}
|
||||||
return Array.from(sshKeyNames);
|
return Array.from(sshKeyNames);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function _manSshConfig(opt) {
|
||||||
|
return '<br />' + _('See %s.')
|
||||||
|
.format('<a target="_blank" href="https://manpages.debian.org/testing/openssh-client/ssh_config.5#'+ opt + '">ssh_config ' + opt + '</a>');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue