Skip to content

Commit

Permalink
Merge pull request #1546 from atsign-foundation/cpswan-tidy-sshnpd-args
Browse files Browse the repository at this point in the history
chore: Greater consistency in spacing and formatting of options
  • Loading branch information
cpswan authored Nov 18, 2024
2 parents e22631a + 2baa8eb commit ae68b7b
Showing 1 changed file with 31 additions and 18 deletions.
49 changes: 31 additions & 18 deletions packages/dart/noports_core/lib/src/sshnpd/sshnpd_params.dart
Original file line number Diff line number Diff line change
Expand Up @@ -153,12 +153,14 @@ class SshnpdParams {
aliases: const ['keyFile'],
help: 'Sending atSign\'s keyFile if not in ~/.atsign/keys/',
);

parser.addOption(
'atsign',
abbr: 'a',
mandatory: true,
help: 'atSign of this device',
);

parser.addOption(
'managers',
aliases: ['manager'],
Expand All @@ -171,6 +173,7 @@ class SshnpdParams {
' the daemon will check with the --policy-manager atSign re '
' requests which come from atSigns not in the --managers list.',
);

parser.addOption(
'policy-manager',
abbr: 'p',
Expand All @@ -182,6 +185,7 @@ class SshnpdParams {
' the daemon will check with the --policy-manager atSign re '
' requests which come from atSigns not in the --managers list.',
);

parser.addOption(
'device',
abbr: 'd',
Expand All @@ -199,6 +203,7 @@ class SshnpdParams {
help: 'When set, will update authorized_keys'
' to include public key sent by manager',
);

parser.addFlag(
'hide',
abbr: 'h',
Expand All @@ -208,6 +213,7 @@ class SshnpdParams {
' atSign. Even with this enabled, sshnpd will still respond to ping'
' requests from the manager. (This takes priority over -u / --un-hide)',
);

parser.addFlag(
'un-hide',
abbr: 'u',
Expand All @@ -222,21 +228,24 @@ class SshnpdParams {
}
},
);

parser.addFlag(
'verbose',
abbr: 'v',
help: 'More logging',
);

parser.addOption('ssh-client',
mandatory: false,
defaultsTo: DefaultSshnpdArgs.sshClient.toString(),
allowed: SupportedSshClient.values
.map(
(c) => c.toString(),
)
.toList(),
help: 'What to use for outbound ssh connections.');
parser.addOption(
'ssh-client',
mandatory: false,
defaultsTo: DefaultSshnpdArgs.sshClient.toString(),
allowed: SupportedSshClient.values
.map(
(c) => c.toString(),
)
.toList(),
help: 'What to use for outbound ssh connections.',
);

parser.addOption(
'root-domain',
Expand All @@ -258,10 +267,11 @@ class SshnpdParams {

parser.addOption(
'local-sshd-port',
help: 'port on which sshd is listening locally on localhost',
defaultsTo: DefaultSshnpdArgs.localSshdPort.toString(),
mandatory: false,
defaultsTo: DefaultSshnpdArgs.localSshdPort.toString(),
help: 'port on which sshd is listening locally on localhost',
);

parser.addOption(
'sshpublickey-permissions',
abbr: 'S',
Expand All @@ -270,13 +280,16 @@ class SshnpdParams {
'When --sshpublickey is enabled, will include the specified permissions'
' in the public key entry in authorized_keys',
);
parser.addOption('ephemeral-permissions',
help: 'The permissions which will be added to the authorized_keys file'
' for the ephemeral public keys which are generated when a client'
' is connecting via forward ssh'
' e.g. PermitOpen="host-1:3389",PermitOpen="localhost:80"',
defaultsTo: '',
mandatory: false);

parser.addOption(
'ephemeral-permissions',
mandatory: false,
defaultsTo: '',
help: 'The permissions which will be added to the authorized_keys file'
' for the ephemeral public keys which are generated when a client'
' is connecting via forward ssh'
' e.g. PermitOpen="host-1:3389",PermitOpen="localhost:80"',
);

parser.addOption(
'ssh-algorithm',
Expand Down

0 comments on commit ae68b7b

Please sign in to comment.