mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-16 08:25:28 +00:00
Make it possible to run steam client with UDP
This commit is contained in:
@@ -186,7 +186,7 @@ namespace ArchiSteamFarm {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Initialize
|
// Initialize
|
||||||
SteamClient = new SteamClient();
|
SteamClient = new SteamClient(Program.GlobalConfig.SteamProtocol);
|
||||||
|
|
||||||
if (Program.GlobalConfig.Debug && !Debugging.NetHookAlreadyInitialized && Directory.Exists(Program.DebugDirectory)) {
|
if (Program.GlobalConfig.Debug && !Debugging.NetHookAlreadyInitialized && Directory.Exists(Program.DebugDirectory)) {
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ using Newtonsoft.Json;
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Net.Sockets;
|
||||||
|
|
||||||
namespace ArchiSteamFarm {
|
namespace ArchiSteamFarm {
|
||||||
internal sealed class GlobalConfig {
|
internal sealed class GlobalConfig {
|
||||||
@@ -47,6 +48,9 @@ namespace ArchiSteamFarm {
|
|||||||
[JsonProperty(Required = Required.DisallowNull)]
|
[JsonProperty(Required = Required.DisallowNull)]
|
||||||
internal EUpdateChannel UpdateChannel { get; private set; } = EUpdateChannel.Stable;
|
internal EUpdateChannel UpdateChannel { get; private set; } = EUpdateChannel.Stable;
|
||||||
|
|
||||||
|
[JsonProperty(Required = Required.DisallowNull)]
|
||||||
|
internal ProtocolType SteamProtocol { get; private set; } = ProtocolType.Tcp;
|
||||||
|
|
||||||
[JsonProperty(Required = Required.DisallowNull)]
|
[JsonProperty(Required = Required.DisallowNull)]
|
||||||
internal ulong SteamOwnerID { get; private set; } = 0;
|
internal ulong SteamOwnerID { get; private set; } = 0;
|
||||||
|
|
||||||
@@ -107,6 +111,17 @@ namespace ArchiSteamFarm {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SK2 supports only TCP and UDP steam protocols
|
||||||
|
// Make sure that user can't screw this up
|
||||||
|
switch (globalConfig.SteamProtocol) {
|
||||||
|
case ProtocolType.Tcp:
|
||||||
|
case ProtocolType.Udp:
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
globalConfig.SteamProtocol = ProtocolType.Tcp;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
return globalConfig;
|
return globalConfig;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
"Debug": false,
|
"Debug": false,
|
||||||
"AutoUpdates": true,
|
"AutoUpdates": true,
|
||||||
"UpdateChannel": 1,
|
"UpdateChannel": 1,
|
||||||
|
"SteamProtocol": 6,
|
||||||
"SteamOwnerID": 0,
|
"SteamOwnerID": 0,
|
||||||
"MaxFarmingTime": 10,
|
"MaxFarmingTime": 10,
|
||||||
"IdleFarmingPeriod": 3,
|
"IdleFarmingPeriod": 3,
|
||||||
|
|||||||
Reference in New Issue
Block a user