updater: Prepare for transition to Fastly CDN
This commit is contained in:
parent
3d4b277a60
commit
7a9a1fa2c9
@ -358,11 +358,11 @@ bool DownloadWorkerThread()
|
||||
WinHttpSetOption(hSession, WINHTTP_OPTION_SECURE_PROTOCOLS,
|
||||
(LPVOID)&tlsProtocols, sizeof(tlsProtocols));
|
||||
|
||||
HttpHandle hConnect = WinHttpConnect(hSession, L"obsproject.com",
|
||||
HttpHandle hConnect = WinHttpConnect(hSession, L"cdn-fastly.obsproject.com",
|
||||
INTERNET_DEFAULT_HTTPS_PORT, 0);
|
||||
if (!hConnect) {
|
||||
downloadThreadFailure = true;
|
||||
Status(L"Update failed: Couldn't connect to obsproject.com");
|
||||
Status(L"Update failed: Couldn't connect to cdn-fastly.obsproject.com");
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -614,7 +614,7 @@ static inline bool has_str(const char *file, const char *str)
|
||||
#define UTF8ToWideBuf(wide, utf8) UTF8ToWide(wide, _countof(wide), utf8)
|
||||
#define WideToUTF8Buf(utf8, wide) WideToUTF8(utf8, _countof(utf8), wide)
|
||||
|
||||
#define UPDATE_URL L"https://obsproject.com/update_studio"
|
||||
#define UPDATE_URL L"https://cdn-fastly.obsproject.com/update_studio"
|
||||
|
||||
static bool AddPackageUpdateFiles(json_t *root, size_t idx,
|
||||
const wchar_t *tempPath)
|
||||
@ -750,7 +750,7 @@ static void UpdateWithPatchIfAvailable(const char *name, const char *hash,
|
||||
wchar_t sourceURL[1024];
|
||||
wchar_t patchHashStr[BLAKE2_HASH_STR_LENGTH];
|
||||
|
||||
if (strncmp(source, "https://obsproject.com/", 23) != 0)
|
||||
if (strncmp(source, "https://cdn-fastly.obsproject.com/", 34) != 0)
|
||||
return;
|
||||
|
||||
string patchPackageName = name;
|
||||
@ -959,10 +959,10 @@ static bool UpdateVS2017Redists(json_t *root)
|
||||
WinHttpSetOption(hSession, WINHTTP_OPTION_SECURE_PROTOCOLS,
|
||||
(LPVOID)&tlsProtocols, sizeof(tlsProtocols));
|
||||
|
||||
HttpHandle hConnect = WinHttpConnect(hSession, L"obsproject.com",
|
||||
HttpHandle hConnect = WinHttpConnect(hSession, L"cdn-fastly.obsproject.com",
|
||||
INTERNET_DEFAULT_HTTPS_PORT, 0);
|
||||
if (!hConnect) {
|
||||
Status(L"Update failed: Couldn't connect to obsproject.com");
|
||||
Status(L"Update failed: Couldn't connect to cdn-fastly.obsproject.com");
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -983,7 +983,7 @@ static bool UpdateVS2017Redists(json_t *root)
|
||||
: L"vc2017redist_x64.exe";
|
||||
|
||||
wstring sourceURL;
|
||||
sourceURL += L"https://obsproject.com/downloads/";
|
||||
sourceURL += L"https://cdn-fastly.obsproject.com/downloads/";
|
||||
sourceURL += file;
|
||||
|
||||
wstring destPath;
|
||||
|
Loading…
x
Reference in New Issue
Block a user