Encrypt all file uploader settings

This commit is contained in:
Jaex 2020-06-01 04:17:04 +03:00
parent db38dd6797
commit 1b60df4bd4
12 changed files with 236 additions and 143 deletions

View file

@ -48,7 +48,7 @@ public class FTPAccount : ICloneable
[Category("FTP")] [Category("FTP")]
public string Username { get; set; } public string Username { get; set; }
[Category("FTP"), PasswordPropertyText(true)] [Category("FTP"), PasswordPropertyText(true), JsonEncrypt]
public string Password { get; set; } public string Password { get; set; }
[Category("FTP"), Description("Set true for active or false for passive"), DefaultValue(false)] [Category("FTP"), Description("Set true for active or false for passive"), DefaultValue(false)]
@ -131,7 +131,7 @@ public string PreviewHttpPath
[Editor(typeof(KeyFileNameEditor), typeof(UITypeEditor))] [Editor(typeof(KeyFileNameEditor), typeof(UITypeEditor))]
public string Keypath { get; set; } public string Keypath { get; set; }
[Category("SFTP"), Description("OpenSSH key passphrase"), PasswordPropertyText(true)] [Category("SFTP"), Description("OpenSSH key passphrase"), PasswordPropertyText(true), JsonEncrypt]
public string Passphrase { get; set; } public string Passphrase { get; set; }
public FTPAccount() public FTPAccount()

View file

@ -136,7 +136,9 @@ public override UploadResult Upload(Stream stream, string fileName)
public class Ge_ttLogin public class Ge_ttLogin
{ {
public string Expires { get; set; } public string Expires { get; set; }
[JsonEncrypt]
public string AccessToken { get; set; } public string AccessToken { get; set; }
[JsonEncrypt]
public string RefreshToken { get; set; } public string RefreshToken { get; set; }
} }

View file

@ -26,6 +26,7 @@
// Credits: https://github.com/mstojcevich // Credits: https://github.com/mstojcevich
using Newtonsoft.Json; using Newtonsoft.Json;
using ShareX.HelpersLib;
using ShareX.UploadersLib.Properties; using ShareX.UploadersLib.Properties;
using System.Collections.Generic; using System.Collections.Generic;
using System.Drawing; using System.Drawing;
@ -114,7 +115,8 @@ internal class LambdaFile
public class LambdaSettings public class LambdaSettings
{ {
public string UserAPIKey = ""; [JsonEncrypt]
public string UploadURL = "https://lbda.net/"; public string UserAPIKey { get; set; } = "";
public string UploadURL { get; set; } = "https://lbda.net/";
} }
} }

View file

@ -26,6 +26,7 @@
// Credits: https://github.com/lithium720 // Credits: https://github.com/lithium720
using Newtonsoft.Json; using Newtonsoft.Json;
using ShareX.HelpersLib;
using ShareX.UploadersLib.Properties; using ShareX.UploadersLib.Properties;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
@ -135,6 +136,7 @@ private class LithiioFetchAPIKeyResponse : LithiioResponse
public class LithiioSettings public class LithiioSettings
{ {
[JsonEncrypt]
public string UserAPIKey { get; set; } = ""; public string UserAPIKey { get; set; } = "";
} }
} }

View file

@ -46,7 +46,7 @@ public class LocalhostAccount : ICloneable
[Category("Localhost")] [Category("Localhost")]
public string UserName { get; set; } public string UserName { get; set; }
[Category("Localhost"), PasswordPropertyText(true)] [Category("Localhost"), PasswordPropertyText(true), JsonEncrypt]
public string Password { get; set; } public string Password { get; set; }
[Category("Localhost"), Description("Localhost Sub-folder Path, e.g. screenshots, %y = year, %mo = month. SubFolderPath will be automatically appended to HttpHomePath if HttpHomePath does not start with @")] [Category("Localhost"), Description("Localhost Sub-folder Path, e.g. screenshots, %y = year, %mo = month. SubFolderPath will be automatically appended to HttpHomePath if HttpHomePath does not start with @")]

