Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Nic Carroll 2015-12-04 17:44:00 -07:00
commit a547e4805e
5 changed files with 24 additions and 1 deletions

View File

@ -83,7 +83,7 @@ You can pass various options when running via the command line, see --help for d
* Unable to connect to certain trackers on Linux
Try running with the "--SSLFix true" if you are on Redhat/Fedora/NNS based libcurl. If the tracker is currently configured try removing it and adding it again. Alternatively try running with a different client via --UseClient (Warning: safecurl just executes curl and your details may be seen from the process list).
Try running with the "--SSLFix true" if you are on Redhat/Fedora/NNS based libcurl. If the tracker is currently configured try removing it and adding it again. Alternatively try running with a different client via --UseClient (Warning: safecurl just executes curl and your details may be seen from the process list). You can also try running with the "--IgnoreSslErrors true" option which is useful if the site has an invalid SSL certificate.
* Enable logging

View File

@ -54,6 +54,9 @@ namespace Jackett.Console
[Option('f', "SSLFix", HelpText = "[true/false] Linux Libcurl NSS Missing ECC Ciphers workaround (Use if you can't access some trackers) .")]
public bool? SSLFix { get; set; }
[Option('n', "IgnoreSslErrors", HelpText = "[true/false] Linux Libcurl - Ignores invalid SSL certificates")]
public bool? IgnoreSslErrors { get; set; }
[ParserState]
public IParserState LastParserState { get; set; }
}

View File

@ -85,6 +85,14 @@ namespace JackettConsole
Engine.Logger.Info("SSL ECC workaround enabled.");
else if (options.SSLFix == false)
Engine.Logger.Info("SSL ECC workaround has been disabled.");
// Ignore SSL errors on Curl
Startup.IgnoreSslErrors = options.IgnoreSslErrors;
if (options.IgnoreSslErrors == true)
{
Engine.Logger.Info("Curl will ignore SSL certificate errors.");
}
/* ====== Actions ===== */
// Install service

View File

@ -135,6 +135,12 @@ namespace Jackett
easy.ForbidReuse = true;
}
if (Startup.IgnoreSslErrors == true)
{
easy.SetOpt(CurlOption.SslVerifyhost, false);
easy.SetOpt(CurlOption.SslVerifyPeer, false);
}
easy.Perform();
if (easy.LastErrorCode != CurlCode.Ok)

View File

@ -46,6 +46,12 @@ namespace Jackett
set;
}
public static bool? IgnoreSslErrors
{
get;
set;
}
public void Configuration(IAppBuilder appBuilder)
{
// Configure Web API for self-host.