You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
This is a binary patching and incremental downloading tool, similar to rsync or zsync. It aims to improve the large binary download processes that previously were served by robocopy (i.e. full packages produced by the build farm). The original code can be found in `//depot/usr/yuriy.odonnell/unsync`. This commit is a branch from the original location to preserve history. While the codebase is designed to be self-contained and does not depend on any engine libraries, it mostly follows the UE coding guidelines and can be built with UBT. Currently only Windows is supported, however the tool is expected to also work on Mac and Linux in the future. #rb Martin.Ridgers #preflight skip [CL 18993571 by Yuriy ODonnell in ue5-main branch]
59 lines
1.4 KiB
C++
59 lines
1.4 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "UnsyncCommon.h"
|
|
#include "UnsyncError.h"
|
|
#include "UnsyncRemote.h"
|
|
|
|
#include <memory>
|
|
#include <string>
|
|
|
|
namespace unsync {
|
|
|
|
class FBuffer;
|
|
|
|
static constexpr uint16 UNSYNC_DEFAULT_PORT = 53841;
|
|
|
|
enum class EProtocolFlavor
|
|
{
|
|
Unknown,
|
|
Unsync,
|
|
Jupiter,
|
|
};
|
|
|
|
enum class ETransportProtocol
|
|
{
|
|
Http,
|
|
Unsync,
|
|
};
|
|
|
|
EProtocolFlavor ProtocolFlavorFromString(const char* Str);
|
|
const char* ToString(EProtocolFlavor Protocol);
|
|
|
|
struct FRemoteDesc
|
|
{
|
|
EProtocolFlavor Protocol = EProtocolFlavor::Unknown;
|
|
|
|
std::string HostAddress;
|
|
uint16 HostPort = 0;
|
|
|
|
std::string RequestPath;
|
|
std::string StorageNamespace;
|
|
std::string StorageBucket = "unsync"; // TODO: override via command line
|
|
std::string HttpHeaders;
|
|
|
|
bool bTlsEnable = true; // Prefer TLS, if supported by protocol and remote server
|
|
bool bTlsVerifyCertificate = true; // Disabling this allows self-signed certificates
|
|
std::string TlsSubject; // Use host by default
|
|
std::shared_ptr<FBuffer> TlsCacert; // Custom CA to use for server certificate validation (system root CA is used by default)
|
|
|
|
uint32 MaxConnections = 8; // Limit on concurrent connections to this server
|
|
|
|
bool IsValid() const { return Protocol != EProtocolFlavor::Unknown && !HostAddress.empty() && HostPort != 0; }
|
|
|
|
static TResult<FRemoteDesc> FromUrl(std::string_view Url);
|
|
};
|
|
|
|
} // namespace unsync
|