View file

@ -50,7 +50,7 @@ public override bool CheckConfig(UploadersConfig config)
public override GenericUploader CreateUploader(UploadersConfig config, TaskReferenceHelper taskInfo) public override GenericUploader CreateUploader(UploadersConfig config, TaskReferenceHelper taskInfo)
{ {
return new Mega(config.MegaAuthInfos, config.MegaParentNodeId); return new Mega(config.MegaAuthInfos?.GetMegaApiClientAuthInfos(), config.MegaParentNodeId);
} }
public override TabPage GetUploadersConfigTabPage(UploadersConfigForm form) => form.tpMega; public override TabPage GetUploadersConfigTabPage(UploadersConfigForm form) => form.tpMega;

View file

@ -0,0 +1,57 @@
#region License Information (GPL v3)
/*
ShareX - A program that allows you to take screenshots and share any file type
Copyright (c) 2007-2020 ShareX Team
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Optionally you can also view the license at <http://www.gnu.org/licenses/>.
*/
#endregion License Information (GPL v3)
using CG.Web.MegaApiClient;
using ShareX.HelpersLib;
using System;
namespace ShareX.UploadersLib
{
public class MegaAuthInfos
{
public string Email { get; set; }
[JsonEncrypt]
public string Hash { get; set; }
[JsonEncrypt]
public string PasswordAesKey { get; set; }
public MegaAuthInfos()
{
}
public MegaAuthInfos(MegaApiClient.AuthInfos authInfos)
{
Email = authInfos.Email;
Hash = authInfos.Hash;
PasswordAesKey = Convert.ToBase64String(authInfos.PasswordAesKey);
}
public MegaApiClient.AuthInfos GetMegaApiClientAuthInfos()
{
byte[] passwordAesKey = Convert.FromBase64String(PasswordAesKey);
return new MegaApiClient.AuthInfos(Email, Hash, passwordAesKey);
}
}
}

View file

@ -23,20 +23,24 @@
#endregion License Information (GPL v3) #endregion License Information (GPL v3)
using ShareX.HelpersLib;
namespace ShareX.UploadersLib.FileUploaders namespace ShareX.UploadersLib.FileUploaders
{ {
public class PlikSettings public class PlikSettings
{ {
public string URL = ""; public string URL { get; set; } = "";
public string APIKey = ""; [JsonEncrypt]
public bool IsSecured = false; public string APIKey { get; set; } = "";
public string Login = ""; public bool IsSecured { get; set; } = false;
public string Password = ""; public string Login { get; set; } = "";
public bool Removable = false; [JsonEncrypt]
public bool OneShot = false; public string Password { get; set; } = "";
public int TTLUnit = 2; public bool Removable { get; set; } = false;
public decimal TTL = 30; public bool OneShot { get; set; } = false;
public bool HasComment = false; public int TTLUnit { get; set; } = 2;
public string Comment = ""; public decimal TTL { get; set; } = 30;
public bool HasComment { get; set; } = false;
public string Comment { get; set; } = "";
} }
} }

View file

