Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Greater consistency in spacing and formatting of options #1546

Merged
merged 4 commits into from
Nov 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading