mirror of
https://github.com/Milxnor/Cobalt.git
synced 2026-01-13 02:22:22 +01:00
Add hybrid support
This commit is contained in:
@@ -55,18 +55,46 @@ inline CURLcode CurlEasySetOptDetour(struct Curl_easy* data, CURLoption tag, ...
|
|||||||
|
|
||||||
Uri uri = Uri::Parse(url);
|
Uri uri = Uri::Parse(url);
|
||||||
|
|
||||||
#ifdef URL_HOST
|
// std::cout << "Path: " << uri.Path << '\n';
|
||||||
|
|
||||||
|
#ifdef URL_HOST
|
||||||
if (uri.Host.ends_with(XOR("ol.epicgames.com"))
|
if (uri.Host.ends_with(XOR("ol.epicgames.com"))
|
||||||
|| uri.Host.ends_with(XOR(".akamaized.net"))
|
|| uri.Host.ends_with(XOR(".akamaized.net"))
|
||||||
|| uri.Host.ends_with(XOR("on.epicgames.com"))
|
|| uri.Host.ends_with(XOR("on.epicgames.com"))
|
||||||
|| uri.Host.ends_with(XOR("game-social.epicgames.com"))
|
|| uri.Host.ends_with(XOR("game-social.epicgames.com"))
|
||||||
|| uri.Host.contains(XOR("superawesome.com")))
|
|| uri.Host.contains(XOR("superawesome.com")))
|
||||||
{
|
{
|
||||||
url = Uri::CreateUri(URL_PROTOCOL, URL_HOST, URL_PORT, uri.Path, uri.QueryString);
|
if (CobaltUsage == ECobaltUsage::Private)
|
||||||
|
{
|
||||||
|
url = Uri::CreateUri(URL_PROTOCOL, URL_HOST, URL_PORT, uri.Path, uri.QueryString);
|
||||||
|
}
|
||||||
|
else if (CobaltUsage == ECobaltUsage::Hybrid)
|
||||||
|
{
|
||||||
|
if (CobaltUsage == ECobaltUsage::Hybrid) {
|
||||||
|
if (uri.Path.contains("/fortnite/api/v2/versioncheck/")) {
|
||||||
|
url = Uri::CreateUri(URL_PROTOCOL, URL_HOST, URL_PORT, uri.Path, uri.QueryString);
|
||||||
|
}
|
||||||
|
else if (uri.Path.contains("/fortnite/api/game/v2/profile")) {
|
||||||
|
url = Uri::CreateUri(URL_PROTOCOL, URL_HOST, URL_PORT, uri.Path, uri.QueryString);
|
||||||
|
}
|
||||||
|
else if (uri.Path.contains("/content/api/pages/fortnite-game")) {
|
||||||
|
url = Uri::CreateUri(URL_PROTOCOL, URL_HOST, URL_PORT, uri.Path, uri.QueryString);
|
||||||
|
}
|
||||||
|
else if (uri.Path.contains("/affiliate/api/public/affiliates/slug")) {
|
||||||
|
url = Uri::CreateUri(URL_PROTOCOL, URL_HOST, URL_PORT, uri.Path, uri.QueryString);
|
||||||
|
}
|
||||||
|
else if (uri.Path.contains("/socialban/api/public/v1")) {
|
||||||
|
url = Uri::CreateUri(URL_PROTOCOL, URL_HOST, URL_PORT, uri.Path, uri.QueryString);
|
||||||
|
}
|
||||||
|
else if (uri.Path.contains("/fortnite/api/cloudstorage/system")) {
|
||||||
|
url = Uri::CreateUri(URL_PROTOCOL, URL_HOST, URL_PORT, uri.Path, uri.QueryString);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
result = CurlSetOpt_(data, tag, url.c_str());
|
result = CurlSetOpt_(data, tag, url.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -97,6 +97,10 @@ DWORD WINAPI Main(LPVOID)
|
|||||||
freopen_s(&fptr, "CONOUT$", "w+", stdout);
|
freopen_s(&fptr, "CONOUT$", "w+", stdout);
|
||||||
#endif SHOW_WINDOWS_CONSOLE
|
#endif SHOW_WINDOWS_CONSOLE
|
||||||
|
|
||||||
|
#ifndef URL_HOST
|
||||||
|
std::cout << "\n\n\n!!!!!!! URL_HOST IS NOT DEFINED !!!!!!!\n\n\n\n";
|
||||||
|
#endif
|
||||||
|
|
||||||
std::cout << "Initializing Cobalt (made by Milxnor#3531).\n";
|
std::cout << "Initializing Cobalt (made by Milxnor#3531).\n";
|
||||||
|
|
||||||
std::cout << "Credits\n\n";
|
std::cout << "Credits\n\n";
|
||||||
|
|||||||
@@ -1,7 +1,16 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
enum class ECobaltUsage
|
||||||
|
{
|
||||||
|
Private,
|
||||||
|
Hybrid,
|
||||||
|
// RecordingRequests // todo?
|
||||||
|
};
|
||||||
|
|
||||||
#define URL_PROTOCOL "http"
|
#define URL_PROTOCOL "http"
|
||||||
#define URL_HOST "127.0.0.1"
|
#define URL_HOST "127.0.0.1"
|
||||||
#define URL_PORT "3551"
|
#define URL_PORT "3551"
|
||||||
|
|
||||||
// #define SHOW_WINDOWS_CONSOLE
|
#define SHOW_WINDOWS_CONSOLE
|
||||||
|
|
||||||
|
constexpr static ECobaltUsage CobaltUsage = ECobaltUsage::Private;
|
||||||
@@ -9,7 +9,7 @@ Go to `settings.h` and change URL_HOST and URL_PORT to what you want.
|
|||||||
|
|
||||||
Go to `settings.h` and change the variable `CobaltUsage` to `ECobaltUsage::Hybrid`.
|
Go to `settings.h` and change the variable `CobaltUsage` to `ECobaltUsage::Hybrid`.
|
||||||
|
|
||||||
# How to connect to XMPP with fiddler open ()
|
# How to connect to XMPP with fiddler open
|
||||||
|
|
||||||
Thanks [Lawin](https://github.com/Lawin0129) for this method.<br>
|
Thanks [Lawin](https://github.com/Lawin0129) for this method.<br>
|
||||||
All you have to do is put this into your fiddler script.
|
All you have to do is put this into your fiddler script.
|
||||||
|
|||||||
Reference in New Issue
Block a user