JustArchi a8045ac50b Fix async/await with ConcurrentHashSet
Now this is a nice bug that was found accidentally by ArchiBoT...
ReaderWriterLockSlim() is very decent solution, but it's thread-based, and we're using our ConcurrentHashSet in mixed async/sync context. This means that if we use something like:
foreach (var item in concHashSet) {
    await AnythingAsync().ConfigureAwait(false);
}
It's totally possible that we'll request read lock as thread 1, and release the read lock as thread 2, which will lead to RWLock exception => System.Threading.SynchronizationLockException: The read lock is being released without being held.
Fortunately it looks like we didn't have any scenario like this in ASF, as this was possible only when we async/await while enumerating over ConcurrentHashSet, so that specific bug didn't affect ASF codebase (yet). Still, I must fix this as current implementation is not thread-safe, so our HashSet is in fact not concurrent in the first place.
I analyzed possible solutions and there are basically 3: either using ConcurrentDictionary and wrapping around it, replacing lock with SemaphoreSlim, or using third-party AsyncReaderWriterLock from StephenCleary. SemaphoreSlim entirely kills the concept of multiple readers one writer, and could affect performance negatively, moreover - it doesn't support upgreadable lock scenario we have with ReplaceIfNeededWith(). Concurrent dictionary would be nice if I didn't have that awful memory hit from storing mandatory pointless value, plus I don't really like concept of wrapping around conc dictionary if I can simply use it right away and drop my conc hashset entirely. AsyncReaderWriterLock seem to be really well written, and works on Mono + should be compatible with .NET core in the future, so we should go for it as it's the best bet both performance-wise and memory-wise.
This brings another package dependency and changes a bit backend of ConcurrentHashSet
2017-02-07 20:14:51 +01:00
2016-12-04 15:30:00 +01:00
2016-07-03 01:18:09 +02:00
2015-10-25 06:13:34 +01:00
2017-02-05 14:32:38 +01:00
2017-01-17 00:29:47 +01:00
2017-01-16 03:03:19 +01:00
2017-02-03 09:54:09 +01:00
2017-01-16 01:36:39 +01:00
2016-07-30 00:51:43 +02:00
2017-01-14 15:14:31 +01:00
2017-01-08 15:17:58 +01:00
2016-07-10 20:10:14 +02:00
2017-01-02 20:05:21 +01:00
2017-01-16 03:03:19 +01:00
2017-01-18 05:24:07 +01:00
2016-09-13 03:12:58 +02:00

ArchiSteamFarm

Build Status (Windows) Build Status (Mono) License GitHub Release Github Downloads Crowdin

Paypal.me Donate Paypal Donate Bitcoin Donate Steam Donate

Gitter Steam Group Discord


ASF is a C# application that allows you to farm steam cards using multiple steam accounts simultaneously. Unlike Idle Master which works only for one account at given time, requires steam client running in background, and launches additional processes imitiating "game playing" status, ASF doesn't require any steam client running in the background, doesn't launch any additional processes and is made to handle unlimited steam accounts at once. In addition to that, it's meant to be run on servers or other desktop-less machines, and features full Mono support, which makes it possible to launch on any Mono-supported operating system, such as Windows, Linux or OS X. ASF is based on, and possible, thanks to SteamKit2.

ASF doesn't require and doesn't interfere in any way with Steam client. In addition to that, it no longer requires exclusive access to given account, which means that you can use your main account in Steam client, and use ASF for farming the same account at the same time. If you decide to launch a game, ASF will get disconnected, and resume farming once you finish playing your game, being as transparent as possible.

Core features

  • Automatic farming of available games with card drops using any number of active accounts
  • No requirement of running or even having official Steam client installed
  • Guarantee of being VAC-free
  • Complex error-reporting mechanism, allowing ASF to be smart and resume farming even in case of Steam or networking problems
  • Customizable cards farming algorithm which will push performance of cards farming to the maximum
  • Offline farming, allowing you to skip in-game status and not confuse your friends anymore
  • Advanced support for alt accounts, including ability to redeem keys, redeem gifts, accept trades and more through a simple Steam chat
  • Support for latest Steam security features, including SteamGuard, SteamParental and Two-Factor authentication
  • Unique ASF 2FA mechanism allowing ASF to act as a mobile authenticator (if needed)
  • StreamTradeMatcher integration allowing ASF to help you in completing your steam badges by accepting dupe trades
  • Full Mono support, cross-OS compatibility, official support for Windows, Linux and OS X
  • ...and many more!

Setting up / Help

Detailed guide regarding setting up and using ASF is available on our wiki.

Supported / Tested operating systems:

ASF officially supports Windows, Linux and OS X operating systems, including following tested variants:

  • Windows 10 (Native)
  • Windows 8.1 (Native)
  • Windows 8 (Native)
  • Windows 7 SP1 (Native)
  • Windows Server 2012 R2 (Native)
  • Windows Server 2008 R2 SP1 (Native)
  • Debian 9 Stretch (Mono)
  • Debian 8 Jessie (Mono)
  • Ubuntu 16.04 (Mono)
  • OS X 10.11 (Mono)
  • OS X 10.7 (Mono)

However, any currently supported Windows should run ASF flawlessly (with latest .NET framework), as well as any Mono-powered OS (with latest Mono).

Languages
C# 97.4%
C++ 1.2%
Shell 1.1%
Dockerfile 0.3%