mirror of
https://github.com/rclone/rclone.git
synced 2025-01-13 20:38:12 +02:00
Make it obvious that the client secrets are encrypted
This commit is contained in:
parent
3343c1afa4
commit
7d4e143dee
@ -32,15 +32,15 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
rcloneClientID = "amzn1.application-oa2-client.6bf18d2d1f5b485c94c8988bb03ad0e7"
|
rcloneClientID = "amzn1.application-oa2-client.6bf18d2d1f5b485c94c8988bb03ad0e7"
|
||||||
rcloneClientSecret = "k8/NyszKm5vEkZXAwsbGkd6C3NrbjIqMg4qEhIeF14Szub2wur+/teS3ubXgsLe9//+tr/qoqK+lq6mg8vWkoA=="
|
rcloneEncryptedClientSecret = "k8/NyszKm5vEkZXAwsbGkd6C3NrbjIqMg4qEhIeF14Szub2wur+/teS3ubXgsLe9//+tr/qoqK+lq6mg8vWkoA=="
|
||||||
folderKind = "FOLDER"
|
folderKind = "FOLDER"
|
||||||
fileKind = "FILE"
|
fileKind = "FILE"
|
||||||
assetKind = "ASSET"
|
assetKind = "ASSET"
|
||||||
statusAvailable = "AVAILABLE"
|
statusAvailable = "AVAILABLE"
|
||||||
timeFormat = time.RFC3339 // 2014-03-07T22:31:12.173Z
|
timeFormat = time.RFC3339 // 2014-03-07T22:31:12.173Z
|
||||||
minSleep = 20 * time.Millisecond
|
minSleep = 20 * time.Millisecond
|
||||||
warnFileSize = 50 << 30 // Display warning for files larger than this size
|
warnFileSize = 50 << 30 // Display warning for files larger than this size
|
||||||
)
|
)
|
||||||
|
|
||||||
// Globals
|
// Globals
|
||||||
@ -55,7 +55,7 @@ var (
|
|||||||
TokenURL: "https://api.amazon.com/auth/o2/token",
|
TokenURL: "https://api.amazon.com/auth/o2/token",
|
||||||
},
|
},
|
||||||
ClientID: rcloneClientID,
|
ClientID: rcloneClientID,
|
||||||
ClientSecret: fs.Reveal(rcloneClientSecret),
|
ClientSecret: fs.Reveal(rcloneEncryptedClientSecret),
|
||||||
RedirectURL: oauthutil.RedirectURL,
|
RedirectURL: oauthutil.RedirectURL,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
@ -30,15 +30,15 @@ import (
|
|||||||
|
|
||||||
// Constants
|
// Constants
|
||||||
const (
|
const (
|
||||||
rcloneClientID = "202264815644.apps.googleusercontent.com"
|
rcloneClientID = "202264815644.apps.googleusercontent.com"
|
||||||
rcloneClientSecret = "8p/yms3OlNXE9OTDl/HLypf9gdiJ5cT3"
|
rcloneEncryptedClientSecret = "8p/yms3OlNXE9OTDl/HLypf9gdiJ5cT3"
|
||||||
driveFolderType = "application/vnd.google-apps.folder"
|
driveFolderType = "application/vnd.google-apps.folder"
|
||||||
timeFormatIn = time.RFC3339
|
timeFormatIn = time.RFC3339
|
||||||
timeFormatOut = "2006-01-02T15:04:05.000000000Z07:00"
|
timeFormatOut = "2006-01-02T15:04:05.000000000Z07:00"
|
||||||
minSleep = 10 * time.Millisecond
|
minSleep = 10 * time.Millisecond
|
||||||
maxSleep = 2 * time.Second
|
maxSleep = 2 * time.Second
|
||||||
decayConstant = 2 // bigger for slower decay, exponential
|
decayConstant = 2 // bigger for slower decay, exponential
|
||||||
defaultExtensions = "docx,xlsx,pptx,svg"
|
defaultExtensions = "docx,xlsx,pptx,svg"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Globals
|
// Globals
|
||||||
@ -57,7 +57,7 @@ var (
|
|||||||
Scopes: []string{"https://www.googleapis.com/auth/drive"},
|
Scopes: []string{"https://www.googleapis.com/auth/drive"},
|
||||||
Endpoint: google.Endpoint,
|
Endpoint: google.Endpoint,
|
||||||
ClientID: rcloneClientID,
|
ClientID: rcloneClientID,
|
||||||
ClientSecret: fs.Reveal(rcloneClientSecret),
|
ClientSecret: fs.Reveal(rcloneEncryptedClientSecret),
|
||||||
RedirectURL: oauthutil.TitleBarRedirectURL,
|
RedirectURL: oauthutil.TitleBarRedirectURL,
|
||||||
}
|
}
|
||||||
mimeTypeToExtension = map[string]string{
|
mimeTypeToExtension = map[string]string{
|
||||||
|
@ -27,9 +27,9 @@ import (
|
|||||||
|
|
||||||
// Constants
|
// Constants
|
||||||
const (
|
const (
|
||||||
rcloneAppKey = "5jcck7diasz0rqy"
|
rcloneAppKey = "5jcck7diasz0rqy"
|
||||||
rcloneAppSecret = "m8WRxJ6b1Z/Y25fDwJWS"
|
rcloneEncryptedAppSecret = "m8WRxJ6b1Z/Y25fDwJWS"
|
||||||
metadataLimit = dropbox.MetadataLimitDefault // max items to fetch at once
|
metadataLimit = dropbox.MetadataLimitDefault // max items to fetch at once
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@ -138,7 +138,7 @@ func newDropbox(name string) (*dropbox.Dropbox, error) {
|
|||||||
}
|
}
|
||||||
appSecret := fs.ConfigFile.MustValue(name, "app_secret")
|
appSecret := fs.ConfigFile.MustValue(name, "app_secret")
|
||||||
if appSecret == "" {
|
if appSecret == "" {
|
||||||
appSecret = fs.Reveal(rcloneAppSecret)
|
appSecret = fs.Reveal(rcloneEncryptedAppSecret)
|
||||||
}
|
}
|
||||||
|
|
||||||
err := db.SetAppInfo(appKey, appSecret)
|
err := db.SetAppInfo(appKey, appSecret)
|
||||||
|
@ -34,12 +34,12 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
rcloneClientID = "202264815644.apps.googleusercontent.com"
|
rcloneClientID = "202264815644.apps.googleusercontent.com"
|
||||||
rcloneClientSecret = "8p/yms3OlNXE9OTDl/HLypf9gdiJ5cT3"
|
rcloneEncryptedClientSecret = "8p/yms3OlNXE9OTDl/HLypf9gdiJ5cT3"
|
||||||
timeFormatIn = time.RFC3339
|
timeFormatIn = time.RFC3339
|
||||||
timeFormatOut = "2006-01-02T15:04:05.000000000Z07:00"
|
timeFormatOut = "2006-01-02T15:04:05.000000000Z07:00"
|
||||||
metaMtime = "mtime" // key to store mtime under in metadata
|
metaMtime = "mtime" // key to store mtime under in metadata
|
||||||
listChunks = 256 // chunk size to read directory listings
|
listChunks = 256 // chunk size to read directory listings
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@ -48,7 +48,7 @@ var (
|
|||||||
Scopes: []string{storage.DevstorageFullControlScope},
|
Scopes: []string{storage.DevstorageFullControlScope},
|
||||||
Endpoint: google.Endpoint,
|
Endpoint: google.Endpoint,
|
||||||
ClientID: rcloneClientID,
|
ClientID: rcloneClientID,
|
||||||
ClientSecret: fs.Reveal(rcloneClientSecret),
|
ClientSecret: fs.Reveal(rcloneEncryptedClientSecret),
|
||||||
RedirectURL: oauthutil.TitleBarRedirectURL,
|
RedirectURL: oauthutil.TitleBarRedirectURL,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
@ -21,8 +21,8 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
rcloneClientID = "api_hubic_svWP970PvSWbw5G3PzrAqZ6X2uHeZBPI"
|
rcloneClientID = "api_hubic_svWP970PvSWbw5G3PzrAqZ6X2uHeZBPI"
|
||||||
rcloneClientSecret = "8MrG3pjWyJya4OnO9ZTS4emI+9fa1ouPgvfD2MbTzfDYvO/H5czFxsTXtcji4/Hz3snz8/CrzMzlxvP9//Ty/Q=="
|
rcloneEncryptedClientSecret = "8MrG3pjWyJya4OnO9ZTS4emI+9fa1ouPgvfD2MbTzfDYvO/H5czFxsTXtcji4/Hz3snz8/CrzMzlxvP9//Ty/Q=="
|
||||||
)
|
)
|
||||||
|
|
||||||
// Globals
|
// Globals
|
||||||
@ -37,7 +37,7 @@ var (
|
|||||||
TokenURL: "https://api.hubic.com/oauth/token/",
|
TokenURL: "https://api.hubic.com/oauth/token/",
|
||||||
},
|
},
|
||||||
ClientID: rcloneClientID,
|
ClientID: rcloneClientID,
|
||||||
ClientSecret: fs.Reveal(rcloneClientSecret),
|
ClientSecret: fs.Reveal(rcloneEncryptedClientSecret),
|
||||||
RedirectURL: oauthutil.RedirectLocalhostURL,
|
RedirectURL: oauthutil.RedirectLocalhostURL,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
@ -24,12 +24,12 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
rcloneClientID = "0000000044165769"
|
rcloneClientID = "0000000044165769"
|
||||||
rcloneClientSecret = "0+be4+jYw+7018HY6P3t/Izo+pTc+Yvt8+fy8NHU094="
|
rcloneEncryptedClientSecret = "0+be4+jYw+7018HY6P3t/Izo+pTc+Yvt8+fy8NHU094="
|
||||||
minSleep = 10 * time.Millisecond
|
minSleep = 10 * time.Millisecond
|
||||||
maxSleep = 2 * time.Second
|
maxSleep = 2 * time.Second
|
||||||
decayConstant = 2 // bigger for slower decay, exponential
|
decayConstant = 2 // bigger for slower decay, exponential
|
||||||
rootURL = "https://api.onedrive.com/v1.0" // root URL for requests
|
rootURL = "https://api.onedrive.com/v1.0" // root URL for requests
|
||||||
)
|
)
|
||||||
|
|
||||||
// Globals
|
// Globals
|
||||||
@ -46,7 +46,7 @@ var (
|
|||||||
TokenURL: "https://login.live.com/oauth20_token.srf",
|
TokenURL: "https://login.live.com/oauth20_token.srf",
|
||||||
},
|
},
|
||||||
ClientID: rcloneClientID,
|
ClientID: rcloneClientID,
|
||||||
ClientSecret: fs.Reveal(rcloneClientSecret),
|
ClientSecret: fs.Reveal(rcloneEncryptedClientSecret),
|
||||||
RedirectURL: oauthutil.RedirectPublicURL,
|
RedirectURL: oauthutil.RedirectPublicURL,
|
||||||
}
|
}
|
||||||
chunkSize = fs.SizeSuffix(10 * 1024 * 1024)
|
chunkSize = fs.SizeSuffix(10 * 1024 * 1024)
|
||||||
|
@ -21,8 +21,8 @@ import (
|
|||||||
|
|
||||||
//oAuth
|
//oAuth
|
||||||
const (
|
const (
|
||||||
rcloneClientID = "ac39b43b9eba4cae8ffb788c06d816a8"
|
rcloneClientID = "ac39b43b9eba4cae8ffb788c06d816a8"
|
||||||
rcloneClientSecret = "k8jKzZnMmM+Wx5jAksPAwYKPgImOiN+FhNKD09KBg9A="
|
rcloneEncryptedClientSecret = "k8jKzZnMmM+Wx5jAksPAwYKPgImOiN+FhNKD09KBg9A="
|
||||||
)
|
)
|
||||||
|
|
||||||
// Globals
|
// Globals
|
||||||
@ -34,7 +34,7 @@ var (
|
|||||||
TokenURL: "https://oauth.yandex.com/token", //same as https://oauth.yandex.ru/token
|
TokenURL: "https://oauth.yandex.com/token", //same as https://oauth.yandex.ru/token
|
||||||
},
|
},
|
||||||
ClientID: rcloneClientID,
|
ClientID: rcloneClientID,
|
||||||
ClientSecret: fs.Reveal(rcloneClientSecret),
|
ClientSecret: fs.Reveal(rcloneEncryptedClientSecret),
|
||||||
RedirectURL: oauthutil.RedirectURL,
|
RedirectURL: oauthutil.RedirectURL,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user