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

feat: client side Windows support #563

Merged
merged 12 commits into from
Nov 14, 2023
Merged

feat: client side Windows support #563

merged 12 commits into from
Nov 14, 2023

Conversation

XavierChanth
Copy link
Member

- What I did

  • Added windows support
  • Added windows multibuild variant

- How I did it

- How to verify it

- Description for the changelog
feat: client side Windows support

@XavierChanth XavierChanth requested a review from gkc November 10, 2023 15:39
if (!Platform.isWindows) {
chmod(files[0].path, '600');
chmod(files[1].path, '644');
}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These functions are posix only and don't work on windows, and I didn't have any file permission issues in Windows... It's possible the windows OpenSSH doesn't even check because of how painful it is to do in Windows

@@ -29,9 +29,9 @@ class DefaultSshnpArgs {
static const List<String> localSshOptions = <String>[];
static const bool legacyDaemon = false;
static const bool listDevices = false;
static const SupportedSshClient sshClient = SupportedSshClient.exec;
static const SupportedSshClient sshClient = SupportedSshClient.openssh;
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed all "exec" ssh stuff to "openssh" so we can add support for other execution based ssh programs like dropbear and putty

@@ -79,7 +79,7 @@ class SshnpExecLocalImpl extends SshnpCore
);

/// Start the initial tunnel
Process bean =
Process? bean =
await startInitialTunnel(identifier: ephemeralKeyPair.identifier);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workaround for Windows doesn't allow for handing back a process, thus it will be null on Windows

throw SshnpError(
'Windows is not supported by unsigned sshnp clients.',
);
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Disable Windows on the Legacy AKA unsigned client

@@ -55,7 +56,8 @@ mixin SshnpdDefaultPayloadHandler on SshnpdChannel {
params.sshnpdAtSign,
logger,
envelope,
useFileStorage: useLocalFileStorage,
useFileStorage: useLocalFileStorage &&
!Platform.isWindows, // disable publickey cache on windows
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

public key caching has issues on Windows

@XavierChanth XavierChanth merged commit d023d42 into trunk Nov 14, 2023
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants