Add smart proxy with direct-fallback and logging

This commit is contained in:
AMIAY
2026-02-01 19:46:22 +01:00
parent 7c8a106f06
commit 3ac2f25955
4 changed files with 395 additions and 71 deletions

View File

@@ -1,6 +1,6 @@
const fs = require('fs');
const path = require('path');
const { getProxyDownloadStream } = require('./proxyClient');
const { smartDownloadStream } = require('./proxyClient');
// Domain configuration
const ORIGINAL_DOMAIN = 'hytale.com';
@@ -619,7 +619,7 @@ class ClientPatcher {
let totalSize = 0;
let downloaded = 0;
const stream = await getProxyDownloadStream(url, (chunk, downloadedBytes, total) => {
const stream = await smartDownloadStream(url, (chunk, downloadedBytes, total) => {
downloaded = downloadedBytes;
totalSize = total;
if (progressCallback && totalSize) {