mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2025-12-27 19:50:47 +00:00
Compare commits
59 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
91c28c60de | ||
|
|
ea7b944114 | ||
|
|
2420f39718 | ||
|
|
bb1f55d809 | ||
|
|
49858fa18e | ||
|
|
4be3a59704 | ||
|
|
0d8cb84b06 | ||
|
|
0b36b92d62 | ||
|
|
98938db3d2 | ||
|
|
cf3e319489 | ||
|
|
a7619f7ff5 | ||
|
|
5bb32c4e94 | ||
|
|
1421152e27 | ||
|
|
354b58970e | ||
|
|
9d30f68a85 | ||
|
|
bf5188530d | ||
|
|
98b121a7bd | ||
|
|
557f0304a2 | ||
|
|
b0632a6c8d | ||
|
|
ce37888609 | ||
|
|
7aa862731f | ||
|
|
1abfd37d71 | ||
|
|
77e12476e0 | ||
|
|
4b170a5c12 | ||
|
|
07f659d22c | ||
|
|
c72d7009dc | ||
|
|
9f33fa5e72 | ||
|
|
9a55ab7518 | ||
|
|
5985d07719 | ||
|
|
fac5204ad2 | ||
|
|
1a298143b7 | ||
|
|
00d3f9ced3 | ||
|
|
d810c64120 | ||
|
|
47d89415b4 | ||
|
|
96296028c1 | ||
|
|
6644ec18de | ||
|
|
2b7fed251c | ||
|
|
9cffd3a133 | ||
|
|
7581d58aa5 | ||
|
|
24b8b2f9b8 | ||
|
|
f3bb15670b | ||
|
|
5dbe523f59 | ||
|
|
319f1218de | ||
|
|
ee9d145e6b | ||
|
|
0a70e069e0 | ||
|
|
8fdd8e91a6 | ||
|
|
533bf45f35 | ||
|
|
6227f84931 | ||
|
|
e6579e4355 | ||
|
|
321e02c0ff | ||
|
|
406a5f1fd1 | ||
|
|
40822dff89 | ||
|
|
f72345aaa2 | ||
|
|
32cdb45e9f | ||
|
|
72cabc51d8 | ||
|
|
e62f850a3a | ||
|
|
8b62c6c4d2 | ||
|
|
f7534cf7ec | ||
|
|
8797a7ed78 |
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
@@ -24,7 +24,7 @@ jobs:
|
||||
submodules: recursive
|
||||
|
||||
- name: Setup .NET Core
|
||||
uses: actions/setup-dotnet@v3.0.1
|
||||
uses: actions/setup-dotnet@v3.0.2
|
||||
with:
|
||||
dotnet-version: ${{ env.DOTNET_SDK_VERSION }}
|
||||
|
||||
@@ -39,7 +39,7 @@ jobs:
|
||||
|
||||
- name: Upload latest strings for translation on Crowdin
|
||||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && matrix.configuration == 'Release' && startsWith(matrix.os, 'ubuntu-') }}
|
||||
uses: crowdin/github-action@1.4.14
|
||||
uses: crowdin/github-action@1.4.16
|
||||
with:
|
||||
crowdin_branch_name: main
|
||||
config: '.github/crowdin.yml'
|
||||
|
||||
4
.github/workflows/docker-ci.yml
vendored
4
.github/workflows/docker-ci.yml
vendored
@@ -22,10 +22,10 @@ jobs:
|
||||
submodules: recursive
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2.0.0
|
||||
uses: docker/setup-buildx-action@v2.2.1
|
||||
|
||||
- name: Build ${{ matrix.configuration }} Docker image from ${{ matrix.file }}
|
||||
uses: docker/build-push-action@v3.1.1
|
||||
uses: docker/build-push-action@v3.2.0
|
||||
with:
|
||||
context: .
|
||||
file: ${{ matrix.file }}
|
||||
|
||||
8
.github/workflows/docker-publish-latest.yml
vendored
8
.github/workflows/docker-publish-latest.yml
vendored
@@ -20,17 +20,17 @@ jobs:
|
||||
submodules: recursive
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2.0.0
|
||||
uses: docker/setup-buildx-action@v2.2.1
|
||||
|
||||
- name: Login to ghcr.io
|
||||
uses: docker/login-action@v2.0.0
|
||||
uses: docker/login-action@v2.1.0
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v2.0.0
|
||||
uses: docker/login-action@v2.1.0
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
@@ -55,7 +55,7 @@ jobs:
|
||||
echo "DH_REPOSITORY=$(echo ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }} | tr '[:upper:]' '[:lower:]')" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Build and publish Docker image from Dockerfile.Service
|
||||
uses: docker/build-push-action@v3.1.1
|
||||
uses: docker/build-push-action@v3.2.0
|
||||
with:
|
||||
context: .
|
||||
file: Dockerfile.Service
|
||||
|
||||
10
.github/workflows/docker-publish-main.yml
vendored
10
.github/workflows/docker-publish-main.yml
vendored
@@ -21,17 +21,17 @@ jobs:
|
||||
submodules: recursive
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2.0.0
|
||||
uses: docker/setup-buildx-action@v2.2.1
|
||||
|
||||
- name: Login to ghcr.io
|
||||
uses: docker/login-action@v2.0.0
|
||||
uses: docker/login-action@v2.1.0
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v2.0.0
|
||||
uses: docker/login-action@v2.1.0
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
@@ -55,7 +55,7 @@ jobs:
|
||||
echo "DH_REPOSITORY=$(echo ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }} | tr '[:upper:]' '[:lower:]')" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Build and publish Docker image from Dockerfile
|
||||
uses: docker/build-push-action@v3.1.1
|
||||
uses: docker/build-push-action@v3.2.0
|
||||
with:
|
||||
context: .
|
||||
platforms: ${{ env.PLATFORMS }}
|
||||
@@ -70,7 +70,7 @@ jobs:
|
||||
push: true
|
||||
|
||||
- name: Update DockerHub repository description
|
||||
uses: peter-evans/dockerhub-description@v3.1.0
|
||||
uses: peter-evans/dockerhub-description@v3.1.1
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
||||
|
||||
@@ -21,17 +21,17 @@ jobs:
|
||||
submodules: recursive
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2.0.0
|
||||
uses: docker/setup-buildx-action@v2.2.1
|
||||
|
||||
- name: Login to ghcr.io
|
||||
uses: docker/login-action@v2.0.0
|
||||
uses: docker/login-action@v2.1.0
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v2.0.0
|
||||
uses: docker/login-action@v2.1.0
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
@@ -56,7 +56,7 @@ jobs:
|
||||
echo "DH_REPOSITORY=$(echo ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }} | tr '[:upper:]' '[:lower:]')" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Build and publish Docker image from Dockerfile
|
||||
uses: docker/build-push-action@v3.1.1
|
||||
uses: docker/build-push-action@v3.2.0
|
||||
with:
|
||||
context: .
|
||||
platforms: ${{ env.PLATFORMS }}
|
||||
|
||||
42
.github/workflows/publish.yml
vendored
42
.github/workflows/publish.yml
vendored
@@ -30,7 +30,7 @@ jobs:
|
||||
submodules: recursive
|
||||
|
||||
- name: Setup .NET Core
|
||||
uses: actions/setup-dotnet@v3.0.1
|
||||
uses: actions/setup-dotnet@v3.0.2
|
||||
with:
|
||||
dotnet-version: ${{ env.DOTNET_SDK_VERSION }}
|
||||
|
||||
@@ -38,7 +38,7 @@ jobs:
|
||||
run: dotnet --info
|
||||
|
||||
- name: Setup Node.js with npm
|
||||
uses: actions/setup-node@v3.5.0
|
||||
uses: actions/setup-node@v3.5.1
|
||||
with:
|
||||
check-latest: true
|
||||
node-version: ${{ env.NODE_JS_VERSION }}
|
||||
@@ -317,50 +317,50 @@ jobs:
|
||||
Get-Job | Receive-Job -Wait
|
||||
|
||||
- name: Upload ASF-generic
|
||||
uses: actions/upload-artifact@v3.1.0
|
||||
uses: actions/upload-artifact@v3.1.1
|
||||
with:
|
||||
name: ${{ matrix.os }}_ASF-generic
|
||||
path: out/ASF-generic.zip
|
||||
|
||||
- name: Upload ASF-generic-netf
|
||||
if: startsWith(matrix.os, 'windows-')
|
||||
uses: actions/upload-artifact@v3.1.0
|
||||
uses: actions/upload-artifact@v3.1.1
|
||||
with:
|
||||
name: ${{ matrix.os }}_ASF-generic-netf
|
||||
path: out/ASF-generic-netf.zip
|
||||
|
||||
- name: Upload ASF-linux-arm
|
||||
uses: actions/upload-artifact@v3.1.0
|
||||
uses: actions/upload-artifact@v3.1.1
|
||||
with:
|
||||
name: ${{ matrix.os }}_ASF-linux-arm
|
||||
path: out/ASF-linux-arm.zip
|
||||
|
||||
- name: Upload ASF-linux-arm64
|
||||
uses: actions/upload-artifact@v3.1.0
|
||||
uses: actions/upload-artifact@v3.1.1
|
||||
with:
|
||||
name: ${{ matrix.os }}_ASF-linux-arm64
|
||||
path: out/ASF-linux-arm64.zip
|
||||
|
||||
- name: Upload ASF-linux-x64
|
||||
uses: actions/upload-artifact@v3.1.0
|
||||
uses: actions/upload-artifact@v3.1.1
|
||||
with:
|
||||
name: ${{ matrix.os }}_ASF-linux-x64
|
||||
path: out/ASF-linux-x64.zip
|
||||
|
||||
- name: Upload ASF-osx-arm64
|
||||
uses: actions/upload-artifact@v3.1.0
|
||||
uses: actions/upload-artifact@v3.1.1
|
||||
with:
|
||||
name: ${{ matrix.os }}_ASF-osx-arm64
|
||||
path: out/ASF-osx-arm64.zip
|
||||
|
||||
- name: Upload ASF-osx-x64
|
||||
uses: actions/upload-artifact@v3.1.0
|
||||
uses: actions/upload-artifact@v3.1.1
|
||||
with:
|
||||
name: ${{ matrix.os }}_ASF-osx-x64
|
||||
path: out/ASF-osx-x64.zip
|
||||
|
||||
- name: Upload ASF-win-x64
|
||||
uses: actions/upload-artifact@v3.1.0
|
||||
uses: actions/upload-artifact@v3.1.1
|
||||
with:
|
||||
name: ${{ matrix.os }}_ASF-win-x64
|
||||
path: out/ASF-win-x64.zip
|
||||
@@ -378,55 +378,55 @@ jobs:
|
||||
# However, that is currently impossible due to https://github.com/dotnet/msbuild/issues/3897
|
||||
# Therefore, we'll (sadly) pull artifacts from Windows machine only for now
|
||||
- name: Download ASF-generic artifact from windows-latest
|
||||
uses: actions/download-artifact@v3.0.0
|
||||
uses: actions/download-artifact@v3.0.1
|
||||
with:
|
||||
name: windows-latest_ASF-generic
|
||||
path: out
|
||||
|
||||
- name: Download ASF-generic-netf artifact from windows-latest
|
||||
uses: actions/download-artifact@v3.0.0
|
||||
uses: actions/download-artifact@v3.0.1
|
||||
with:
|
||||
name: windows-latest_ASF-generic-netf
|
||||
path: out
|
||||
|
||||
- name: Download ASF-linux-arm artifact from windows-latest
|
||||
uses: actions/download-artifact@v3.0.0
|
||||
uses: actions/download-artifact@v3.0.1
|
||||
with:
|
||||
name: windows-latest_ASF-linux-arm
|
||||
path: out
|
||||
|
||||
- name: Download ASF-linux-arm64 artifact from windows-latest
|
||||
uses: actions/download-artifact@v3.0.0
|
||||
uses: actions/download-artifact@v3.0.1
|
||||
with:
|
||||
name: windows-latest_ASF-linux-arm64
|
||||
path: out
|
||||
|
||||
- name: Download ASF-linux-x64 artifact from windows-latest
|
||||
uses: actions/download-artifact@v3.0.0
|
||||
uses: actions/download-artifact@v3.0.1
|
||||
with:
|
||||
name: windows-latest_ASF-linux-x64
|
||||
path: out
|
||||
|
||||
- name: Download ASF-osx-arm64 artifact from windows-latest
|
||||
uses: actions/download-artifact@v3.0.0
|
||||
uses: actions/download-artifact@v3.0.1
|
||||
with:
|
||||
name: windows-latest_ASF-osx-arm64
|
||||
path: out
|
||||
|
||||
- name: Download ASF-osx-x64 artifact from windows-latest
|
||||
uses: actions/download-artifact@v3.0.0
|
||||
uses: actions/download-artifact@v3.0.1
|
||||
with:
|
||||
name: windows-latest_ASF-osx-x64
|
||||
path: out
|
||||
|
||||
- name: Download ASF-win-x64 artifact from windows-latest
|
||||
uses: actions/download-artifact@v3.0.0
|
||||
uses: actions/download-artifact@v3.0.1
|
||||
with:
|
||||
name: windows-latest_ASF-win-x64
|
||||
path: out
|
||||
|
||||
- name: Import GPG key for signing
|
||||
uses: crazy-max/ghaction-import-gpg@v5.1.0
|
||||
uses: crazy-max/ghaction-import-gpg@v5.2.0
|
||||
with:
|
||||
gpg_private_key: ${{ secrets.ARCHIBOT_GPG_PRIVATE_KEY }}
|
||||
|
||||
@@ -443,13 +443,13 @@ jobs:
|
||||
)
|
||||
|
||||
- name: Upload SHA512SUMS
|
||||
uses: actions/upload-artifact@v3.1.0
|
||||
uses: actions/upload-artifact@v3.1.1
|
||||
with:
|
||||
name: SHA512SUMS
|
||||
path: out/SHA512SUMS
|
||||
|
||||
- name: Upload SHA512SUMS.sign
|
||||
uses: actions/upload-artifact@v3.1.0
|
||||
uses: actions/upload-artifact@v3.1.1
|
||||
with:
|
||||
name: SHA512SUMS.sign
|
||||
path: out/SHA512SUMS.sign
|
||||
|
||||
4
.github/workflows/translations.yml
vendored
4
.github/workflows/translations.yml
vendored
@@ -26,7 +26,7 @@ jobs:
|
||||
git reset --hard origin/master
|
||||
|
||||
- name: Download latest translations from Crowdin
|
||||
uses: crowdin/github-action@1.4.14
|
||||
uses: crowdin/github-action@1.4.16
|
||||
with:
|
||||
upload_sources: false
|
||||
download_translations: true
|
||||
@@ -38,7 +38,7 @@ jobs:
|
||||
token: ${{ secrets.ASF_CROWDIN_API_TOKEN }}
|
||||
|
||||
- name: Import GPG key for signing
|
||||
uses: crazy-max/ghaction-import-gpg@v5.1.0
|
||||
uses: crazy-max/ghaction-import-gpg@v5.2.0
|
||||
with:
|
||||
gpg_private_key: ${{ secrets.ARCHIBOT_GPG_PRIVATE_KEY }}
|
||||
git_config_global: true
|
||||
|
||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -7,6 +7,9 @@
|
||||
# Ignore all files in custom in-tree config directory (if exists)
|
||||
ArchiSteamFarm/config
|
||||
|
||||
# Ignore all files in custom in-tree www directory (if exists)
|
||||
ArchiSteamFarm/www
|
||||
|
||||
# Ignore private SNK key (if exists)
|
||||
resources/ArchiSteamFarm.snk
|
||||
|
||||
|
||||
2
ASF-ui
2
ASF-ui
Submodule ASF-ui updated: e895aaef3a...3fd92393cb
@@ -170,8 +170,19 @@ internal sealed class GlobalCache : SerializableFile {
|
||||
}
|
||||
|
||||
LastChangeNumber = currentChangeNumber;
|
||||
|
||||
Reset();
|
||||
}
|
||||
|
||||
internal void Reset(bool clear = false) {
|
||||
AppChangeNumbers.Clear();
|
||||
|
||||
if (clear) {
|
||||
AppTokens.Clear();
|
||||
DepotKeys.Clear();
|
||||
PackageTokens.Clear();
|
||||
}
|
||||
|
||||
Utilities.InBackground(Save);
|
||||
}
|
||||
|
||||
|
||||
@@ -544,21 +544,40 @@ internal sealed class SteamTokenDumperPlugin : OfficialPlugin, IASF, IBot, IBotC
|
||||
if (response.StatusCode.IsClientErrorCode()) {
|
||||
ASF.ArchiLogger.LogGenericWarning(string.Format(CultureInfo.CurrentCulture, ArchiSteamFarm.Localization.Strings.WarningFailedWithError, response.StatusCode));
|
||||
|
||||
switch (response.StatusCode) {
|
||||
// SteamDB told us to stop submitting data for now
|
||||
case HttpStatusCode.Forbidden:
|
||||
// ReSharper disable once SuspiciousLockOverSynchronizationPrimitive - this is not a mistake, we need extra synchronization, and we can re-use the semaphore object for that
|
||||
lock (SubmissionSemaphore) {
|
||||
SubmissionTimer.Change(Timeout.InfiniteTimeSpan, Timeout.InfiniteTimeSpan);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
// SteamDB told us to reset our cache
|
||||
case HttpStatusCode.Conflict:
|
||||
GlobalCache.Reset(true);
|
||||
|
||||
break;
|
||||
|
||||
// SteamDB told us to try again later
|
||||
#if NETFRAMEWORK
|
||||
if (response.StatusCode == (HttpStatusCode) 429) {
|
||||
case (HttpStatusCode) 429:
|
||||
#else
|
||||
if (response.StatusCode == HttpStatusCode.TooManyRequests) {
|
||||
case HttpStatusCode.TooManyRequests:
|
||||
#endif
|
||||
#pragma warning disable CA5394 // This call isn't used in a security-sensitive manner
|
||||
TimeSpan startIn = TimeSpan.FromMinutes(Random.Shared.Next(SharedInfo.MinimumMinutesBeforeFirstUpload, SharedInfo.MaximumMinutesBeforeFirstUpload));
|
||||
TimeSpan startIn = TimeSpan.FromMinutes(Random.Shared.Next(SharedInfo.MinimumMinutesBeforeFirstUpload, SharedInfo.MaximumMinutesBeforeFirstUpload));
|
||||
#pragma warning restore CA5394 // This call isn't used in a security-sensitive manner
|
||||
|
||||
// ReSharper disable once SuspiciousLockOverSynchronizationPrimitive - this is not a mistake, we need extra synchronization, and we can re-use the semaphore object for that
|
||||
lock (SubmissionSemaphore) {
|
||||
SubmissionTimer.Change(startIn, TimeSpan.FromHours(SharedInfo.HoursBetweenUploads));
|
||||
}
|
||||
// ReSharper disable once SuspiciousLockOverSynchronizationPrimitive - this is not a mistake, we need extra synchronization, and we can re-use the semaphore object for that
|
||||
lock (SubmissionSemaphore) {
|
||||
SubmissionTimer.Change(startIn, TimeSpan.FromHours(SharedInfo.HoursBetweenUploads));
|
||||
}
|
||||
|
||||
ASF.ArchiLogger.LogGenericInfo(string.Format(CultureInfo.CurrentCulture, Strings.SubmissionFailedTooManyRequests, startIn.ToHumanReadable()));
|
||||
ASF.ArchiLogger.LogGenericInfo(string.Format(CultureInfo.CurrentCulture, Strings.SubmissionFailedTooManyRequests, startIn.ToHumanReadable()));
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
@@ -39,8 +39,8 @@
|
||||
<PackageReference Include="Microsoft.AspNetCore.WebSockets" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Json" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Configuration" />
|
||||
<Reference Include="System.Net.Http" HintPath="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\System.Net.Http.dll" />
|
||||
<Reference Include="System.Security" HintPath="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\System.Security.dll" />
|
||||
<Reference Include="System.Net.Http" HintPath="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8.1\System.Net.Http.dll" />
|
||||
<Reference Include="System.Security" HintPath="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8.1\System.Security.dll" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -407,6 +407,7 @@ internal sealed class RemoteCommunication : IAsyncDisposable, IDisposable {
|
||||
|
||||
byte maxTradeHoldDuration = ASF.GlobalConfig?.MaxTradeHoldDuration ?? GlobalConfig.DefaultMaxTradeHoldDuration;
|
||||
byte totalMatches = 0;
|
||||
bool rateLimited = false;
|
||||
|
||||
HashSet<(uint RealAppID, Asset.EType Type, Asset.ERarity Rarity)> skippedSetsThisRound = new();
|
||||
|
||||
@@ -443,6 +444,16 @@ internal sealed class RemoteCommunication : IAsyncDisposable, IDisposable {
|
||||
} catch (HttpRequestException e) {
|
||||
Bot.ArchiLogger.LogGenericWarningException(e);
|
||||
|
||||
#if NETFRAMEWORK
|
||||
if (e.StatusCode == (HttpStatusCode) 429) {
|
||||
#else
|
||||
if (e.StatusCode == HttpStatusCode.TooManyRequests) {
|
||||
#endif
|
||||
rateLimited = true;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
continue;
|
||||
} catch (Exception e) {
|
||||
Bot.ArchiLogger.LogGenericException(e);
|
||||
@@ -702,6 +713,6 @@ internal sealed class RemoteCommunication : IAsyncDisposable, IDisposable {
|
||||
Bot.ArchiLogger.LogGenericInfo(string.Format(CultureInfo.CurrentCulture, Strings.ActivelyMatchingItemsRound, skippedSetsThisRound.Count));
|
||||
|
||||
// Keep matching when we either traded something this round (so it makes sense for a refresh) or if we didn't try all available bots yet (so it makes sense to keep going)
|
||||
return ((totalMatches > 0) && ((skippedSetsThisRound.Count > 0) || triedSteamIDs.Values.All(static data => data.Tries < 2)), skippedSetsThisRound.Count > 0);
|
||||
return (!rateLimited && (totalMatches > 0) && ((skippedSetsThisRound.Count > 0) || triedSteamIDs.Values.All(static data => data.Tries < 2)), skippedSetsThisRound.Count > 0);
|
||||
}
|
||||
}
|
||||
|
||||
77
ArchiSteamFarm/IPC/Controllers/Api/IPCController.cs
Normal file
77
ArchiSteamFarm/IPC/Controllers/Api/IPCController.cs
Normal file
@@ -0,0 +1,77 @@
|
||||
// _ _ _ ____ _ _____
|
||||
// / \ _ __ ___ | |__ (_)/ ___| | |_ ___ __ _ _ __ ___ | ___|__ _ _ __ _ __ ___
|
||||
// / _ \ | '__|/ __|| '_ \ | |\___ \ | __|/ _ \ / _` || '_ ` _ \ | |_ / _` || '__|| '_ ` _ \
|
||||
// / ___ \ | | | (__ | | | || | ___) || |_| __/| (_| || | | | | || _|| (_| || | | | | | | |
|
||||
// /_/ \_\|_| \___||_| |_||_||____/ \__|\___| \__,_||_| |_| |_||_| \__,_||_| |_| |_| |_|
|
||||
// |
|
||||
// Copyright 2015-2022 Łukasz "JustArchi" Domeradzki
|
||||
// Contact: JustArchi@JustArchi.net
|
||||
// |
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
// |
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
// |
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using ArchiSteamFarm.IPC.Integration;
|
||||
using ArchiSteamFarm.IPC.Responses;
|
||||
using ArchiSteamFarm.Localization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace ArchiSteamFarm.IPC.Controllers.Api;
|
||||
|
||||
[Route("Api/IPC")]
|
||||
public sealed class IPCController : ArchiController {
|
||||
/// <summary>
|
||||
/// Clears the list of all IP addresses currently blocked by ASFs IPC module
|
||||
/// </summary>
|
||||
[HttpDelete("Bans")]
|
||||
[ProducesResponseType(typeof(GenericResponse), (int) HttpStatusCode.OK)]
|
||||
public ActionResult<GenericResponse> BansDelete() {
|
||||
ApiAuthenticationMiddleware.ClearFailedAuthorizations();
|
||||
|
||||
return Ok(new GenericResponse(true));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Removes an IP address from the list of addresses currently blocked by ASFs IPC module
|
||||
/// </summary>
|
||||
[HttpDelete("Bans/{ipAddress:required}")]
|
||||
[ProducesResponseType(typeof(GenericResponse), (int) HttpStatusCode.OK)]
|
||||
[ProducesResponseType(typeof(GenericResponse), (int) HttpStatusCode.BadRequest)]
|
||||
public ActionResult<GenericResponse> BansDeleteSpecific(string ipAddress) {
|
||||
if (string.IsNullOrEmpty(ipAddress)) {
|
||||
throw new ArgumentNullException(nameof(ipAddress));
|
||||
}
|
||||
|
||||
if (!IPAddress.TryParse(ipAddress, out IPAddress? remoteAddress)) {
|
||||
return BadRequest(new GenericResponse(false, string.Format(CultureInfo.CurrentCulture, Strings.ErrorIsInvalid, nameof(ipAddress))));
|
||||
}
|
||||
|
||||
bool result = ApiAuthenticationMiddleware.UnbanIP(remoteAddress);
|
||||
|
||||
if (!result) {
|
||||
return BadRequest(new GenericResponse(false, string.Format(CultureInfo.CurrentCulture, Strings.ErrorIPNotBanned, ipAddress)));
|
||||
}
|
||||
|
||||
return Ok(new GenericResponse(true));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets all IP addresses currently blocked by ASFs IPC module
|
||||
/// </summary>
|
||||
[HttpGet("Bans")]
|
||||
[ProducesResponseType(typeof(GenericResponse<ISet<string>>), (int) HttpStatusCode.OK)]
|
||||
public ActionResult<GenericResponse<ISet<string>>> BansGet() => Ok(new GenericResponse<ISet<string>>(ApiAuthenticationMiddleware.GetCurrentlyBannedIPs().Select(static ip => ip.ToString()).ToHashSet()));
|
||||
}
|
||||
@@ -24,6 +24,7 @@ using MvcNewtonsoftJsonOptions = Microsoft.AspNetCore.Mvc.MvcJsonOptions;
|
||||
#endif
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
@@ -88,7 +89,19 @@ internal sealed class ApiAuthenticationMiddleware {
|
||||
await context.Response.WriteJsonAsync(new GenericResponse<StatusCodeResponse>(false, statusCodeResponse), jsonOptions.Value.SerializerSettings).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
private static void ClearFailedAuthorizations(object? state = null) => FailedAuthorizations.Clear();
|
||||
internal static void ClearFailedAuthorizations(object? state = null) => FailedAuthorizations.Clear();
|
||||
|
||||
internal static IEnumerable<IPAddress> GetCurrentlyBannedIPs() => FailedAuthorizations.Where(static kv => kv.Value >= MaxFailedAuthorizationAttempts).Select(static kv => kv.Key);
|
||||
|
||||
internal static bool UnbanIP(IPAddress ipAddress) {
|
||||
ArgumentNullException.ThrowIfNull(ipAddress);
|
||||
|
||||
if (!FailedAuthorizations.TryGetValue(ipAddress, out byte attempts) || (attempts < MaxFailedAuthorizationAttempts)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return FailedAuthorizations.TryRemove(ipAddress, out _);
|
||||
}
|
||||
|
||||
private async Task<(HttpStatusCode StatusCode, bool Permanent)> GetAuthenticationStatus(HttpContext context) {
|
||||
ArgumentNullException.ThrowIfNull(context);
|
||||
|
||||
9
ArchiSteamFarm/Localization/Strings.Designer.cs
generated
9
ArchiSteamFarm/Localization/Strings.Designer.cs
generated
@@ -981,6 +981,15 @@ namespace ArchiSteamFarm.Localization {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to The IP address {0} is not banned!.
|
||||
/// </summary>
|
||||
public static string ErrorIPNotBanned {
|
||||
get {
|
||||
return ResourceManager.GetString("ErrorIPNotBanned", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to {0} is empty!.
|
||||
/// </summary>
|
||||
|
||||
@@ -479,4 +479,6 @@
|
||||
<data name="PatchingFiles" xml:space="preserve">
|
||||
<value>Выпраўленне файлаў ASF...</value>
|
||||
</data>
|
||||
|
||||
|
||||
</root>
|
||||
|
||||
@@ -733,4 +733,6 @@
|
||||
<data name="PatchingFiles" xml:space="preserve">
|
||||
<value>Пачват се ASF файлове...</value>
|
||||
</data>
|
||||
|
||||
|
||||
</root>
|
||||
|
||||
@@ -736,4 +736,6 @@ StackTrace:
|
||||
<data name="PatchingFiles" xml:space="preserve">
|
||||
<value>Aktualizace ASF souborů...</value>
|
||||
</data>
|
||||
|
||||
|
||||
</root>
|
||||
|
||||
@@ -670,4 +670,6 @@ Processens oppetid: {1}</value>
|
||||
<data name="PatchingFiles" xml:space="preserve">
|
||||
<value>Retter ASF-filer...</value>
|
||||
</data>
|
||||
|
||||
|
||||
</root>
|
||||
|
||||
@@ -722,7 +722,7 @@ Prozesslaufzeit: {1}</value>
|
||||
<value>Sie nutzen ASF in einer nicht unterstützten Umgebung und verwenden das Argument --ignore-unsupported-environment. Bitte beachten Sie, dass wir für dieses Szenario keinerlei Unterstützung anbieten und Sie das Risiko vollständig bei Ihnen liegt. Sie wurden gewarnt.</value>
|
||||
</data>
|
||||
<data name="FetchingChecksumFromRemoteServer" xml:space="preserve">
|
||||
<value>Rufe Prüfsumme vom ASF-Server ab...</value>
|
||||
<value>Rufe Prüfsumme vom Server ab...</value>
|
||||
</data>
|
||||
<data name="VerifyingChecksumWithRemoteServer" xml:space="preserve">
|
||||
<value>Verifiziere Prüfsumme der heruntergeladenen Datei mit der des ASF Servers...</value>
|
||||
@@ -736,4 +736,12 @@ Prozesslaufzeit: {1}</value>
|
||||
<data name="PatchingFiles" xml:space="preserve">
|
||||
<value>Aktualisiere ASF-Dateien...</value>
|
||||
</data>
|
||||
<data name="UserInputCryptkey" xml:space="preserve">
|
||||
<value>Bitte gib deinen kryptographischen Schlüssel ein: </value>
|
||||
<comment>Please note that this translation should end with space</comment>
|
||||
</data>
|
||||
<data name="ErrorIPNotBanned" xml:space="preserve">
|
||||
<value>Die IP-Adresse {0} ist nicht gesperrt!</value>
|
||||
<comment>{0} will be replaced by an IP address which was requested to be unbanned from using IPC</comment>
|
||||
</data>
|
||||
</root>
|
||||
|
||||
@@ -736,4 +736,6 @@ StackTrace:
|
||||
<data name="PatchingFiles" xml:space="preserve">
|
||||
<value>Διόρθωση αρχείων ASF...</value>
|
||||
</data>
|
||||
|
||||
|
||||
</root>
|
||||
|
||||
@@ -735,4 +735,12 @@ Tiempo de actividad del proceso: {1}</value>
|
||||
<data name="PatchingFiles" xml:space="preserve">
|
||||
<value>Parchando archivos de ASF...</value>
|
||||
</data>
|
||||
<data name="UserInputCryptkey" xml:space="preserve">
|
||||
<value>Por favor, introduce tu clave de cifrado: </value>
|
||||
<comment>Please note that this translation should end with space</comment>
|
||||
</data>
|
||||
<data name="ErrorIPNotBanned" xml:space="preserve">
|
||||
<value>¡La dirección IP {0} no está bloqueada!</value>
|
||||
<comment>{0} will be replaced by an IP address which was requested to be unbanned from using IPC</comment>
|
||||
</data>
|
||||
</root>
|
||||
|
||||
@@ -251,6 +251,8 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -736,4 +736,12 @@ Prosessin käyttöaika: {1}</value>
|
||||
<data name="PatchingFiles" xml:space="preserve">
|
||||
<value>Paikataan ASF-tiedostoja...</value>
|
||||
</data>
|
||||
<data name="UserInputCryptkey" xml:space="preserve">
|
||||
<value>Ole hyvä ja syötä cryptkey-avaimesi: </value>
|
||||
<comment>Please note that this translation should end with space</comment>
|
||||
</data>
|
||||
<data name="ErrorIPNotBanned" xml:space="preserve">
|
||||
<value>IP-osoitetta {0} ei ole estetty!</value>
|
||||
<comment>{0} will be replaced by an IP address which was requested to be unbanned from using IPC</comment>
|
||||
</data>
|
||||
</root>
|
||||
|
||||
@@ -736,4 +736,6 @@ Durée de fonctionnement : {1}</value>
|
||||
<data name="PatchingFiles" xml:space="preserve">
|
||||
<value>Patch des fichiers ASF...</value>
|
||||
</data>
|
||||
|
||||
|
||||
</root>
|
||||
|
||||
@@ -528,6 +528,8 @@ StackTrace:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -734,4 +734,6 @@ Ennyi ideje fut: {1}</value>
|
||||
<data name="PatchingFiles" xml:space="preserve">
|
||||
<value>ASF-fájlok patchelése...</value>
|
||||
</data>
|
||||
|
||||
|
||||
</root>
|
||||
|
||||
@@ -540,6 +540,8 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -734,4 +734,6 @@ Tempo di attività: {1}</value>
|
||||
<data name="PatchingFiles" xml:space="preserve">
|
||||
<value>Patching dei file ASF...</value>
|
||||
</data>
|
||||
|
||||
|
||||
</root>
|
||||
|
||||
@@ -648,4 +648,6 @@ Process uptime: {1}</value>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</root>
|
||||
|
||||
@@ -255,6 +255,8 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -696,4 +696,6 @@ StackTrace:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</root>
|
||||
|
||||
@@ -608,4 +608,6 @@ Proceso veikimo laikas: {1}</value>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</root>
|
||||
|
||||
@@ -736,4 +736,6 @@ Darbspējas laiks: {1}</value>
|
||||
<data name="PatchingFiles" xml:space="preserve">
|
||||
<value>Atjauno ASF failus...</value>
|
||||
</data>
|
||||
|
||||
|
||||
</root>
|
||||
|
||||
@@ -193,7 +193,10 @@ StackTrace:
|
||||
<value>Voer de 2FA code in van je Steam authenticator app: </value>
|
||||
<comment>Please note that this translation should end with space</comment>
|
||||
</data>
|
||||
|
||||
<data name="UserInputSteamGuard" xml:space="preserve">
|
||||
<value>Voer de SteamGuard authenticator-code in die naar je e-mail is verzonden: </value>
|
||||
<comment>Please note that this translation should end with space</comment>
|
||||
</data>
|
||||
<data name="UserInputSteamLogin" xml:space="preserve">
|
||||
<value>Voer je Steam gebruikersnaam in: </value>
|
||||
<comment>Please note that this translation should end with space</comment>
|
||||
@@ -263,21 +266,46 @@ StackTrace:
|
||||
<value>Farmen is gereed voor de spellen: {0}</value>
|
||||
<comment>{0} will be replaced by list of the games (IDs, numbers), separated by a comma</comment>
|
||||
</data>
|
||||
|
||||
|
||||
<data name="IdlingStatusForGame" xml:space="preserve">
|
||||
<value>Farming status voor {0} ({1}): {2} kaart(en) resterend</value>
|
||||
<comment>{0} will be replaced by game's ID (number), {1} will be replaced by game's name, {2} will be replaced by number of cards left to farm</comment>
|
||||
</data>
|
||||
<data name="IdlingStopped" xml:space="preserve">
|
||||
<value>Farming gestopt!</value>
|
||||
</data>
|
||||
<data name="IgnoredPermanentPauseEnabled" xml:space="preserve">
|
||||
<value>Dit verzoek wordt genegeerd aangezien permanente pauze is ingeschakeld!</value>
|
||||
</data>
|
||||
|
||||
|
||||
|
||||
<data name="NothingToIdle" xml:space="preserve">
|
||||
<value>Er is niets om te farmen op dit account!</value>
|
||||
</data>
|
||||
<data name="NowIdling" xml:space="preserve">
|
||||
<value>Nu aan het farmen: {0} ({1})</value>
|
||||
<comment>{0} will be replaced by game's ID (number), {1} will be replaced by game's name</comment>
|
||||
</data>
|
||||
<data name="NowIdlingList" xml:space="preserve">
|
||||
<value>Nu aan het farmen: {0}</value>
|
||||
<comment>{0} will be replaced by list of the games (IDs, numbers), separated by a comma</comment>
|
||||
</data>
|
||||
<data name="PlayingNotAvailable" xml:space="preserve">
|
||||
<value>Spelen is op dit moment niet mogelijk, we proberen het later nog een keer!</value>
|
||||
</data>
|
||||
|
||||
|
||||
|
||||
|
||||
<data name="StillIdling" xml:space="preserve">
|
||||
<value>Nog steeds aan het farmen: {0} ({1})</value>
|
||||
<comment>{0} will be replaced by game's ID (number), {1} will be replaced by game's name</comment>
|
||||
</data>
|
||||
<data name="StillIdlingList" xml:space="preserve">
|
||||
<value>Nog steeds aan het farmen: {0}</value>
|
||||
<comment>{0} will be replaced by list of the games (IDs, numbers), separated by a comma</comment>
|
||||
</data>
|
||||
<data name="StoppedIdling" xml:space="preserve">
|
||||
<value>Gestopt met farmen: {0} ({1})</value>
|
||||
<comment>{0} will be replaced by game's ID (number), {1} will be replaced by game's name</comment>
|
||||
</data>
|
||||
<data name="StoppedIdlingList" xml:space="preserve">
|
||||
<value>Gestopt met farmen: {0}</value>
|
||||
<comment>{0} will be replaced by list of the games (IDs, numbers), separated by a comma</comment>
|
||||
</data>
|
||||
<data name="UnknownCommand" xml:space="preserve">
|
||||
<value>Onbekende opdracht!</value>
|
||||
</data>
|
||||
@@ -292,7 +320,9 @@ StackTrace:
|
||||
<value>Gift accepteren: {0}...</value>
|
||||
<comment>{0} will be replaced by giftID (number)</comment>
|
||||
</data>
|
||||
|
||||
<data name="BotAccountLimited" xml:space="preserve">
|
||||
<value>Dit account is gelimiteerd, farming proces is niet beschikbaar totdat de beperking is opgeheven!</value>
|
||||
</data>
|
||||
<data name="BotAddLicense" xml:space="preserve">
|
||||
<value>ID: {0} | Status: {1}</value>
|
||||
<comment>{0} will be replaced by game's ID (number), {1} will be replaced by status string</comment>
|
||||
@@ -314,10 +344,18 @@ StackTrace:
|
||||
<value>2FA Code: {0}</value>
|
||||
<comment>{0} will be replaced by generated 2FA token (string)</comment>
|
||||
</data>
|
||||
|
||||
|
||||
|
||||
|
||||
<data name="BotAutomaticIdlingNowPaused" xml:space="preserve">
|
||||
<value>Automatisch farmen is gepauzeerd!</value>
|
||||
</data>
|
||||
<data name="BotAutomaticIdlingNowResumed" xml:space="preserve">
|
||||
<value>Automatisch farmen is hervat!</value>
|
||||
</data>
|
||||
<data name="BotAutomaticIdlingPausedAlready" xml:space="preserve">
|
||||
<value>Automatisch farmen is al gepauzeerd!</value>
|
||||
</data>
|
||||
<data name="BotAutomaticIdlingResumedAlready" xml:space="preserve">
|
||||
<value>Automatisch farmen is al hervat!</value>
|
||||
</data>
|
||||
<data name="BotConnected" xml:space="preserve">
|
||||
<value>Verbonden met Steam!</value>
|
||||
</data>
|
||||
@@ -357,7 +395,9 @@ StackTrace:
|
||||
<data name="BotLootingSuccess" xml:space="preserve">
|
||||
<value>Ruilaanbod succesvol verzonden!</value>
|
||||
</data>
|
||||
|
||||
<data name="BotSendingTradeToYourself" xml:space="preserve">
|
||||
<value>Je kan jezelf geen ruil aanbieden!</value>
|
||||
</data>
|
||||
<data name="BotNoASFAuthenticator" xml:space="preserve">
|
||||
<value>Deze bot heeft ASF 2FA nog niet ingeschakeld! Ben je vergeten om je authenticator als ASF 2FA te importeren?</value>
|
||||
</data>
|
||||
@@ -372,7 +412,10 @@ StackTrace:
|
||||
<value>Al in bezit: {0} | {1}</value>
|
||||
<comment>{0} will be replaced by game's ID (number), {1} will be replaced by game's name</comment>
|
||||
</data>
|
||||
|
||||
<data name="BotPointsBalance" xml:space="preserve">
|
||||
<value>Punten saldo: {0}</value>
|
||||
<comment>{0} will be replaced by the points balance value (integer)</comment>
|
||||
</data>
|
||||
<data name="BotRateLimitExceeded" xml:space="preserve">
|
||||
<value>Aanvraaglimiet overschreden, we zullen het na een cooldown van {0} opnieuw proberen...</value>
|
||||
<comment>{0} will be replaced by translated TimeSpan string (such as "25 minutes")</comment>
|
||||
@@ -391,8 +434,12 @@ StackTrace:
|
||||
<data name="BotRemovedExpiredLoginKey" xml:space="preserve">
|
||||
<value>Verlopen inlogcode verwijderd!</value>
|
||||
</data>
|
||||
|
||||
|
||||
<data name="BotStatusNotIdling" xml:space="preserve">
|
||||
<value>Bot is niet aan het farmen.</value>
|
||||
</data>
|
||||
<data name="BotStatusLimited" xml:space="preserve">
|
||||
<value>Bot is gelimiteerd en kan geen kaarten verzamelen.</value>
|
||||
</data>
|
||||
<data name="BotStatusConnecting" xml:space="preserve">
|
||||
<value>Bot is aan het verbinden met het Steam netwerk.</value>
|
||||
</data>
|
||||
@@ -424,8 +471,12 @@ StackTrace:
|
||||
<data name="BotConnectionLost" xml:space="preserve">
|
||||
<value>Verbinding met Steam netwerk verbroken. Opnieuw verbinden...</value>
|
||||
</data>
|
||||
|
||||
|
||||
<data name="BotAccountFree" xml:space="preserve">
|
||||
<value>Account is niet meer bezet: farming proces hervat!</value>
|
||||
</data>
|
||||
<data name="BotAccountOccupied" xml:space="preserve">
|
||||
<value>Account is momenteel in gebruik: ASF zal het farmen hervatten wanneer het account weer beschikbaar is...</value>
|
||||
</data>
|
||||
<data name="BotConnecting" xml:space="preserve">
|
||||
<value>Verbinden...</value>
|
||||
</data>
|
||||
@@ -459,8 +510,14 @@ StackTrace:
|
||||
<data name="ErrorInvalidCurrentCulture" xml:space="preserve">
|
||||
<value>De door jou ingevoerde CurrentCulture is ongeldig. ASF zal de standaardtaal blijven gebruiken!</value>
|
||||
</data>
|
||||
|
||||
|
||||
<data name="TranslationIncomplete" xml:space="preserve">
|
||||
<value>ASF zal proberen de {0} taalcultuur te gebruiken, maar de vertaling in die taal is slechts {1} compleet. Misschien kun je ons helpen de ASF-vertaling voor jouw taal te verbeteren?</value>
|
||||
<comment>{0} will be replaced by culture code, such as "en-US", {1} will be replaced by completeness percentage, such as "78.5%"</comment>
|
||||
</data>
|
||||
<data name="IdlingGameNotPossible" xml:space="preserve">
|
||||
<value>Farmen {0} ({1}) is tijdelijk uitgeschakeld, omdat ASF momenteel niet in staat is om dit spel te spelen.</value>
|
||||
<comment>{0} will be replaced by game's ID (number), {1} will be replaced by game's name</comment>
|
||||
</data>
|
||||
<data name="WarningIdlingGameMismatch" xml:space="preserve">
|
||||
<value>ASF heeft een foutieve ID gedetecteerd voor {0} ({1}) en zal in plaats daarvan ID {2} gaan gebruiken.</value>
|
||||
<comment>{0} will be replaced by game's ID (number), {1} will be replaced by game's name, {2} will be replaced by game's ID (number)</comment>
|
||||
@@ -469,8 +526,12 @@ StackTrace:
|
||||
<value>{0} V{1}</value>
|
||||
<comment>{0} will be replaced by program's name (e.g. "ASF"), {1} will be replaced by program's version (e.g. "1.0.0.0"). This string typically has nothing to translate and you should leave it as it is, unless you need to change the format, e.g. in RTL languages.</comment>
|
||||
</data>
|
||||
|
||||
|
||||
<data name="BotAccountLocked" xml:space="preserve">
|
||||
<value>Dit account is vergrendeld. Farming is permanent niet beschikbaar!</value>
|
||||
</data>
|
||||
<data name="BotStatusLocked" xml:space="preserve">
|
||||
<value>Bot is gelimiteerd en kan geen kaarten verzamelen.</value>
|
||||
</data>
|
||||
<data name="ErrorFunctionOnlyInHeadlessMode" xml:space="preserve">
|
||||
<value>Deze functie is alleen beschikbaar in de headless mode!</value>
|
||||
</data>
|
||||
@@ -481,7 +542,9 @@ StackTrace:
|
||||
<data name="ErrorAccessDenied" xml:space="preserve">
|
||||
<value>Toegang geweigerd!</value>
|
||||
</data>
|
||||
|
||||
<data name="WarningPreReleaseVersion" xml:space="preserve">
|
||||
<value>Je gebruikt een nieuwere versie dan de laatste versie van je update kanaal. Hou er rekening mee dat pre-release versies alleen geschikt zijn voor gebruikers die weten hoe ze bugs moeten rapporteren, kunnen omgaan met problemen en feedback kunnen geven. Er wordt geen technische ondersteuning geboden.</value>
|
||||
</data>
|
||||
<data name="BotStats" xml:space="preserve">
|
||||
<value>Huidig geheugengebruik: {0} MB.
|
||||
Proces uptime: {1}</value>
|
||||
@@ -558,7 +621,9 @@ Proces uptime: {1}</value>
|
||||
<data name="NothingFound" xml:space="preserve">
|
||||
<value>Niets gevonden!</value>
|
||||
</data>
|
||||
|
||||
<data name="PluginsWarning" xml:space="preserve">
|
||||
<value>Je hebt een of meer aangepaste plugins geladen in ASF. Neem in geval van problemen contact op met de ontwikkelaars van deze plugins, aangezien we geen ondersteuning voor aangepaste instellingen kunnen bieden.</value>
|
||||
</data>
|
||||
<data name="PleaseWait" xml:space="preserve">
|
||||
<value>Een ogenblik geduld...</value>
|
||||
</data>
|
||||
@@ -582,7 +647,10 @@ Proces uptime: {1}</value>
|
||||
<value>{0} bevestiging(en) succesvol uitgevoerd!</value>
|
||||
<comment>{0} will be replaced by number of confirmations</comment>
|
||||
</data>
|
||||
|
||||
<data name="BotExtraIdlingCooldown" xml:space="preserve">
|
||||
<value>{0} wachten ter controle of alles in orde is om het farmen te starten...</value>
|
||||
<comment>{0} will be replaced by translated TimeSpan string (such as "1 minute")</comment>
|
||||
</data>
|
||||
<data name="UpdateCleanup" xml:space="preserve">
|
||||
<value>Oude bestanden verwijderen na de update...</value>
|
||||
</data>
|
||||
@@ -604,11 +672,24 @@ Proces uptime: {1}</value>
|
||||
<value>Resultaat: {0}</value>
|
||||
<comment>{0} will be replaced by generic result of various functions that use this string</comment>
|
||||
</data>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<data name="WarningUnsupportedEnvironment" xml:space="preserve">
|
||||
<value>Je probeert {0} variant van ASF toe te voegen in een niet-ondersteunde omgeving: {1}. Voeg --ignore-unsupported-environment argument als je echt weet wat je aan het doen bent.</value>
|
||||
</data>
|
||||
<data name="WarningUnknownCommandLineArgument" xml:space="preserve">
|
||||
<value>Onbekend opdrachtregelargument: {0}</value>
|
||||
<comment>{0} will be replaced by unrecognized command that has been provided</comment>
|
||||
</data>
|
||||
<data name="ErrorConfigDirectoryNotFound" xml:space="preserve">
|
||||
<value>Configuratiemap kon niet gevonden worden!</value>
|
||||
</data>
|
||||
<data name="BotIdlingSelectedGames" xml:space="preserve">
|
||||
<value>Speelt geselecteerde af: {0} {1}</value>
|
||||
<comment>{0} will be replaced by internal name of the config property (e.g. "GamesPlayedWhileIdle"), {1} will be replaced by comma-separated list of appIDs that user has chosen</comment>
|
||||
</data>
|
||||
<data name="AutomaticFileMigration" xml:space="preserve">
|
||||
<value>{0} configuratiebestand zal worden gemigreerd naar de laatste syntaxis...</value>
|
||||
<comment>{0} will be replaced with the relative path to the affected config file</comment>
|
||||
</data>
|
||||
<data name="WarningWeakIPCPassword" xml:space="preserve">
|
||||
<value>Uw IPC wachtwoord is zwak. Vanwege beveiliging redenen zal het veiliger zijn om een sterker wachtwoord te kiezen. Details: {0}</value>
|
||||
<comment>{0} will be replaced by additional details about the password being considered weak</comment>
|
||||
@@ -625,17 +706,41 @@ Proces uptime: {1}</value>
|
||||
<value>Uw encryptiesleutel is te kort. We raden u aan om er één te gebruiken die minstens {0} bytes (tekens) lang is.</value>
|
||||
<comment>{0} will be replaced by the number of bytes (characters) recommended</comment>
|
||||
</data>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<data name="WarningDefaultCryptKeyUsedForHashing" xml:space="preserve">
|
||||
<value>U gebruikt {0} instelling van {1} eigenschap, maar u heeft geen aangepaste --cryptkey opgegeven. U moet een aangepaste --cryptkey verstrekken voor meer veiligheid.</value>
|
||||
<comment>{0} will be replaced by the name of a particular setting (e.g. "SCrypt"), {1} will be replaced by the name of the property (e.g. "IPCPassword")</comment>
|
||||
</data>
|
||||
<data name="WarningDefaultCryptKeyUsedForEncryption" xml:space="preserve">
|
||||
<value>U gebruikt {0} instelling van {1} eigenschap, maar u heeft geen aangepaste --cryptkey opgegeven. Dit ondermijnt de bescherming volledig, omdat ASF zijn eigen (bekend) sleutel moet gebruiken. U moet een aangepaste --cryptkey opgeven om gebruik te maken van het beveiligingsvoordeel dat deze instelling biedt.</value>
|
||||
<comment>{0} will be replaced by the name of a particular setting (e.g. "AES"), {1} will be replaced by the name of the property (e.g. "SteamPassword")</comment>
|
||||
</data>
|
||||
<data name="WarningRunningAsRoot" xml:space="preserve">
|
||||
<value>U probeert ASF uit te voeren als administrator (root). Dit veroorzaakt een aanzienlijk beveiligingsrisico voor uw apparaat en ASF heeft geen root toegang nodig voor de werking ervan. We raden u aan om, indien mogelijk, als niet-beheerder-gebruiker uit te voeren.</value>
|
||||
</data>
|
||||
<data name="WarningRunningInUnsupportedEnvironment" xml:space="preserve">
|
||||
<value>Je draait ASF in niet-ondersteunde omgeving, het bedienen --negeer geen ondersteunend milieuargument. Houd er rekening mee dat we geen enkele vorm van ondersteuning voor dit scenario bieden en dat je het helemaal op eigen risico doet. Je bent gewaarschuwd.</value>
|
||||
</data>
|
||||
<data name="FetchingChecksumFromRemoteServer" xml:space="preserve">
|
||||
<value>Checksum van de externe server ophalen...</value>
|
||||
</data>
|
||||
<data name="VerifyingChecksumWithRemoteServer" xml:space="preserve">
|
||||
<value>Controleert controlesom van de gedownloade binary tegen de binary van de remote server...</value>
|
||||
</data>
|
||||
<data name="ChecksumMissing" xml:space="preserve">
|
||||
<value>Externe server weet niets over de release waar we naar bijwerken. Deze situatie is mogelijk als de vrijlating onlangs werd gepubliceerd - door als aanvullende veiligheidsmaatregel de actualiseringsprocedure onmiddellijk te weigeren.</value>
|
||||
</data>
|
||||
<data name="ChecksumWrong" xml:space="preserve">
|
||||
<value>Externe server heeft geantwoord met een andere checksum, dit kan duiden op corrupte download of MITM aanval, de update procedure zal gestopt worden!</value>
|
||||
</data>
|
||||
<data name="PatchingFiles" xml:space="preserve">
|
||||
<value>Verbeteren van de ASF files...</value>
|
||||
</data>
|
||||
<data name="UserInputCryptkey" xml:space="preserve">
|
||||
<value>Voer je cryptkey in: </value>
|
||||
<comment>Please note that this translation should end with space</comment>
|
||||
</data>
|
||||
<data name="ErrorIPNotBanned" xml:space="preserve">
|
||||
<value>Het IP adres {0} is niet gebanned!</value>
|
||||
<comment>{0} will be replaced by an IP address which was requested to be unbanned from using IPC</comment>
|
||||
</data>
|
||||
</root>
|
||||
|
||||
@@ -736,4 +736,12 @@ Czas procesu: {1}</value>
|
||||
<data name="PatchingFiles" xml:space="preserve">
|
||||
<value>Łatanie plików ASF...</value>
|
||||
</data>
|
||||
<data name="UserInputCryptkey" xml:space="preserve">
|
||||
<value>Wprowadź swój klucz szyfrowania: </value>
|
||||
<comment>Please note that this translation should end with space</comment>
|
||||
</data>
|
||||
<data name="ErrorIPNotBanned" xml:space="preserve">
|
||||
<value>Adres IP {0} nie jest zbanowany!</value>
|
||||
<comment>{0} will be replaced by an IP address which was requested to be unbanned from using IPC</comment>
|
||||
</data>
|
||||
</root>
|
||||
|
||||
@@ -736,4 +736,6 @@ Tempo de execução: {1}</value>
|
||||
<data name="PatchingFiles" xml:space="preserve">
|
||||
<value>Atualizando arquivos do ASF...</value>
|
||||
</data>
|
||||
|
||||
|
||||
</root>
|
||||
|
||||
@@ -736,4 +736,6 @@ Tempo de execução: {1}</value>
|
||||
<data name="PatchingFiles" xml:space="preserve">
|
||||
<value>A atualizar os ficheiros do ASF...</value>
|
||||
</data>
|
||||
|
||||
|
||||
</root>
|
||||
|
||||
@@ -736,4 +736,12 @@ PROCES UPTIME: {1}</value>
|
||||
<data name="PatchingFiles" xml:space="preserve">
|
||||
<value>PATCHIN ASF FILEZ...</value>
|
||||
</data>
|
||||
<data name="UserInputCryptkey" xml:space="preserve">
|
||||
<value>PLZ ENTR UR CRYPTKEY: </value>
|
||||
<comment>Please note that this translation should end with space</comment>
|
||||
</data>
|
||||
<data name="ErrorIPNotBanned" xml:space="preserve">
|
||||
<value>TEH IP ADDRES {0} IZ NOT BANND!</value>
|
||||
<comment>{0} will be replaced by an IP address which was requested to be unbanned from using IPC</comment>
|
||||
</data>
|
||||
</root>
|
||||
|
||||
@@ -740,4 +740,8 @@ Process uptime: {1}</value>
|
||||
<value>Please enter your cryptkey: </value>
|
||||
<comment>Please note that this translation should end with space</comment>
|
||||
</data>
|
||||
<data name="ErrorIPNotBanned" xml:space="preserve">
|
||||
<value>The IP address {0} is not banned!</value>
|
||||
<comment>{0} will be replaced by an IP address which was requested to be unbanned from using IPC</comment>
|
||||
</data>
|
||||
</root>
|
||||
|
||||
@@ -722,4 +722,6 @@ Proces: {1}</value>
|
||||
<data name="PatchingFiles" xml:space="preserve">
|
||||
<value>Se repara fișierele ASF...</value>
|
||||
</data>
|
||||
|
||||
|
||||
</root>
|
||||
|
||||
@@ -736,4 +736,9 @@
|
||||
<data name="PatchingFiles" xml:space="preserve">
|
||||
<value>Изменение файлов ASF...</value>
|
||||
</data>
|
||||
<data name="UserInputCryptkey" xml:space="preserve">
|
||||
<value>Пожалуйста, введите ваш криптоключ: </value>
|
||||
<comment>Please note that this translation should end with space</comment>
|
||||
</data>
|
||||
|
||||
</root>
|
||||
|
||||
@@ -702,4 +702,6 @@ Interaktívna konzola je teraz aktívna, napíšte "c" pre vstup do príkazovéh
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</root>
|
||||
|
||||
@@ -668,4 +668,6 @@ Vrijeme rada procesa: {1}</value>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</root>
|
||||
|
||||
@@ -499,6 +499,8 @@ StackTrace:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -477,4 +477,6 @@ StackTrace:
|
||||
<data name="PatchingFiles" xml:space="preserve">
|
||||
<value>กำลังแพตช์ไฟล์ ASF…</value>
|
||||
</data>
|
||||
|
||||
|
||||
</root>
|
||||
|
||||
@@ -736,4 +736,12 @@ Süreç çalışma zamanı: {1}</value>
|
||||
<data name="PatchingFiles" xml:space="preserve">
|
||||
<value>ASF dosyaları yamalanıyor...</value>
|
||||
</data>
|
||||
<data name="UserInputCryptkey" xml:space="preserve">
|
||||
<value>Lütfen şifreleme anahtarınızı girin: </value>
|
||||
<comment>Please note that this translation should end with space</comment>
|
||||
</data>
|
||||
<data name="ErrorIPNotBanned" xml:space="preserve">
|
||||
<value>IP adresi {0} is yasaklı değil!</value>
|
||||
<comment>{0} will be replaced by an IP address which was requested to be unbanned from using IPC</comment>
|
||||
</data>
|
||||
</root>
|
||||
|
||||
@@ -701,4 +701,6 @@
|
||||
<data name="PatchingFiles" xml:space="preserve">
|
||||
<value>Виправлення файлів ASF...</value>
|
||||
</data>
|
||||
|
||||
|
||||
</root>
|
||||
|
||||
@@ -736,4 +736,12 @@ Thời gian hoạt động: {1}</value>
|
||||
<data name="PatchingFiles" xml:space="preserve">
|
||||
<value>Đang vá tệp ASF...</value>
|
||||
</data>
|
||||
<data name="UserInputCryptkey" xml:space="preserve">
|
||||
<value>Vui lòng nhập cryptkey: </value>
|
||||
<comment>Please note that this translation should end with space</comment>
|
||||
</data>
|
||||
<data name="ErrorIPNotBanned" xml:space="preserve">
|
||||
<value>Địa chỉ IP {0} không bị cấm!</value>
|
||||
<comment>{0} will be replaced by an IP address which was requested to be unbanned from using IPC</comment>
|
||||
</data>
|
||||
</root>
|
||||
|
||||
@@ -736,4 +736,12 @@
|
||||
<data name="PatchingFiles" xml:space="preserve">
|
||||
<value>修补 ASF 文件……</value>
|
||||
</data>
|
||||
<data name="UserInputCryptkey" xml:space="preserve">
|
||||
<value>请输入您的加密密钥:</value>
|
||||
<comment>Please note that this translation should end with space</comment>
|
||||
</data>
|
||||
<data name="ErrorIPNotBanned" xml:space="preserve">
|
||||
<value>IP 地址 {0} 未被封禁!</value>
|
||||
<comment>{0} will be replaced by an IP address which was requested to be unbanned from using IPC</comment>
|
||||
</data>
|
||||
</root>
|
||||
|
||||
@@ -582,6 +582,8 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -683,7 +683,7 @@
|
||||
<value>無法找到設定檔所在目錄,正在中止!</value>
|
||||
</data>
|
||||
<data name="BotIdlingSelectedGames" xml:space="preserve">
|
||||
<value>正在執行指定掛時數的程式 {0}:{1}</value>
|
||||
<value>正在掛 {0} 指定遊戲的時數:{1}</value>
|
||||
<comment>{0} will be replaced by internal name of the config property (e.g. "GamesPlayedWhileIdle"), {1} will be replaced by comma-separated list of appIDs that user has chosen</comment>
|
||||
</data>
|
||||
<data name="AutomaticFileMigration" xml:space="preserve">
|
||||
@@ -735,4 +735,12 @@
|
||||
<data name="PatchingFiles" xml:space="preserve">
|
||||
<value>正在修補 ASF 檔案…</value>
|
||||
</data>
|
||||
<data name="UserInputCryptkey" xml:space="preserve">
|
||||
<value>請輸入您的 cryptkey: </value>
|
||||
<comment>Please note that this translation should end with space</comment>
|
||||
</data>
|
||||
<data name="ErrorIPNotBanned" xml:space="preserve">
|
||||
<value>IP 位址 {0} 並未被封鎖!</value>
|
||||
<comment>{0} will be replaced by an IP address which was requested to be unbanned from using IPC</comment>
|
||||
</data>
|
||||
</root>
|
||||
|
||||
@@ -317,6 +317,7 @@ internal static class Program {
|
||||
return false;
|
||||
}
|
||||
|
||||
// ReSharper disable once RedundantSuppressNullableWarningExpression - required for .NET Framework
|
||||
ArchiCryptoHelper.SetEncryptionKey(cryptkey!);
|
||||
}
|
||||
|
||||
|
||||
@@ -173,12 +173,16 @@ public sealed class ArchiWebHandler : IDisposable {
|
||||
await Task.Delay(rateLimitingDelay).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
response = await UrlGetToJsonObjectWithSession<InventoryResponse>(request, requestOptions: WebBrowser.ERequestOptions.ReturnServerErrors | WebBrowser.ERequestOptions.AllowInvalidBodyOnErrors, rateLimitingDelay: rateLimitingDelay).ConfigureAwait(false);
|
||||
response = await UrlGetToJsonObjectWithSession<InventoryResponse>(request, requestOptions: WebBrowser.ERequestOptions.ReturnClientErrors | WebBrowser.ERequestOptions.ReturnServerErrors | WebBrowser.ERequestOptions.AllowInvalidBodyOnErrors, rateLimitingDelay: rateLimitingDelay).ConfigureAwait(false);
|
||||
|
||||
if (response == null) {
|
||||
throw new HttpRequestException(string.Format(CultureInfo.CurrentCulture, Strings.ErrorObjectIsNull, nameof(response)));
|
||||
}
|
||||
|
||||
if (response.StatusCode.IsClientErrorCode()) {
|
||||
throw new HttpRequestException(string.Format(CultureInfo.CurrentCulture, Strings.WarningFailedWithError, response.StatusCode), null, response.StatusCode);
|
||||
}
|
||||
|
||||
if (response.StatusCode.IsServerErrorCode()) {
|
||||
if (string.IsNullOrEmpty(response.Content?.Error)) {
|
||||
// This is a generic server error without a reason, try again
|
||||
@@ -189,7 +193,7 @@ public sealed class ArchiWebHandler : IDisposable {
|
||||
|
||||
// This is actually client error with a reason, so it doesn't make sense to retry
|
||||
// ReSharper disable once RedundantSuppressNullableWarningExpression - required for .NET Framework
|
||||
throw new HttpRequestException(string.Format(CultureInfo.CurrentCulture, Strings.WarningFailedWithError, response.Content!.Error));
|
||||
throw new HttpRequestException(string.Format(CultureInfo.CurrentCulture, Strings.WarningFailedWithError, response.Content!.Error), null, response.StatusCode);
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
|
||||
@@ -67,9 +67,9 @@ done
|
||||
|
||||
BINARY_PREFIX=""
|
||||
|
||||
if [ -n "${ASF_USER-}" ] && [ "$(id -u)" -eq 0 ] && id -u "$ASF_USER" >/dev/null 2>&1; then
|
||||
if [ -n "${ASF_USER-}" ] && [ "$(id -u)" -eq 0 ] && id -u "$ASF_USER" >/dev/null 2>&1 && [ "$(id -u "$ASF_USER")" -gt 0 ]; then
|
||||
# Fix permissions first to ensure ASF has read/write access to the directory specified by --path and its own
|
||||
chown -hR "${ASF_USER}:${ASF_USER}" . "$SCRIPT_DIR"
|
||||
chown -hR "${ASF_USER}:${ASF_USER}" . "$SCRIPT_DIR" || true
|
||||
|
||||
BINARY_PREFIX="su ${ASF_USER} -c"
|
||||
fi
|
||||
|
||||
@@ -33,12 +33,16 @@ RestrictAddressFamilies=AF_INET AF_INET6
|
||||
RestrictNamespaces=yes
|
||||
RestrictRealtime=yes
|
||||
RestrictSUIDSGID=yes
|
||||
SecureBits=noroot-locked
|
||||
SystemCallArchitectures=native
|
||||
SystemCallFilter=@system-service
|
||||
SystemCallFilter=~@privileged
|
||||
UMask=0077
|
||||
|
||||
# TODO: Requires systemd v247+ due to https://github.com/systemd/systemd/issues/16666
|
||||
# Since we don't want to enforce OS upgrade for everybody just yet, it's commented out for now
|
||||
# We'll likely enforce it when .NET switches to Debian 11+ requirement
|
||||
#SecureBits=noroot-locked
|
||||
|
||||
[Unit]
|
||||
After=network.target
|
||||
Description=ArchiSteamFarm Service (on %I)
|
||||
|
||||
@@ -67,9 +67,9 @@ done
|
||||
|
||||
BINARY_PREFIX=""
|
||||
|
||||
if [ -n "${ASF_USER-}" ] && [ "$(id -u)" -eq 0 ] && id -u "$ASF_USER" >/dev/null 2>&1; then
|
||||
if [ -n "${ASF_USER-}" ] && [ "$(id -u)" -eq 0 ] && id -u "$ASF_USER" >/dev/null 2>&1 && [ "$(id -u "$ASF_USER")" -gt 0 ]; then
|
||||
# Fix permissions first to ensure ASF has read/write access to the directory specified by --path and its own
|
||||
chown -hR "${ASF_USER}:${ASF_USER}" . "$SCRIPT_DIR"
|
||||
chown -hR "${ASF_USER}:${ASF_USER}" . "$SCRIPT_DIR" || true
|
||||
|
||||
BINARY_PREFIX="su ${ASF_USER} -c"
|
||||
fi
|
||||
|
||||
@@ -67,9 +67,9 @@ done
|
||||
|
||||
BINARY_PREFIX=""
|
||||
|
||||
if [ -n "${ASF_USER-}" ] && [ "$(id -u)" -eq 0 ] && id -u "$ASF_USER" >/dev/null 2>&1; then
|
||||
if [ -n "${ASF_USER-}" ] && [ "$(id -u)" -eq 0 ] && id -u "$ASF_USER" >/dev/null 2>&1 && [ "$(id -u "$ASF_USER")" -gt 0 ]; then
|
||||
# Fix permissions first to ensure ASF has read/write access to the directory specified by --path and its own
|
||||
chown -hR "${ASF_USER}:${ASF_USER}" . "$SCRIPT_DIR"
|
||||
chown -hR "${ASF_USER}:${ASF_USER}" . "$SCRIPT_DIR" || true
|
||||
|
||||
BINARY_PREFIX="su ${ASF_USER} -c"
|
||||
fi
|
||||
|
||||
@@ -67,9 +67,9 @@ done
|
||||
|
||||
BINARY_PREFIX=""
|
||||
|
||||
if [ -n "${ASF_USER-}" ] && [ "$(id -u)" -eq 0 ] && id -u "$ASF_USER" >/dev/null 2>&1; then
|
||||
if [ -n "${ASF_USER-}" ] && [ "$(id -u)" -eq 0 ] && id -u "$ASF_USER" >/dev/null 2>&1 && [ "$(id -u "$ASF_USER")" -gt 0 ]; then
|
||||
# Fix permissions first to ensure ASF has read/write access to the directory specified by --path and its own
|
||||
chown -hR "${ASF_USER}:${ASF_USER}" . "$SCRIPT_DIR"
|
||||
chown -hR "${ASF_USER}:${ASF_USER}" . "$SCRIPT_DIR" || true
|
||||
|
||||
BINARY_PREFIX="su ${ASF_USER} -c"
|
||||
fi
|
||||
|
||||
@@ -33,12 +33,16 @@ RestrictAddressFamilies=AF_INET AF_INET6
|
||||
RestrictNamespaces=yes
|
||||
RestrictRealtime=yes
|
||||
RestrictSUIDSGID=yes
|
||||
SecureBits=noroot-locked
|
||||
SystemCallArchitectures=native
|
||||
SystemCallFilter=@system-service
|
||||
SystemCallFilter=~@privileged
|
||||
UMask=0077
|
||||
|
||||
# TODO: Requires systemd v247+ due to https://github.com/systemd/systemd/issues/16666
|
||||
# Since we don't want to enforce OS upgrade for everybody just yet, it's commented out for now
|
||||
# We'll likely enforce it when .NET switches to Debian 11+ requirement
|
||||
#SecureBits=noroot-locked
|
||||
|
||||
[Unit]
|
||||
After=network.target
|
||||
Description=ArchiSteamFarm Service (on %I)
|
||||
|
||||
@@ -67,9 +67,9 @@ done
|
||||
|
||||
BINARY_PREFIX=""
|
||||
|
||||
if [ -n "${ASF_USER-}" ] && [ "$(id -u)" -eq 0 ] && id -u "$ASF_USER" >/dev/null 2>&1; then
|
||||
if [ -n "${ASF_USER-}" ] && [ "$(id -u)" -eq 0 ] && id -u "$ASF_USER" >/dev/null 2>&1 && [ "$(id -u "$ASF_USER")" -gt 0 ]; then
|
||||
# Fix permissions first to ensure ASF has read/write access to the directory specified by --path and its own
|
||||
chown -hR "${ASF_USER}:${ASF_USER}" . "$SCRIPT_DIR"
|
||||
chown -hR "${ASF_USER}:${ASF_USER}" . "$SCRIPT_DIR" || true
|
||||
|
||||
BINARY_PREFIX="su ${ASF_USER} -c"
|
||||
fi
|
||||
|
||||
@@ -67,9 +67,9 @@ done
|
||||
|
||||
BINARY_PREFIX=""
|
||||
|
||||
if [ -n "${ASF_USER-}" ] && [ "$(id -u)" -eq 0 ] && id -u "$ASF_USER" >/dev/null 2>&1; then
|
||||
if [ -n "${ASF_USER-}" ] && [ "$(id -u)" -eq 0 ] && id -u "$ASF_USER" >/dev/null 2>&1 && [ "$(id -u "$ASF_USER")" -gt 0 ]; then
|
||||
# Fix permissions first to ensure ASF has read/write access to the directory specified by --path and its own
|
||||
chown -hR "${ASF_USER}:${ASF_USER}" . "$SCRIPT_DIR"
|
||||
chown -hR "${ASF_USER}:${ASF_USER}" . "$SCRIPT_DIR" || true
|
||||
|
||||
BINARY_PREFIX="su ${ASF_USER} -c"
|
||||
fi
|
||||
|
||||
@@ -33,12 +33,16 @@ RestrictAddressFamilies=AF_INET AF_INET6
|
||||
RestrictNamespaces=yes
|
||||
RestrictRealtime=yes
|
||||
RestrictSUIDSGID=yes
|
||||
SecureBits=noroot-locked
|
||||
SystemCallArchitectures=native
|
||||
SystemCallFilter=@system-service
|
||||
SystemCallFilter=~@privileged
|
||||
UMask=0077
|
||||
|
||||
# TODO: Requires systemd v247+ due to https://github.com/systemd/systemd/issues/16666
|
||||
# Since we don't want to enforce OS upgrade for everybody just yet, it's commented out for now
|
||||
# We'll likely enforce it when .NET switches to Debian 11+ requirement
|
||||
#SecureBits=noroot-locked
|
||||
|
||||
[Unit]
|
||||
After=network.target
|
||||
Description=ArchiSteamFarm Service (on %I)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<Version>5.3.2.0</Version>
|
||||
<Version>5.3.2.3</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
@@ -44,6 +44,7 @@
|
||||
<Using Include="JustArchiNET.Madness.FileMadness.File" Alias="File" />
|
||||
<Using Include="JustArchiNET.Madness.HashCodeMadness.HashCode" Alias="HashCode" />
|
||||
<Using Include="JustArchiNET.Madness.HMACSHA1Madness.HMACSHA1" Alias="HMACSHA1" />
|
||||
<Using Include="JustArchiNET.Madness.HttpRequestExceptionMadness.HttpRequestException" Alias="HttpRequestException" />
|
||||
<Using Include="JustArchiNET.Madness.OperatingSystemMadness.OperatingSystem" Alias="OperatingSystem" />
|
||||
<Using Include="JustArchiNET.Madness.PathMadness.Path" Alias="Path" />
|
||||
<Using Include="JustArchiNET.Madness.RandomMadness.Random" Alias="Random" />
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<PackageVersion Include="MSTest.TestFramework" Version="2.2.10" />
|
||||
<PackageVersion Include="Newtonsoft.Json" Version="13.0.1" />
|
||||
<PackageVersion Include="Nito.AsyncEx.Coordination" Version="5.1.2" />
|
||||
<PackageVersion Include="NLog.Web.AspNetCore" Version="5.1.4" />
|
||||
<PackageVersion Include="NLog.Web.AspNetCore" Version="5.1.5" />
|
||||
<PackageVersion Include="SteamKit2" Version="2.4.1" />
|
||||
<PackageVersion Include="Swashbuckle.AspNetCore" Version="6.4.0" />
|
||||
<PackageVersion Include="Swashbuckle.AspNetCore.Annotations" Version="6.4.0" />
|
||||
@@ -27,7 +27,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'net481'">
|
||||
<PackageVersion Include="JustArchiNET.Madness" Version="3.7.0" />
|
||||
<PackageVersion Include="JustArchiNET.Madness" Version="3.8.0" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Cors" Version="2.2.0" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Diagnostics" Version="2.2.0" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.HttpOverrides" Version="2.2.0" />
|
||||
@@ -36,8 +36,8 @@
|
||||
<PackageVersion Include="Microsoft.AspNetCore.ResponseCompression" Version="2.2.0" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Server.Kestrel" Version="2.2.0" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.WebSockets" Version="2.2.1" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Configuration.Json" Version="3.1.29" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Logging.Configuration" Version="3.1.29" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Configuration.Json" Version="3.1.30" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Logging.Configuration" Version="3.1.30" />
|
||||
<PackageVersion Include="TA.System.Runtime.CompilerServices.RuntimeHelpers.GetSubArray" Version="1.0.1" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
||||
2
wiki
2
wiki
Submodule wiki updated: a18f9a56f1...7062284646
Reference in New Issue
Block a user