From c112aef6447c879438473388a22895fd5983b7d9 Mon Sep 17 00:00:00 2001 From: flightlevel Date: Fri, 31 Aug 2018 20:33:05 +1000 Subject: [PATCH] Update ConsoleOptions Use --version to get version info and --help for help -v no longer attempts to load Jackett https://github.com/Jackett/Jackett/issues/3720 --- .../Models/Config/ConsoleOptions.cs | 25 +++++-------------- .../Models/Config/RuntimeSettings.cs | 2 -- src/Jackett.Server/Initialisation.cs | 6 ----- 3 files changed, 6 insertions(+), 27 deletions(-) diff --git a/src/Jackett.Common/Models/Config/ConsoleOptions.cs b/src/Jackett.Common/Models/Config/ConsoleOptions.cs index def0fc8c7..017316842 100644 --- a/src/Jackett.Common/Models/Config/ConsoleOptions.cs +++ b/src/Jackett.Common/Models/Config/ConsoleOptions.cs @@ -1,5 +1,4 @@ using CommandLine; -using Jackett.Common.Utils; using System; namespace Jackett.Common.Models.Config @@ -9,55 +8,46 @@ namespace Jackett.Common.Models.Config [Option('i', "Install", HelpText = "Install Jackett windows service (Must be admin)")] public bool Install { get; set; } - [Option('r', "ReserveUrls", HelpText = "(Re)Register windows port reservations (Required for listening on all interfaces).")] + [Option('r', "ReserveUrls", HelpText = "(Re)Register windows port reservations (Required for listening on all interfaces).")] public bool ReserveUrls { get; set; } [Option('u', "Uninstall", HelpText = "Uninstall Jackett windows service (Must be admin).")] public bool Uninstall { get; set; } - [Option('l', "Logging", HelpText = "Log all requests/responses to Jackett")] + [Option('l', "Logging", HelpText = "Log all requests/responses to Jackett")] public bool Logging { get; set; } [Option('t', "Tracing", HelpText = "Enable tracing")] public bool Tracing { get; set; } - [Option('c', "UseClient", HelpText = "Override web client selection. [automatic(Default)/libcurl/safecurl/httpclient/httpclient2]")] + [Option('c', "UseClient", HelpText = "Override web client selection. [automatic(Default)/httpclient/httpclient2]")] public string Client { get; set; } [Option('j', "ProxyConnection", HelpText = "use proxy - e.g. 127.0.0.1:8888")] public string ProxyConnection { get; set; } - [Option('s', "Start", HelpText = "Start the Jacket Windows service (Must be admin)")] + [Option('s', "Start", HelpText = "Start the Jacket Windows service (Must be admin)")] public bool StartService { get; set; } [Option('k', "Stop", HelpText = "Stop the Jacket Windows service (Must be admin)")] public bool StopService { get; set; } - [Option('x', "ListenPublic", HelpText = "Listen publicly")] + [Option('x', "ListenPublic", HelpText = "Listen publicly")] public bool ListenPublic { get; set; } [Option('z', "ListenPrivate", HelpText = "Only allow local access")] public bool ListenPrivate { get; set; } - [Option('h', "Help", HelpText = "Show Help")] - public bool ShowHelp { get; set; } - - [Option('v', "Version", HelpText = "Show Version")] - public bool ShowVersion { get; set; } - [Option('p', "Port", HelpText = "Web server port")] public int Port { get; set; } [Option('m', "MigrateSettings", HelpText = "Migrate settings manually (Must be admin on Windows)")] public bool MigrateSettings { get; set; } - [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] Ignores invalid SSL certificates")] public bool? IgnoreSslErrors { get; set; } - [Option('d', "DataFolder", HelpText = "Specify the location of the data folder (Must be admin on Windows) eg. --DataFolder=\"D:\\Your Data\\Jackett\\\". Don't use this on Unix (mono) systems. On Unix just adjust the HOME directory of the user to the datedir or set the XDG_CONFIG_HOME environment variable.")] + [Option('d', "DataFolder", HelpText = "Specify the location of the data folder (Must be admin on Windows) eg. --DataFolder=\"D:\\Your Data\\Jackett\\\". Don't use this on Unix (mono) systems. On Unix just adjust the HOME directory of the user to the datadir or set the XDG_CONFIG_HOME environment variable.")] public string DataFolder { get; set; } [Option("NoRestart", HelpText = "Don't restart after update")] @@ -87,9 +77,6 @@ namespace Jackett.Common.Models.Config Environment.Exit(1); } - // SSL Fix - runtimeSettings.DoSSLFix = options.SSLFix; - // Use curl if (options.Client != null) runtimeSettings.ClientOverride = options.Client.ToLowerInvariant(); diff --git a/src/Jackett.Common/Models/Config/RuntimeSettings.cs b/src/Jackett.Common/Models/Config/RuntimeSettings.cs index 16888202f..5d1fc2180 100644 --- a/src/Jackett.Common/Models/Config/RuntimeSettings.cs +++ b/src/Jackett.Common/Models/Config/RuntimeSettings.cs @@ -13,8 +13,6 @@ namespace Jackett.Common.Models.Config public string ProxyConnection { get; set; } - public bool? DoSSLFix { get; set; } - public bool? IgnoreSslErrors { get; set; } public string CustomDataFolder { get; set; } diff --git a/src/Jackett.Server/Initialisation.cs b/src/Jackett.Server/Initialisation.cs index 809e6b7be..a6d43263f 100644 --- a/src/Jackett.Server/Initialisation.cs +++ b/src/Jackett.Server/Initialisation.cs @@ -19,12 +19,6 @@ namespace Jackett.Server Environment.Exit(1); } - if (runtimeSettings.DoSSLFix != null) - { - logger.Error("SSLFix has been deprecated, please remove it from your start arguments"); - Environment.Exit(1); - } - if (runtimeSettings.LogRequests) { logger.Info("Logging enabled.");