rsync: support rsync-ssl connections too #203
Merged
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.