rsync: support rsync-ssl connections too#203
Merged
jbkempf merged 1 commit intovideolabs:masterfrom Sep 10, 2025
Merged
Conversation
rsync provides a rsync-ssl script which tries to communicate over tls, on port 874 instead of 873, if it finds openssl/gnutls/stunnel. In theory we could add a separate cli option for this since there is no official URL scheme for rsync+tls, but to keep things simple for everyone just allow rsyncs:// in rsync URLs. In case a URL is starting with rsyncs:// we will use rsync-ssl instead of rsync, and rewrite the url back to rsync://. For testing, here are two public servers that support TLS: * rsync-ssl rsync://mirrors.dotsrc.org * rsync-ssl rsync://repo.msys2.org Using "--contimeout" with rsync-ssl leads to: "The --contimeout option may only be used when connecting to an rsync daemon." From my testing "--timeout" aborts though if openssl takes too long to connect, suggesting that it covers both connection and i/o in this scenario. Bump the --timeout to 60 so the upper bound is the same as without openssl.
Collaborator
Contributor
|
Looks neat, it's a nice addition! |
Contributor
Author
|
Thanks! I forgot that I had already created an issue for this -> #176 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
rsync provides a rsync-ssl script which tries to communicate over tls, on port 874 instead of 873, if it finds openssl/gnutls/stunnel.
In theory we could add a separate cli option for this since there is no official URL scheme for rsync+tls, but to keep things simple for everyone just allow rsyncs:// in rsync URLs.
In case a URL is starting with rsyncs:// we will use rsync-ssl instead of rsync, and rewrite the url back to rsync://.
For testing, here are two public servers that support TLS:
Using "--contimeout" with rsync-ssl leads to:
"The --contimeout option may only be used when connecting to an rsync daemon."
From my testing "--timeout" aborts though if openssl takes too long to connect, suggesting that it covers both connection and i/o in this scenario. Bump the --timeout to 60 so the upper bound is the same as without openssl.