Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/trunk' into new-bundles
Browse files Browse the repository at this point in the history
  • Loading branch information
XavierChanth committed Dec 2, 2023
2 parents c747242 + d718e6e commit 6fcc968
Show file tree
Hide file tree
Showing 29 changed files with 399 additions and 444 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ jobs:
- name: 'Checkout Repository'
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: 'Dependency Review'
uses: actions/dependency-review-action@7bbfa034e752445ea40215fff1c3bf9597993d3f # v3.1.3
uses: actions/dependency-review-action@01bc87099ba56df1e897b6874784491ea6309bc4 # v3.1.4
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ build/
.DS_Store

# Python
dist/
poetry.lock
__pycache__

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<img width=250px src="https://atsign.dev/assets/img/atPlatform_logo_gray.svg?sanitize=true" alt="The atPlatform logo">
<a href="https://atsign.com#gh-light-mode-only"><img width=250px src="https://atsign.com/wp-content/uploads/2022/05/atsign-logo-horizontal-color2022.svg#gh-light-mode-only" alt="The Atsign Foundation"></a><a href="https://atsign.com#gh-dark-mode-only"><img width=250px src="https://atsign.com/wp-content/uploads/2023/08/atsign-logo-horizontal-reverse2022-Color.svg#gh-dark-mode-only" alt="The Atsign Foundation"></a>

[![GitHub License](https://img.shields.io/badge/license-BSD3-blue.svg)](./LICENSE)
[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/atsign-foundation/sshnoports/badge)](https://api.securityscorecards.dev/projects/github.com/atsign-foundation/sshnoports)
Expand Down
15 changes: 0 additions & 15 deletions packages/noports_core/lib/src/sshnp/models/sshnp_arg.dart
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,8 @@ class SshnpArg {
tunnelUserNameArg,
rootDomainArg,
localSshdPortArg,
legacyDaemonArg,
remoteSshdPortArg,
idleTimeoutArg,
sshClientArg,
sshAlgorithmArg,
addForwardsToTunnelArg,
configFileArg,
Expand Down Expand Up @@ -300,12 +298,6 @@ class SshnpArg {
format: ArgFormat.option,
type: ArgType.integer,
);
static const legacyDaemonArg = SshnpArg(
name: 'legacy-daemon',
help: 'Request is to a legacy (< 4.0.0) noports daemon',
defaultsTo: DefaultSshnpArgs.legacyDaemon,
format: ArgFormat.flag,
);
static const remoteSshdPortArg = SshnpArg(
name: 'remote-sshd-port',
help: 'port on which sshd is listening locally on the device host',
Expand All @@ -324,13 +316,6 @@ class SshnpArg {
type: ArgType.integer,
parseWhen: ParseWhen.commandLine,
);
static final sshClientArg = SshnpArg(
name: 'ssh-client',
help: 'What to use for outbound ssh connections',
defaultsTo: DefaultSshnpArgs.sshClient.toString(),
allowed: SupportedSshClient.values.map((c) => c.toString()).toList(),
parseWhen: ParseWhen.commandLine,
);
static final sshAlgorithmArg = SshnpArg(
name: 'ssh-algorithm',
help: 'SSH algorithm to use',
Expand Down
19 changes: 0 additions & 19 deletions packages/noports_core/lib/src/sshnp/models/sshnp_params.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,10 @@ class SshnpParams {
final bool verbose;
final String rootDomain;
final int localSshdPort;
final bool legacyDaemon;
final int remoteSshdPort;
final int idleTimeout;
final bool addForwardsToTunnel;
final String? atKeysFilePath;
final SupportedSshClient sshClient;
final SupportedSshAlgorithm sshAlgorithm;

/// Special Arguments
Expand Down Expand Up @@ -63,12 +61,10 @@ class SshnpParams {
this.atKeysFilePath,
this.rootDomain = DefaultArgs.rootDomain,
this.localSshdPort = DefaultArgs.localSshdPort,
this.legacyDaemon = DefaultSshnpArgs.legacyDaemon,
this.listDevices = DefaultSshnpArgs.listDevices,
this.remoteSshdPort = DefaultArgs.remoteSshdPort,
this.idleTimeout = DefaultArgs.idleTimeout,
this.addForwardsToTunnel = DefaultArgs.addForwardsToTunnel,
this.sshClient = DefaultSshnpArgs.sshClient,
this.sshAlgorithm = DefaultArgs.sshAlgorithm,
});

Expand Down Expand Up @@ -106,12 +102,10 @@ class SshnpParams {
rootDomain: params2.rootDomain ?? params1.rootDomain,
localSshdPort: params2.localSshdPort ?? params1.localSshdPort,
listDevices: params2.listDevices ?? params1.listDevices,
legacyDaemon: params2.legacyDaemon ?? params1.legacyDaemon,
remoteSshdPort: params2.remoteSshdPort ?? params1.remoteSshdPort,
idleTimeout: params2.idleTimeout ?? params1.idleTimeout,
addForwardsToTunnel:
params2.addForwardsToTunnel ?? params1.addForwardsToTunnel,
sshClient: params2.sshClient ?? params1.sshClient,
sshAlgorithm: params2.sshAlgorithm ?? params1.sshAlgorithm,
);
}
Expand Down Expand Up @@ -148,12 +142,10 @@ class SshnpParams {
rootDomain: partial.rootDomain ?? DefaultArgs.rootDomain,
localSshdPort: partial.localSshdPort ?? DefaultArgs.localSshdPort,
listDevices: partial.listDevices ?? DefaultSshnpArgs.listDevices,
legacyDaemon: partial.legacyDaemon ?? DefaultSshnpArgs.legacyDaemon,
remoteSshdPort: partial.remoteSshdPort ?? DefaultArgs.remoteSshdPort,
idleTimeout: partial.idleTimeout ?? DefaultArgs.idleTimeout,
addForwardsToTunnel:
partial.addForwardsToTunnel ?? DefaultArgs.addForwardsToTunnel,
sshClient: partial.sshClient ?? DefaultSshnpArgs.sshClient,
sshAlgorithm: partial.sshAlgorithm ?? DefaultArgs.sshAlgorithm,
);
}
Expand Down Expand Up @@ -202,7 +194,6 @@ class SshnpParams {
SshnpArg.remoteSshdPortArg.name: remoteSshdPort,
SshnpArg.idleTimeoutArg.name: idleTimeout,
SshnpArg.addForwardsToTunnelArg.name: addForwardsToTunnel,
SshnpArg.sshClientArg.name: sshClient.toString(),
SshnpArg.sshAlgorithmArg.name: sshAlgorithm.toString(),
};
args.removeWhere(
Expand Down Expand Up @@ -238,11 +229,9 @@ class SshnpPartialParams {
final String? tunnelUsername;
final bool? verbose;
final String? rootDomain;
final bool? legacyDaemon;
final int? remoteSshdPort;
final int? idleTimeout;
final bool? addForwardsToTunnel;
final SupportedSshClient? sshClient;
final SupportedSshAlgorithm? sshAlgorithm;

/// Operation flags
Expand All @@ -267,11 +256,9 @@ class SshnpPartialParams {
this.rootDomain,
this.localSshdPort,
this.listDevices,
this.legacyDaemon,
this.remoteSshdPort,
this.idleTimeout,
this.addForwardsToTunnel,
this.sshClient,
this.sshAlgorithm,
});

Expand Down Expand Up @@ -304,12 +291,10 @@ class SshnpPartialParams {
rootDomain: params2.rootDomain ?? params1.rootDomain,
localSshdPort: params2.localSshdPort ?? params1.localSshdPort,
listDevices: params2.listDevices ?? params1.listDevices,
legacyDaemon: params2.legacyDaemon ?? params1.legacyDaemon,
remoteSshdPort: params2.remoteSshdPort ?? params1.remoteSshdPort,
idleTimeout: params2.idleTimeout ?? params1.idleTimeout,
addForwardsToTunnel:
params2.addForwardsToTunnel ?? params1.addForwardsToTunnel,
sshClient: params2.sshClient ?? params1.sshClient,
sshAlgorithm: params2.sshAlgorithm ?? params1.sshAlgorithm,
);
}
Expand Down Expand Up @@ -353,13 +338,9 @@ class SshnpPartialParams {
rootDomain: args[SshnpArg.rootDomainArg.name],
localSshdPort: args[SshnpArg.localSshdPortArg.name],
listDevices: args[SshnpArg.listDevicesArg.name],
legacyDaemon: args[SshnpArg.legacyDaemonArg.name],
remoteSshdPort: args[SshnpArg.remoteSshdPortArg.name],
idleTimeout: args[SshnpArg.idleTimeoutArg.name],
addForwardsToTunnel: args[SshnpArg.addForwardsToTunnelArg.name],
sshClient: args[SshnpArg.sshClientArg.name] == null
? null
: SupportedSshClient.fromString(args[SshnpArg.sshClientArg.name]),
sshAlgorithm: args[SshnpArg.sshAlgorithmArg.name] == null
? null
: SupportedSshAlgorithm.fromString(
Expand Down
Loading

0 comments on commit 6fcc968

Please sign in to comment.