Commit Graph

5538 Commits

Author SHA1 Message Date
Archi
032dd6333d Implement first version of ArchiSteamFarm@.service
Service files for other variants will follow once this one is finished
2021-09-26 03:10:35 +02:00
Archi
1bfedbe5e8 Implement --service cmd-line arg 2021-09-26 01:05:38 +02:00
Archi
300c1c19ec Implement some deduplication for overlay
Including 3 same scripts for linux is overkill, osx and linux could also be aggregated to "unix" but too much work
2021-09-26 00:12:15 +02:00
Archi
75a31410c0 Don't report unknown command on lack of response
Lack of response is actually access denied, not unknown command. Normally users don't get to this point because of !feedback, but in rare case when user has SOME permission, but insufficient one (like FamilySharing for !addlicense), he should get access denied response instead.

Also remove false logging of null response there, it's to be expected in this case.
2021-09-25 22:25:43 +02:00
ArchiBot
383868351d Automatic translations update 2021-09-22 02:10:42 +00:00
Archi
c60d413a70 Misc 2021-09-15 12:43:25 +02:00
Archi
e90100a847 Misc 2021-09-13 15:36:41 +02:00
Archi
c17074e98f Misc 2021-09-12 21:15:08 +02:00
ArchiBot
9c0582452f Automatic translations update 2021-09-12 02:09:51 +00:00
ArchiBot
668d4457e7 Automatic translations update 2021-09-07 02:07:17 +00:00
ArchiBot
8fe6d98883 Automatic translations update 2021-09-06 02:10:51 +00:00
Archi
4935ec3187 Remove support for SystemEvents.TimeChanged
This causes excessive delay during ASF shutdown on Windows, and because it's completely optional for irrelevant feature, it's not worth the burden
2021-09-02 13:45:56 +02:00
ArchiBot
8a7d0515e1 Automatic translations update 2021-09-02 02:07:17 +00:00
Archi
3545aae09c Misc
Thanks to Madness this ifdef is no longer required
2021-09-01 23:41:42 +02:00
ArchiBot
20e6ba753d Automatic translations update 2021-08-31 02:07:11 +00:00
Archi
b32548d366 Remove explicit NLog dependency
NLog is included as part of NLog.Web.AspNetCore, we do not require a direct dependency.
2021-08-30 01:08:23 +02:00
Archi
1f556f9264 Remove no longer needed workaround 2021-08-26 11:45:44 +02:00
Sebastian Göls
9f26e72843 Remove two unnecessary context switches (#2407)
* Remove unnecessary context switch

* Remove unnecessary context switch
2021-08-25 13:08:29 +02:00
ArchiBot
3f426546c2 Automatic translations update 2021-08-24 02:06:55 +00:00
Archi
69e2a3590c ApiAuthenticationMiddleware performance improvements
Previously we've used one semaphore per all ongoing authentication attempts, which is suboptimal given the existence of a lot of consumers, including ongoing (D)DoS or distributed bruteforce attack. ASF should be as resistant to that as possible, therefore it makes sense to replace the global semaphore with per-IP semaphore (actually task), that can control the access just as well, without stopping other consumers from accessing the same authentication process concurrently.
2021-08-24 01:37:14 +02:00
Archi
5f5dcfbb99 Misc 2021-08-23 16:50:26 +02:00
Archi
882443711b Optimize ApiAuthenticationMiddleware for bruteforcing
We can favour bruteforcers by checking first if the client is even eligible for talking with us, this will (in a very negligible way) improve defense against common DoS.

Also rewrite Timer initialization while at it. This is internal class and we don't expect this middleware to be initialized more than once anyway.
2021-08-23 16:49:19 +02:00
Archi
3dec189e14 Misc 2021-08-20 14:31:12 +02:00
Vitaliya
06b11a3129 Disable unsafe for netf (#2405) 2021-08-19 17:50:18 +02:00
ArchiBot
cf9b90a73c Automatic translations update 2021-08-15 02:07:03 +00:00
Archi
dff549bd27 Misc 2021-08-13 23:34:44 +02:00
Łukasz Domeradzki
bb513921f1 Include ASF's windows-only parts only in generic and windows builds (#2404)
* Include ASF's windows-only parts only in generic and windows builds

* Apply Abry's note
2021-08-13 23:07:17 +02:00
ArchiBot
4fd411fd56 Automatic translations update 2021-08-12 02:07:58 +00:00
Archi
e3711dde26 Handle LimitExceeded in SendMessagePart()
Thanks ArchiBot
2021-08-11 20:54:10 +02:00
Archi
b3d1f96824 Misc
> This call site is reachable on: 'FreeBSD', 'Linux', 'MacOS'. 'OS.UnixSetFileAccess(string, OS.EUnixPermission)' is only supported on: 'Linux', 'FreeBSD', 'OSX'.
2021-08-10 17:37:18 +02:00
Archi
de0ee3a497 Make use of latest Madness 1.1.0 features 2021-08-10 17:09:46 +02:00
Łukasz Domeradzki
f403e9c296 Better April Fools (#2401)
* Better April Fools

* Guard timer with lock

It's not thread-safe

* Address Abry note

* Add extra 100ms to the timer calculation
2021-08-10 11:43:36 +02:00
Archi
46b2376849 Mark JetBrains.Annotations as private asset
Madness research shows that this doesn't need dll inclusion
2021-08-08 12:51:38 +02:00
Archi
911680d606 Remove IndexRange from explicit dependencies
Madness implicitly includes it already
2021-08-07 14:08:06 +02:00
Łukasz Domeradzki
9f281c6055 Embrace madness (#2394)
* Embrace madness

* Remove unused code

* Misc

* Address Abry's note

* Update for Madness 0.3.0
2021-08-07 14:03:46 +02:00
Archi
a9fd774988 Decrease netf code burden with SupportedOSPlatform 2021-08-05 21:31:12 +02:00
Archi
4eb4bc98ed Annotate remaining OS-specific parts of OS.cs 2021-08-05 21:24:23 +02:00
Archi
aa7fce300d Use new OperatingSystem API for OS detection
Supporting netf gets harder every day...
2021-08-05 21:17:42 +02:00
Vitaliya
8cd57efe33 Don't serialize AdditionalProperties for Asset (#2393)
* Don't serialize AdditionalProperties for Asset

* Don't serialize additional properties in InventoryResponse as well
2021-08-05 00:31:37 +02:00
Archi
a1955bc881 Mark additional stuff for removal 2021-08-02 22:15:37 +02:00
Archi
93a8af71e9 Limit HashCode compatibility helper to netf 2021-08-02 21:51:21 +02:00
Archi
929d57709a Remove obsolete properties 2021-08-02 21:45:04 +02:00
ArchiBot
4ac2774eaf Automatic translations update 2021-08-01 02:13:36 +00:00
Archi
b853bf0cf6 Back to sha1
Full sign doesn't work with sha256 (sad)
2021-07-31 19:19:32 +02:00
Archi
b3f490c328 Fix debug builds and use SHA256 public key 2021-07-31 18:47:18 +02:00
Archi
2be8a8b2a8 Avoid a potential synchronous flush when serializing api authentication middleware response
Might result in something along:

2021-07-30 16:39:43|ArchiSteamFarm-6766|ERROR|Microsoft.AspNetCore.Server.Kestrel|Connection id "0HMAJF2E5IVHB", Request id "0HMAJF2E5IVHB:00000005": An unhandled exception was thrown by the application. System.InvalidOperationException: Synchronous operations are disallowed. Call WriteAsync or set AllowSynchronousIO to true instead.
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpResponseStream.Flush()
   at Microsoft.AspNetCore.ResponseCaching.ResponseCachingStream.Flush()
   at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionBody.Flush()
   at System.IO.StreamWriter.Flush(Boolean flushStream, Boolean flushEncoder)
   at System.IO.StreamWriter.Dispose(Boolean disposing)
   at System.IO.StreamWriter.Close()
   at Newtonsoft.Json.JsonTextWriter.CloseBufferAndWriter()
   at Newtonsoft.Json.JsonTextWriter.Close()
   at Newtonsoft.Json.JsonWriter.Dispose(Boolean disposing)
   at Newtonsoft.Json.JsonWriter.System.IDisposable.Dispose()
   at ArchiSteamFarm.IPC.WebUtilities.WriteJsonAsync[TValue](HttpResponse response, TValue value, JsonSerializerSettings jsonSerializerSettings)
   at ArchiSteamFarm.IPC.WebUtilities.WriteJsonAsync[TValue](HttpResponse response, TValue value, JsonSerializerSettings jsonSerializerSettings)
   at ArchiSteamFarm.IPC.Integration.ApiAuthenticationMiddleware.InvokeAsync(HttpContext context, IOptions`1 jsonOptions)
   at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.ResponseCaching.ResponseCachingMiddleware.Invoke(HttpContext httpContext)
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)
2021-07-30 20:54:52 +02:00
Archi
0b32862efe Use 4096-bit private key for public sign 2021-07-30 16:19:52 +02:00
Archi
77d34a2ac8 Enable public signing of ASF binaries
Pending tests whether this is going to have any drawbacks, but so far looks good
2021-07-30 16:09:46 +02:00
renovate[bot]
97a5a94220 Update dependency SteamKit2 to v2.4.0-Alpha.3 (#2392)
* Update dependency SteamKit2 to v2.4.0-Alpha.3

* Address SK2 breaking changes

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Archi <JustArchi@JustArchi.net>
2021-07-30 15:33:29 +02:00
Sebastian Göls
5cbc25c44e Fix command mabadd working incorrectly (#2390)
* Fix command mabadd working incorrectly

* Do the same for mabrm
2021-07-28 22:43:17 +02:00