@ -241,16 +241,19 @@ public class PushbulletDevice
public class PushbulletSettings public class PushbulletSettings
{ {
public string UserAPIKey = ""; [JsonEncrypt]
public List<PushbulletDevice> DeviceList = new List<PushbulletDevice>(); public string UserAPIKey { get; set; } = "";
public int SelectedDevice = 0; public List<PushbulletDevice> DeviceList { get; set; } = new List<PushbulletDevice>();
public int SelectedDevice { get; set; } = 0;
public PushbulletDevice CurrentDevice public PushbulletDevice CurrentDevice
{ {
get get
{ {
if (DeviceList.IsValidIndex(SelectedDevice)) if (DeviceList.IsValidIndex(SelectedDevice))
{
return DeviceList[SelectedDevice]; return DeviceList[SelectedDevice];
}
return null; return null;
} }

View file

@ -2073,7 +2073,8 @@ private void MegaConfigureTab(bool tryLogin)
{ {
cbMegaFolder.Items.Clear(); cbMegaFolder.Items.Clear();
Mega mega = new Mega(Config.MegaAuthInfos); Mega mega = new Mega(Config.MegaAuthInfos?.GetMegaApiClientAuthInfos());
if (!tryLogin || mega.TryLogin()) if (!tryLogin || mega.TryLogin())
{ {
lblMegaStatus.Text = Resources.UploadersConfigForm_MegaConfigureTab_Configured; lblMegaStatus.Text = Resources.UploadersConfigForm_MegaConfigureTab_Configured;
@ -2108,7 +2109,15 @@ private void btnMegaLogin_Click(object sender, EventArgs e)
return; return;
} }
Config.MegaAuthInfos = new MegaApiClient().GenerateAuthInfos(txtMegaEmail.Text, txtMegaPassword.Text); MegaApiClient.AuthInfos megaAuthInfos = new MegaApiClient().GenerateAuthInfos(txtMegaEmail.Text, txtMegaPassword.Text);
if (megaAuthInfos != null)
{
Config.MegaAuthInfos = new MegaAuthInfos(megaAuthInfos);
}
else
{
Config.MegaAuthInfos = null;
}
MegaConfigureTab(true); MegaConfigureTab(true);
} }

View file

@ -133,6 +133,7 @@
<Compile Include="FileUploaders\Box.cs" /> <Compile Include="FileUploaders\Box.cs" />
<Compile Include="FileUploaders\GoogleCloudStorage.cs" /> <Compile Include="FileUploaders\GoogleCloudStorage.cs" />
<Compile Include="FileUploaders\Lithiio.cs" /> <Compile Include="FileUploaders\Lithiio.cs" />
<Compile Include="FileUploaders\MegaAuthInfos.cs" />
<Compile Include="FileUploaders\Plik.cs" /> <Compile Include="FileUploaders\Plik.cs" />
<Compile Include="FileUploaders\PlikSettings.cs" /> <Compile Include="FileUploaders\PlikSettings.cs" />
<Compile Include="FileUploaders\Puush.cs" /> <Compile Include="FileUploaders\Puush.cs" />

View file

@ -156,10 +156,10 @@ public class UploadersConfig : SettingsBase<UploadersConfig>
#region Dropbox #region Dropbox
public OAuth2Info DropboxOAuth2Info = null; public OAuth2Info DropboxOAuth2Info { get; set; } = null;
public string DropboxUploadPath = "ShareX/%y/%mo"; public string DropboxUploadPath { get; set; } = "ShareX/%y/%mo";
public bool DropboxAutoCreateShareableLink = true; public bool DropboxAutoCreateShareableLink { get; set; } = true;
public bool DropboxUseDirectLink = false; public bool DropboxUseDirectLink { get; set; } = false;
// TEMP: For backward compatibility // TEMP: For backward compatibility
public DropboxURLType DropboxURLType = DropboxURLType.Default; public DropboxURLType DropboxURLType = DropboxURLType.Default;
@ -168,119 +168,123 @@ public class UploadersConfig : SettingsBase<UploadersConfig>
#region FTP #region FTP
public List<FTPAccount> FTPAccountList = new List<FTPAccount>(); public List<FTPAccount> FTPAccountList { get; set; } = new List<FTPAccount>();
public int FTPSelectedImage = 0; public int FTPSelectedImage { get; set; } = 0;
public int FTPSelectedText = 0; public int FTPSelectedText { get; set; } = 0;
public int FTPSelectedFile = 0; public int FTPSelectedFile { get; set; } = 0;
#endregion FTP #endregion FTP
#region OneDrive #region OneDrive
public OAuth2Info OneDriveV2OAuth2Info = null; public OAuth2Info OneDriveV2OAuth2Info { get; set; } = null;
public OneDriveFileInfo OneDriveV2SelectedFolder = OneDrive.RootFolder; public OneDriveFileInfo OneDriveV2SelectedFolder { get; set; } = OneDrive.RootFolder;
public bool OneDriveAutoCreateShareableLink = true; public bool OneDriveAutoCreateShareableLink { get; set; } = true;
#endregion OneDrive #endregion OneDrive
#region Gfycat #region Gfycat
public OAuth2Info GfycatOAuth2Info = null; public OAuth2Info GfycatOAuth2Info { get; set; } = null;
public AccountType GfycatAccountType = AccountType.Anonymous; public AccountType GfycatAccountType { get; set; } = AccountType.Anonymous;
public bool GfycatIsPublic = false; public bool GfycatIsPublic { get; set; } = false;
public bool GfycatKeepAudio = true; public bool GfycatKeepAudio { get; set; } = true;
#endregion Gfycat #endregion Gfycat
#region Google Drive #region Google Drive
public OAuth2Info GoogleDriveOAuth2Info = null; public OAuth2Info GoogleDriveOAuth2Info { get; set; } = null;
public bool GoogleDriveIsPublic = true; public bool GoogleDriveIsPublic { get; set; } = true;
public bool GoogleDriveDirectLink = false; public bool GoogleDriveDirectLink { get; set; } = false;
public bool GoogleDriveUseFolder = false; public bool GoogleDriveUseFolder { get; set; } = false;
public string GoogleDriveFolderID = ""; public string GoogleDriveFolderID { get; set; } = "";
#endregion Google Drive #endregion Google Drive
#region puush #region puush
public string PuushAPIKey = ""; [JsonEncrypt]
public string PuushAPIKey { get; set; } = "";
#endregion puush #endregion puush
#region SendSpace #region SendSpace
public AccountType SendSpaceAccountType = AccountType.Anonymous; public AccountType SendSpaceAccountType { get; set; } = AccountType.Anonymous;
public string SendSpaceUsername = ""; public string SendSpaceUsername { get; set; } = "";
public string SendSpacePassword = ""; [JsonEncrypt]
public string SendSpacePassword { get; set; } = "";
#endregion SendSpace #endregion SendSpace
#region Box #region Box
public OAuth2Info BoxOAuth2Info = null; public OAuth2Info BoxOAuth2Info { get; set; } = null;
public BoxFileEntry BoxSelectedFolder = Box.RootFolder; public BoxFileEntry BoxSelectedFolder { get; set; } = Box.RootFolder;
public bool BoxShare = true; public bool BoxShare { get; set; } = true;
public BoxShareAccessLevel BoxShareAccessLevel = BoxShareAccessLevel.Open; public BoxShareAccessLevel BoxShareAccessLevel { get; set; } = BoxShareAccessLevel.Open;
#endregion Box #endregion Box
#region Ge.tt #region Ge.tt
public Ge_ttLogin Ge_ttLogin = null; public Ge_ttLogin Ge_ttLogin { get; set; } = null;
#endregion Ge.tt #endregion Ge.tt
#region Localhostr #region Localhostr
public string LocalhostrEmail = ""; public string LocalhostrEmail { get; set; } = "";
public string LocalhostrPassword = ""; [JsonEncrypt]
public bool LocalhostrDirectURL = true; public string LocalhostrPassword { get; set; } = "";
public bool LocalhostrDirectURL { get; set; } = true;
#endregion Localhostr #endregion Localhostr
#region Shared folder #region Shared folder
public List<LocalhostAccount> LocalhostAccountList = new List<LocalhostAccount>(); public List<LocalhostAccount> LocalhostAccountList { get; set; } = new List<LocalhostAccount>();
public int LocalhostSelectedImages = 0; public int LocalhostSelectedImages { get; set; } = 0;
public int LocalhostSelectedText = 0; public int LocalhostSelectedText { get; set; } = 0;
public int LocalhostSelectedFiles = 0; public int LocalhostSelectedFiles { get; set; } = 0;
#endregion Shared folder #endregion Shared folder
#region Email #region Email
public string EmailSmtpServer = "smtp.gmail.com"; public string EmailSmtpServer { get; set; } = "smtp.gmail.com";
public int EmailSmtpPort = 587; public int EmailSmtpPort { get; set; } = 587;
public string EmailFrom = "...@gmail.com"; public string EmailFrom { get; set; } = "...@gmail.com";
public string EmailPassword = ""; [JsonEncrypt]
public bool EmailRememberLastTo = true; public string EmailPassword { get; set; } = "";
public string EmailLastTo = ""; public bool EmailRememberLastTo { get; set; } = true;
public string EmailDefaultSubject = "Sending email from ShareX"; public string EmailLastTo { get; set; } = "";
public string EmailDefaultBody = "Screenshot is attached."; public string EmailDefaultSubject { get; set; } = "Sending email from ShareX";
public bool EmailAutomaticSend = false; public string EmailDefaultBody { get; set; } = "Screenshot is attached.";
public string EmailAutomaticSendTo = ""; public bool EmailAutomaticSend { get; set; } = false;
public string EmailAutomaticSendTo { get; set; } = "";
#endregion Email #endregion Email
#region Jira #region Jira
public string JiraHost = "http://"; public string JiraHost { get; set; } = "http://";
public string JiraIssuePrefix = "PROJECT-"; public string JiraIssuePrefix { get; set; } = "PROJECT-";
public OAuthInfo JiraOAuthInfo = null; public OAuthInfo JiraOAuthInfo { get; set; } = null;
#endregion Jira #endregion Jira
#region Mega #region Mega
public MegaApiClient.AuthInfos MegaAuthInfos = null; public MegaAuthInfos MegaAuthInfos { get; set; } = null;
public string MegaParentNodeId = null; public string MegaParentNodeId { get; set; } = null;
#endregion Mega #endregion Mega
#region Amazon S3 #region Amazon S3
public AmazonS3Settings AmazonS3Settings = new AmazonS3Settings() public AmazonS3Settings AmazonS3Settings { get; set; } = new AmazonS3Settings()
{ {
ObjectPrefix = "ShareX/%y/%mo" ObjectPrefix = "ShareX/%y/%mo"
}; };
@ -289,145 +293,154 @@ public class UploadersConfig : SettingsBase<UploadersConfig>
#region ownCloud / Nextcloud #region ownCloud / Nextcloud
public string OwnCloudHost = ""; public string OwnCloudHost { get; set; } = "";
public string OwnCloudUsername = ""; public string OwnCloudUsername { get; set; } = "";
public string OwnCloudPassword = ""; [JsonEncrypt]
public string OwnCloudPath = "/"; public string OwnCloudPassword { get; set; } = "";
public int OwnCloudExpiryTime = 7; public string OwnCloudPath { get; set; } = "/";
public bool OwnCloudCreateShare = true; public int OwnCloudExpiryTime { get; set; } = 7;
public bool OwnCloudDirectLink = false; public bool OwnCloudCreateShare { get; set; } = true;
public bool OwnCloud81Compatibility = true; public bool OwnCloudDirectLink { get; set; } = false;
public bool OwnCloudUsePreviewLinks = false; public bool OwnCloud81Compatibility { get; set; } = true;
public bool OwnCloudAutoExpire = false; public bool OwnCloudUsePreviewLinks { get; set; } = false;
public bool OwnCloudAutoExpire { get; set; } = false;
#endregion ownCloud / Nextcloud #endregion ownCloud / Nextcloud
#region MediaFire #region MediaFire
public string MediaFireUsername = ""; public string MediaFireUsername { get; set; } = "";
public string MediaFirePassword = ""; [JsonEncrypt]
public string MediaFirePath = ""; public string MediaFirePassword { get; set; } = "";
public bool MediaFireUseLongLink = false; public string MediaFirePath { get; set; } = "";
public bool MediaFireUseLongLink { get; set; } = false;
#endregion MediaFire #endregion MediaFire
#region Pushbullet #region Pushbullet
public PushbulletSettings PushbulletSettings = new PushbulletSettings(); public PushbulletSettings PushbulletSettings { get; set; } = new PushbulletSettings();
#endregion Pushbullet #endregion Pushbullet
#region Lambda #region Lambda
public LambdaSettings LambdaSettings = new LambdaSettings(); public LambdaSettings LambdaSettings { get; set; } = new LambdaSettings();
#endregion Lambda #endregion Lambda
#region Lithiio #region Lithiio
public LithiioSettings LithiioSettings = new LithiioSettings(); public LithiioSettings LithiioSettings { get; set; } = new LithiioSettings();
#endregion Lithiio #endregion Lithiio
#region Teknik #region Teknik
public OAuth2Info TeknikOAuth2Info = null; public OAuth2Info TeknikOAuth2Info { get; set; } = null;
public string TeknikUploadAPIUrl = Teknik.DefaultUploadAPIURL; public string TeknikUploadAPIUrl { get; set; } = Teknik.DefaultUploadAPIURL;
public string TeknikPasteAPIUrl = Teknik.DefaultPasteAPIURL; public string TeknikPasteAPIUrl { get; set; } = Teknik.DefaultPasteAPIURL;
public string TeknikUrlShortenerAPIUrl = Teknik.DefaultUrlShortenerAPIURL; public string TeknikUrlShortenerAPIUrl { get; set; } = Teknik.DefaultUrlShortenerAPIURL;
public string TeknikAuthUrl = Teknik.DefaultAuthURL; public string TeknikAuthUrl { get; set; } = Teknik.DefaultAuthURL;
public TeknikExpirationUnit TeknikExpirationUnit = TeknikExpirationUnit.Never; public TeknikExpirationUnit TeknikExpirationUnit { get; set; } = TeknikExpirationUnit.Never;
public int TeknikExpirationLength = 1; public int TeknikExpirationLength { get; set; } = 1;
public bool TeknikEncryption = false; public bool TeknikEncryption { get; set; } = false;
public bool TeknikGenerateDeletionKey = false; public bool TeknikGenerateDeletionKey { get; set; } = false;
#endregion Teknik #endregion Teknik
#region Pomf #region Pomf
public PomfUploader PomfUploader = new PomfUploader(); public PomfUploader PomfUploader { get; set; } = new PomfUploader();
#endregion Pomf #endregion Pomf
#region s-ul #region s-ul
public string SulAPIKey = ""; [JsonEncrypt]
public string SulAPIKey { get; set; } = "";
#endregion s-ul #endregion s-ul
#region Seafile #region Seafile
public string SeafileAPIURL = ""; public string SeafileAPIURL { get; set; } = "";
public string SeafileAuthToken = ""; [JsonEncrypt]
public string SeafileRepoID = ""; public string SeafileAuthToken { get; set; } = "";
public string SeafilePath = "/"; public string SeafileRepoID { get; set; } = "";
public bool SeafileIsLibraryEncrypted = false; public string SeafilePath { get; set; } = "/";
public string SeafileEncryptedLibraryPassword = ""; public bool SeafileIsLibraryEncrypted { get; set; } = false;
public bool SeafileCreateShareableURL = true; [JsonEncrypt]
public bool SeafileCreateShareableURLRaw = false; public string SeafileEncryptedLibraryPassword { get; set; } = "";
public bool SeafileIgnoreInvalidCert = false; public bool SeafileCreateShareableURL { get; set; } = true;
public int SeafileShareDaysToExpire = 0; public bool SeafileCreateShareableURLRaw { get; set; } = false;
public string SeafileSharePassword = ""; public bool SeafileIgnoreInvalidCert { get; set; } = false;
public string SeafileAccInfoEmail = ""; public int SeafileShareDaysToExpire { get; set; } = 0;
public string SeafileAccInfoUsage = ""; [JsonEncrypt]
public string SeafileSharePassword { get; set; } = "";
public string SeafileAccInfoEmail { get; set; } = "";
public string SeafileAccInfoUsage { get; set; } = "";
#endregion Seafile #endregion Seafile
#region Streamable #region Streamable
public bool StreamableAnonymous = true; public bool StreamableAnonymous { get; set; } = true;
public string StreamableUsername = ""; public string StreamableUsername { get; set; } = "";
public string StreamablePassword = ""; [JsonEncrypt]
public bool StreamableUseDirectURL = false; public string StreamablePassword { get; set; } = "";
public bool StreamableUseDirectURL { get; set; } = false;
#endregion Streamable #endregion Streamable
#region Azure Storage #region Azure Storage
public string AzureStorageAccountName = ""; public string AzureStorageAccountName { get; set; } = "";
public string AzureStorageAccountAccessKey = ""; [JsonEncrypt]
public string AzureStorageContainer = ""; public string AzureStorageAccountAccessKey { get; set; } = "";
public string AzureStorageEnvironment = "blob.core.windows.net"; public string AzureStorageContainer { get; set; } = "";
public string AzureStorageCustomDomain = ""; public string AzureStorageEnvironment { get; set; } = "blob.core.windows.net";
public string AzureStorageUploadPath = ""; public string AzureStorageCustomDomain { get; set; } = "";
public string AzureStorageUploadPath { get; set; } = "";
#endregion Azure Storage #endregion Azure Storage
#region Backblaze B2 #region Backblaze B2
public string B2ApplicationKeyId = ""; public string B2ApplicationKeyId { get; set; } = "";
public string B2ApplicationKey = ""; [JsonEncrypt]
public string B2BucketName = ""; public string B2ApplicationKey { get; set; } = "";
public string B2UploadPath = "ShareX/%y/%mo"; public string B2BucketName { get; set; } = "";
public bool B2UseCustomUrl = false; public string B2UploadPath { get; set; } = "ShareX/%y/%mo";
public string B2CustomUrl = "https://example.com"; public bool B2UseCustomUrl { get; set; } = false;
public string B2CustomUrl { get; set; } = "https://example.com";
#endregion Backblaze B2 #endregion Backblaze B2
#region Plik #region Plik
public PlikSettings PlikSettings = new PlikSettings(); public PlikSettings PlikSettings { get; set; } = new PlikSettings();
#endregion Plik #endregion Plik
#region YouTube #region YouTube
public OAuth2Info YouTubeOAuth2Info = null; public OAuth2Info YouTubeOAuth2Info { get; set; } = null;
public YouTubeVideoPrivacy YouTubePrivacyType = YouTubeVideoPrivacy.Public; public YouTubeVideoPrivacy YouTubePrivacyType { get; set; } = YouTubeVideoPrivacy.Public;
public bool YouTubeUseShortenedLink = false; public bool YouTubeUseShortenedLink { get; set; } = false;
#endregion YouTube #endregion YouTube
#region Google Cloud Storage #region Google Cloud Storage
public OAuth2Info GoogleCloudStorageOAuth2Info = null; public OAuth2Info GoogleCloudStorageOAuth2Info { get; set; } = null;
public string GoogleCloudStorageBucket = ""; public string GoogleCloudStorageBucket { get; set; } = "";
public string GoogleCloudStorageDomain = ""; public string GoogleCloudStorageDomain { get; set; } = "";
public string GoogleCloudStorageObjectPrefix = "ShareX/%y/%mo"; public string GoogleCloudStorageObjectPrefix { get; set; } = "ShareX/%y/%mo";
public bool GoogleCloudStorageRemoveExtensionImage = false; public bool GoogleCloudStorageRemoveExtensionImage { get; set; } = false;
public bool GoogleCloudStorageRemoveExtensionVideo = false; public bool GoogleCloudStorageRemoveExtensionVideo { get; set; } = false;
public bool GoogleCloudStorageRemoveExtensionText = false; public bool GoogleCloudStorageRemoveExtensionText { get; set; } = false;
public bool GoogleCloudStorageSetPublicACL = true; public bool GoogleCloudStorageSetPublicACL { get; set; } = true;
#endregion Google Cloud Storage #endregion Google Cloud Storage