mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2025-12-22 01:08:37 +00:00
Bugfixes
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
# Ignore all config files, apart from ones we want to include
|
# Ignore all config files, apart from ones we want to include
|
||||||
ArchiSteamFarm/config/*
|
ArchiSteamFarm/config/*
|
||||||
|
!ArchiSteamFarm/config/ASF.json
|
||||||
!ArchiSteamFarm/config/example.json
|
!ArchiSteamFarm/config/example.json
|
||||||
!ArchiSteamFarm/config/minimal.json
|
!ArchiSteamFarm/config/minimal.json
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ using System.Threading.Tasks;
|
|||||||
|
|
||||||
namespace ArchiSteamFarm {
|
namespace ArchiSteamFarm {
|
||||||
internal sealed class ArchiWebHandler {
|
internal sealed class ArchiWebHandler {
|
||||||
private static int Timeout;
|
private static int Timeout = 30 * 1000;
|
||||||
|
|
||||||
private readonly Bot Bot;
|
private readonly Bot Bot;
|
||||||
private readonly Dictionary<string, string> Cookie = new Dictionary<string, string>(4);
|
private readonly Dictionary<string, string> Cookie = new Dictionary<string, string>(4);
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ namespace ArchiSteamFarm {
|
|||||||
|
|
||||||
internal sealed class WCF : IWCF {
|
internal sealed class WCF : IWCF {
|
||||||
|
|
||||||
private static string URL = "http://localhost:1242/ASF"; // 1242 = 1024 + A(65) + S(83) + F(70)
|
private static string URL = "http://localhost:1242/ASF";
|
||||||
|
|
||||||
private ServiceHost ServiceHost;
|
private ServiceHost ServiceHost;
|
||||||
private Client Client;
|
private Client Client;
|
||||||
|
|||||||
@@ -38,14 +38,14 @@ namespace ArchiSteamFarm {
|
|||||||
internal const byte MaxRetries = 5; // Defines maximum number of retries, UrlRequest() does not handle retry by itself (it's app responsibility)
|
internal const byte MaxRetries = 5; // Defines maximum number of retries, UrlRequest() does not handle retry by itself (it's app responsibility)
|
||||||
|
|
||||||
private static readonly string DefaultUserAgent = "ArchiSteamFarm/" + Program.Version;
|
private static readonly string DefaultUserAgent = "ArchiSteamFarm/" + Program.Version;
|
||||||
private static HttpClient HttpClient;
|
private static readonly HttpClient HttpClient = new HttpClient(new HttpClientHandler {
|
||||||
|
UseCookies = false
|
||||||
|
}) {
|
||||||
|
Timeout = TimeSpan.FromSeconds(30)
|
||||||
|
};
|
||||||
|
|
||||||
internal static void Init() {
|
internal static void Init() {
|
||||||
HttpClient = new HttpClient(new HttpClientHandler {
|
HttpClient.Timeout = TimeSpan.FromSeconds(Program.GlobalConfig.HttpTimeout);
|
||||||
UseCookies = false
|
|
||||||
}) {
|
|
||||||
Timeout = TimeSpan.FromSeconds(Program.GlobalConfig.HttpTimeout)
|
|
||||||
};
|
|
||||||
|
|
||||||
// Most web services expect that UserAgent is set, so we declare it globally
|
// Most web services expect that UserAgent is set, so we declare it globally
|
||||||
// Any request can override that on as-needed basis (see: RequestOptions.FakeUserAgent)
|
// Any request can override that on as-needed basis (see: RequestOptions.FakeUserAgent)
|
||||||
|
|||||||
14
ArchiSteamFarm/config/ASF.json
Normal file
14
ArchiSteamFarm/config/ASF.json
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"AutoUpdates": true,
|
||||||
|
"UpdateChannel": 1,
|
||||||
|
"HttpTimeout": 30,
|
||||||
|
"RequestLimiterDelay": 7,
|
||||||
|
"WCFHostname": "localhost",
|
||||||
|
"WCFPort": 1242,
|
||||||
|
"Blacklist": [
|
||||||
|
303700,
|
||||||
|
335590,
|
||||||
|
368020,
|
||||||
|
425280
|
||||||
|
]
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user