fixed some bugs, added ability to work without internet

This commit is contained in:
2025-05-21 13:50:10 +05:00
parent ab1aefd619
commit e915892fa2
7 changed files with 79 additions and 46 deletions

View File

@@ -12,6 +12,7 @@ public static class NetworkHelper
// thanks for Sashok :3
// https://github.com/new-sashok724/Launcher/blob/23485c3f7de6620d2c6b7b2dd9339c3beb6a0366/Launcher/source/helper/IOHelper.java#L259
_http.DefaultRequestHeaders.Add("User-Agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)");
_http.Timeout = TimeSpan.FromSeconds(4);
}
public static Task<string> GetString(string url, CancellationToken ct = default) => _http.GetStringAsync(url, ct);