Skip to content

feat: wire --aes/--no-aes to SSH cipher selection - #2369

Merged
oferchen merged 1 commit into
masterfrom
feat/aes-ssh-cipher-wiring
Feb 21, 2026
Merged

oferchen merged 1 commit into
masterfrom
feat/aes-ssh-cipher-wiring

Conversation

@oferchen

Copy link
Copy Markdown
Owner

Summary

  • Add prefer_aes_gcm field and set_prefer_aes_gcm() method to SshCommand builder
  • Wire prefer_aes_gcm from ClientConfig through both ssh_transfer and remote_to_remote SSH spawn paths
  • Add 5 tests for SSH cipher selection behavior

Details

The --aes/--no-aes preference was not plumbed from ClientConfig to the SshCommand builder. When prefer_aes_gcm is Some(true), the SSH command now injects -c [email protected],[email protected] for hardware-accelerated encryption. The injection is guarded: it only applies when the program is ssh and no custom -c option is already present.

Both the direct SSH transfer path (build_ssh_connection in ssh_transfer.rs) and the proxy transfer path (spawn_ssh_connection in remote_to_remote.rs) now call ssh.set_prefer_aes_gcm(config.prefer_aes_gcm()).

Test plan

  • cargo clippy -p rsync_io -p core passes with no warnings
  • cargo nextest run -p rsync_io --all-features — 672 tests pass
  • cargo nextest run -p core --all-features — 1763 tests pass
  • Tests cover: forced enable, forced disable, default (no injection), custom options skip, non-SSH program skip

@github-actions github-actions Bot added the enhancement New feature or request label Feb 21, 2026
Plumb prefer_aes_gcm from ClientConfig through to SshCommand in both
ssh_transfer and remote_to_remote paths. When enabled, injects
-c [email protected],[email protected] into the SSH
command line for hardware-accelerated encryption on modern CPUs.

Add 5 tests covering forced enable, forced disable, default (no
injection), custom options skip, and non-SSH program skip.
@oferchen
oferchen force-pushed the feat/aes-ssh-cipher-wiring branch from 6b98855 to ca7c053 Compare February 21, 2026 06:59
@oferchen
oferchen merged commit 7e24b74 into master Feb 21, 2026
5 of 9 checks passed
@oferchen
oferchen deleted the feat/aes-ssh-cipher-wiring branch February 21, 2026 08:09
oferchen added a commit that referenced this pull request May 1, 2026
…2369)

Plumb prefer_aes_gcm from ClientConfig through to SshCommand in both
ssh_transfer and remote_to_remote paths. When enabled, injects
-c [email protected],[email protected] into the SSH
command line for hardware-accelerated encryption on modern CPUs.

Add 5 tests covering forced enable, forced disable, default (no
injection), custom options skip, and non-SSH program skip.
oferchen added a commit that referenced this pull request May 5, 2026
…2369)

Plumb prefer_aes_gcm from ClientConfig through to SshCommand in both
ssh_transfer and remote_to_remote paths. When enabled, injects
-c [email protected],[email protected] into the SSH
command line for hardware-accelerated encryption on modern CPUs.

Add 5 tests covering forced enable, forced disable, default (no
injection), custom options skip, and non-SSH program skip.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant