Advertisement
Guest User

ConfigurationDataNordicbits.cs - v001

a guest
Aug 7th, 2018
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 5.71 KB | None | 0 0
  1. namespace Jackett.Common.Models.IndexerConfig.Bespoke
  2. {
  3.     internal class ConfigurationDataNordicbits : ConfigurationData
  4.     {
  5.         public DisplayItem CredentialsWarning { get; private set; }
  6.         public StringItem Username { get; private set; }
  7.         public StringItem Password { get; private set; }
  8.         public DisplayItem PagesWarning { get; private set; }
  9.         public StringItem Pages { get; private set; }
  10.         public DisplayItem SecurityWarning { get; private set; }
  11.         public BoolItem Latency { get; private set; }
  12.         public BoolItem Browser { get; private set; }
  13.         public DisplayItem LatencyWarning { get; private set; }
  14.         public StringItem LatencyStart { get; private set; }
  15.         public StringItem LatencyEnd { get; private set; }
  16.         public DisplayItem HeadersWarning { get; private set; }
  17.         public StringItem HeaderAccept { get; private set; }
  18.         public StringItem HeaderAcceptLang { get; private set; }
  19.         public BoolItem HeaderDnt { get; private set; }
  20.         public BoolItem HeaderUpgradeInsecure { get; private set; }
  21.         public StringItem HeaderUserAgent { get; private set; }
  22.         public DisplayItem DevWarning { get; private set; }
  23.         public BoolItem DevMode { get; private set; }
  24.         public BoolItem HardDriveCache { get; private set; }
  25.         public StringItem HardDriveCacheKeepTime { get; private set; }
  26.  
  27.         public ConfigurationDataNordicbits()
  28.         {
  29.             CredentialsWarning = new DisplayItem("<b>Credentials Configuration</b> (<i>Private Tracker</i>),<br /><br /> <ul><li><b>Username</b> is your account name on this tracker.</li><li><b>Password</b> is your password associated to your account name.</li></ul>") { Name = "Credentials" };
  30.             Username = new StringItem { Name = "Username (Required)", Value = "" };
  31.             Password = new StringItem { Name = "Password (Required)", Value = "" };
  32.             PagesWarning = new DisplayItem("<b>Preferences Configuration</b> (<i>Tweak your search settings</i>),<br /><br /> <ul><li><b>Max Pages to Process</b> let you specify how many page (max) Jackett can process when doing a search. Setting a value <b>higher than 4 is dangerous</b> for you account ! (<b>Result of too many requests to tracker...that <u>will be suspect</u></b>).</li></ul>") { Name = "Preferences" };
  33.             Pages = new StringItem { Name = "Max Pages to Process (Required)", Value = "4" };
  34.             SecurityWarning = new DisplayItem("<b>Security Configuration</b> (<i>Read this area carefully !</i>),<br /><br /> <ul><li><b>Latency Simulation</b> will simulate human browsing with Jacket by pausing Jacket for an random time between each request, to fake a real content browsing.</li><li><b>Browser Simulation</b> will simulate a real human browser by injecting additionals headers when doing requests to tracker.<b>You must enable it to use this provider!</b></li></ul>") { Name = "Security" };
  35.             Latency = new BoolItem() { Name = "Latency Simulation (Optional)", Value = false };
  36.             Browser = new BoolItem() { Name = "Browser Simulation (Forced)", Value = true };
  37.             LatencyWarning = new DisplayItem("<b>Latency Configuration</b> (<i>Required if latency simulation enabled</i>),<br /><br/> <ul><li>By filling this range, <b>Jackett will make a random timed pause</b> <u>between requests</u> to tracker <u>to simulate a real browser</u>.</li><li>MilliSeconds <b>only</b></li></ul>") { Name = "Simulate Latency" };
  38.             LatencyStart = new StringItem { Name = "Minimum Latency (ms)", Value = "1589" };
  39.             LatencyEnd = new StringItem { Name = "Maximum Latency (ms)", Value = "3674" };
  40.             HeadersWarning = new DisplayItem("<b>Browser Headers Configuration</b> (<i>Required if browser simulation enabled</i>),<br /><br /> <ul><li>By filling these fields, <b>Jackett will inject headers</b> with your values <u>to simulate a real browser</u>.</li><li>You can get <b>your browser values</b> here: <a href='https://www.whatismybrowser.com/detect/what-http-headers-is-my-browser-sending' target='blank'>www.whatismybrowser.com</a></li></ul><br /><i><b>Note that</b> some headers are not necessary because they are injected automatically by this provider such as Accept_Encoding, Connection, Host or X-Requested-With</i>") { Name = "Injecting headers" };
  41.             HeaderAccept = new StringItem { Name = "Accept", Value = "" };
  42.             HeaderAcceptLang = new StringItem { Name = "Accept-Language", Value = "" };
  43.             HeaderDnt = new BoolItem { Name = "DNT", Value = false };
  44.             HeaderUpgradeInsecure = new BoolItem { Name = "Upgrade-Insecure-Requests", Value = false };
  45.             HeaderUserAgent = new StringItem { Name = "User-Agent", Value = "" };
  46.             DevWarning = new DisplayItem("<b>Development Facility</b> (<i>For Developers ONLY</i>),<br /><br /> <ul><li>By enabling development mode, <b>Jackett will bypass his cache</b> and will <u>output debug messages to console</u> instead of his log file.</li><li>By enabling Hard Drive Cache, <b>This provider</b> will <u>save each query answers from tracker</u> in temp directory, in fact this reduce drastically HTTP requests when building a provider at parsing step for example. So, <b> Jackett will search for a cached query answer on hard drive before executing query on tracker side !</b> <i>DEV MODE must be enabled to use it !</li></ul>") { Name = "Development" };
  47.             DevMode = new BoolItem { Name = "Enable DEV MODE (Developers ONLY)", Value = false };
  48.             HardDriveCache = new BoolItem { Name = "Enable HARD DRIVE CACHE (Developers ONLY)", Value = false };
  49.             HardDriveCacheKeepTime = new StringItem { Name = "Keep Cached files for (ms)", Value = "300000" };
  50.         }
  51.     }
  52. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement