-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
IPTorrents fixes for Cloudflare (#12939)
- Loading branch information
1 parent
49a0c2d
commit 268a334
Showing
2 changed files
with
38 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
src/Jackett.Common/Models/IndexerConfig/ConfigurationDataCookieUA.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
namespace Jackett.Common.Models.IndexerConfig | ||
{ | ||
public class ConfigurationDataCookieUA : ConfigurationData | ||
{ | ||
public StringConfigurationItem Cookie { get; private set; } | ||
public DisplayInfoConfigurationItem CookieInstructions { get; private set; } | ||
public StringConfigurationItem UserAgent { get; private set; } | ||
public DisplayInfoConfigurationItem UserAgentInstructions { get; private set; } | ||
public DisplayInfoConfigurationItem Instructions { get; private set; } | ||
|
||
public ConfigurationDataCookieUA(string instructionMessageOptional = null) | ||
{ | ||
Cookie = new StringConfigurationItem("Cookie"); | ||
CookieInstructions = new DisplayInfoConfigurationItem("Cookie Instructions", | ||
"Please enter the cookie for the site manually. <a href=\"https://github.com/Jackett/Jackett/wiki/Finding-cookies\" target=\"_blank\">See here</a> on how get the cookies." + | ||
"<br>Example cookie header (usually longer than this):<br><code>PHPSESSID=8rk27odm; ipsconnect_63ad9c=1; more_stuff=etc;</code>"); | ||
UserAgent = new StringConfigurationItem("User-Agent"); | ||
UserAgentInstructions = new DisplayInfoConfigurationItem("User Agent Instructions", | ||
"<ol><li>From the same place you fetched the cookie,<li>Find <b>'user-agent:'</b> in the <b>Request Headers</b> section<li><b>Select</b>" + | ||
"and <b>Copy</b> the whole user-agent string <i>(everything after 'user-agent: ')</i> and <b>Paste</b> here.</ol>"); | ||
Instructions = new DisplayInfoConfigurationItem("", instructionMessageOptional); | ||
} | ||
} | ||
} |