Merge pull request #1287 from eighthave/master

support private, secure shares with tor .onion addresses
This commit is contained in:
Hylke Bons 2013-05-18 02:16:49 -07:00
commit 9c69091f77

View file

@ -16,7 +16,12 @@ namespace SparkleLib {
public override bool Fetch ()
{
if (!RemoteUrl.Scheme.StartsWith ("http")) {
if (RemoteUrl.Host.EndsWith(".onion")) {
// Tor has special domain names called ".onion addresses". They can only be
// resolved by using a proxy via tor. While the rest of the openssh suite
// fully supports proxying, ssh-keyscan does not, so we can't use it for .onion
SparkleLogger.LogInfo ("Auth", "using tor .onion address skipping ssh-keyscan");
} else if (!RemoteUrl.Scheme.StartsWith ("http")) {
string host_key = FetchHostKey ();
if (string.IsNullOrEmpty (RemoteUrl.Host) || host_key == null) {