mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Use a pinned IP
This commit is contained in:
parent
04bbbfed7f
commit
bf0d098b44
@ -92,7 +92,7 @@ namespace Wabbajack.Common
|
||||
public static string ModlistMetadataURL = "https://raw.githubusercontent.com/wabbajack-tools/mod-lists/master/modlists.json";
|
||||
public static string UtilityModlistMetadataURL = "https://raw.githubusercontent.com/wabbajack-tools/mod-lists/master/utility_modlists.json";
|
||||
public static string UnlistedModlistMetadataURL = "https://raw.githubusercontent.com/wabbajack-tools/mod-lists/master/unlisted_modlists.json";
|
||||
public static string ModlistSummaryURL = "http://build.wabbajack.org/lists/status.json";
|
||||
public static string ModlistSummaryURL = "https://build.wabbajack.org/lists/status.json";
|
||||
public static string UserAgent
|
||||
{
|
||||
get
|
||||
@ -120,7 +120,7 @@ namespace Wabbajack.Common
|
||||
public static string WabbajackCacheHostname = "build.wabbajack.org";
|
||||
|
||||
// Direct IP to the CDN
|
||||
public static string NetworkWorkaroundHost = "storage.wabbajack.org"; //"51.81.80.6";
|
||||
public static string NetworkWorkaroundHost = "51.81.80.6";
|
||||
public static bool UseNetworkWorkaroundMode = false;
|
||||
|
||||
public static Uri WabbajackBuildServerUri = new Uri("https://build.wabbajack.org");
|
||||
|
@ -83,7 +83,7 @@ namespace Wabbajack.Lib.Downloaders
|
||||
using var mmfile = MemoryMappedFile.CreateFromFile(fs, null, definition.Size, MemoryMappedFileAccess.ReadWrite, HandleInheritability.None, false);
|
||||
var client = new Wabbajack.Lib.Http.Client();
|
||||
|
||||
if (!DomainRemaps.ContainsKey(Url.Host))
|
||||
if (!DomainRemaps.ContainsKey(Url.Host))
|
||||
client.Headers.Add(("Host", Url.Host));
|
||||
|
||||
using var queue = new WorkQueue();
|
||||
|
@ -76,8 +76,14 @@ namespace Wabbajack.Lib.Http
|
||||
public async Task<HttpResponseMessage> SendAsync(HttpRequestMessage msg, HttpCompletionOption responseHeadersRead = HttpCompletionOption.ResponseHeadersRead, bool errorsAsExceptions = true, bool retry = true, CancellationToken? token = null)
|
||||
{
|
||||
msg = FixupMessage(msg);
|
||||
foreach (var (k, v) in Headers)
|
||||
msg.Headers.Add(k, v);
|
||||
foreach (var (k, v) in Headers)
|
||||
{
|
||||
if (k == "Host")
|
||||
msg.Headers.Host = v;
|
||||
else
|
||||
msg.Headers.Add(k, v);
|
||||
}
|
||||
|
||||
if (Cookies.Count > 0)
|
||||
Cookies.ForEach(c => ClientFactory.Cookies.Add(c));
|
||||
int retries = 0;
|
||||
|
@ -22,10 +22,18 @@ namespace Wabbajack.Lib.Http
|
||||
MaxConnectionsPerServer = 20,
|
||||
PooledConnectionLifetime = TimeSpan.FromMilliseconds(100),
|
||||
PooledConnectionIdleTimeout = TimeSpan.FromMilliseconds(100),
|
||||
AutomaticDecompression = DecompressionMethods.All
|
||||
|
||||
AutomaticDecompression = DecompressionMethods.All,
|
||||
|
||||
};
|
||||
Utils.Log($"Configuring with SSL {_socketsHandler.SslOptions.EnabledSslProtocols}");
|
||||
|
||||
ServicePointManager.ServerCertificateValidationCallback +=
|
||||
(sender, certificate, chain, errors) =>
|
||||
{
|
||||
if (Consts.UseNetworkWorkaroundMode)
|
||||
return true;
|
||||
return errors == SslPolicyErrors.None;
|
||||
};
|
||||
Client = new SysHttp.HttpClient(_socketsHandler);
|
||||
Client.DefaultRequestHeaders.Add("User-Agent", Consts.UserAgent);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user