Skip to content

Remove SteamKit2 in favor of steamcmd - #267

Open
JantsoP wants to merge 1 commit into
Foxlider:feature/Update-1.9from
JantsoP:master
Open

Remove SteamKit2 in favor of steamcmd#267
JantsoP wants to merge 1 commit into
Foxlider:feature/Update-1.9from
JantsoP:master

Conversation

@JantsoP

@JantsoP JantsoP commented Aug 12, 2026

Copy link
Copy Markdown

Remove SteamKit2 in favor of official SteamCMD

Description

Removes the BytexDigital.Steam git submodule and all SteamKit2-based
download/update logic, replacing it with a first-party SteamCmd service
layer (FASTER/Services/SteamCmd/) that drives Valve's real steamcmd.exe
through the native Windows pseudoconsole (ConPTY) and parses its console
output into structured events.

Key changes:

  • New SteamCmdInstaller bootstraps/updates SteamCMD automatically if it's
    missing from the configured path — no manual setup required.
  • New SteamCmdSession / SteamCmdPseudoConsole host a long-lived SteamCMD
    process and stream its stdout/stdin through ConPTY, since SteamCMD requires
    a real console to prompt for passwords/Steam Guard.
  • New SteamCmdOutputParser incrementally turns SteamCMD's raw console text
    into typed events (login prompts, Steam Guard/mobile confirmation prompts,
    per-item download progress, success/failure, app update percentages, etc.),
    redacting secrets from anything it emits.
  • New SteamCmdClient exposes DownloadWorkshopItemsAsync and
    UpdateServerAsync, and downloads multiple Workshop items in a single
    SteamCMD session
    instead of one process per mod.
  • New WorkshopContentMirror copies each completed SteamCMD Workshop
    download into FASTER's mod staging directory and atomically swaps it in,
    so an interrupted copy never leaves a half-updated mod.
  • SteamUpdaterViewModel rewritten around the new client: retries failed
    Workshop items, supports Steam Guard/mobile-approval prompts via dialog,
    reports live download/update percentages to the progress bar, and now
    writes a detailed, timestamped SteamCMD session log to
    %LocalAppData%\FASTER\Logs\SteamCmd.log for troubleshooting without
    flooding the on-screen console.
  • Removed SteamWebApi's download/auth responsibilities — the Web API key
    is now optional and only used for Workshop metadata/update-timestamp
    lookups, not authentication.
  • Settings, Setup, and Updater views/UX updated for the new SteamCMD path
    setting and login flow.
  • README updated with the new prerequisites (Windows 10 1809+/Server 2019+
    for ConPTY) and a full explanation of the SteamCMD update workflow.

Motivation and Context

The previous SteamKit2 (BytexDigital.Steam) integration required workarounds
to authenticate and pull Workshop content, downloaded mods one at a time, and
was fragile around Steam Guard/2FA flows. Valve's own steamcmd.exe is the
officially supported way to automate Steam/Workshop operations, downloads
multiple Workshop items in one session, and is noticeably faster in practice.
This also drops an entire external git submodule dependency, simplifying the
build and reducing maintenance surface.

How Has This Been Tested?

  • Added unit tests: SteamCmdCommandBuilderTests, SteamCmdOutputParserTests
    (parsing prompts, Steam Guard/mobile confirmation, workshop success/failure,
    progress lines, secret redaction), SteamCmdClientTests, and
    WorkshopContentMirrorTests.
  • Added an opt-in SteamCmdLiveSmokeTests ([Category("SteamCmdLive")])
    that exercises a real SteamCMD handshake up to the authenticated
    server-update prompt; skipped unless FASTER_STEAMCMD_SMOKE_ROOT is set,
    so it doesn't run in normal CI.
  • Manually verified end-to-end on Windows: built a Release x64 self-contained
    publish, ran a real Arma 3 dedicated server update (Public branch) through
    the app, confirmed cached-login authentication, live progress bar updates
    matching SteamCMD's reported percentages, and a clean
    "Arma 3 Dedicated Server update completed" result — cross-checked line by
    line against the new SteamCmd.log output.
  • Manually verified a multi-item Workshop batch download completes and stages
    each mod correctly.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

This removes the BytexDigital.Steam submodule and changes how Workshop
downloads authenticate (a real Steam account is now required instead of
relying solely on a Web API key), so existing users need to reconfigure
their SteamCMD path/Steam login on first run after upgrading.

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • [x ] I have read the CONTRIBUTING document.

This will completely remove SteamKit2 hacks in favor of official steamcmd with way faster downloads and able to download multiple mods at the same time.
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
E Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@jupster
jupster changed the base branch from master to feature/Update-1.9 August 12, 2026 10:45
@jupster

jupster commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

It might take a bit of time for this to be gone through due to how busy I know @Foxlider is and ive been pretty busy lately as well. Really appreciate the PR.

Ive change your push branch to update as it won't go straight to master.

Make sure you have a read of the contributing file.

@JantsoP

JantsoP commented Aug 12, 2026

Copy link
Copy Markdown
Author

I have tested this on my machine and the migration was flawless. I had 97 out of 126 mods which were not loaded. With current version, it would take me hours to download them all. Now it took few minutes (fast internet and all)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants