|
|
7 miesięcy temu | |
|---|---|---|
| .. | ||
| bin | 7 miesięcy temu | |
| obj | 7 miesięcy temu | |
| publish | 9 miesięcy temu | |
| Program.cs | 7 miesięcy temu | |
| README.md | 7 miesięcy temu | |
| steamAPI.csproj | 9 miesięcy temu | |
Steam 登录验证本地服务,供客户端调用:使用账号、密码 + maFile 完成 Steam 登录,返回 session、steam_id、cookies 等。
在项目目录下执行:
cd steam-client/steamAPI
dotnet run
dotnet run --urls "http://localhost:5000"
默认监听 http://localhost:5000(客户端 Tauri 代码中写死为该地址)。
dotnet run --urls "http://localhost:5000"
# 或使用其他端口,例如 5001,同时需修改客户端中 verify_steam_login 的 api_url
dotnet run --urls "http://localhost:5001"
dotnet publish -c Release -r win-x64 --self-contained
输出在 bin/Release/net8.0/win-x64/publish/,可直接运行其中的 steamAPI.exe。
POST /login
{ "Username": "steam用户名", "Password": "密码", "MaFilePath": "maFile 完整路径", "ProxyUrl": "http://127.0.0.1:7890" }session(steamId、accessToken、refreshToken、sessionId)及 cookies(含 steamLoginSecure 等)POST /wallet-balance
{ "SteamLoginSecure": "xxx", "ProxyUrl": "http://127.0.0.1:7890" }{ "amount": "1234", "currency": "USD" }(amount 单位为美分)当本机直连 Steam 受限时,可以只给 steamAPI 进程配置代理,不需要开系统全局代理:
/login 的 JSON 中传 ProxyUrl。STEAM_PROXY_URL 后启动服务。示例(macOS / Linux):
export STEAM_PROXY_URL="http://127.0.0.1:7890"
dotnet run --urls "http://localhost:5000"
SteamAuth 及 NuGet 包 SteamKit2、Microsoft.AspNetCore.App。首次运行会自动还原包。