InfiniteLoop is a working branch of AscNet, a private-server emulator for Punishing: Gray Raven. This branch focuses on bringing AscNet forward to the current global PC/Steam client path and documenting the compatibility work needed for the 4.5-era client.
This is research/dev infrastructure, not an official service. It expects a local client, a local AscNet process, and a local MongoDB database.
The current compatibility target in this tree is:
| Area | Value |
|---|---|
| Client package | com.kurogame.pc.punishing.grayraven.en |
| Application version | 4.5.0 |
| Document version | 4.5.12 |
| Launch module version | 4.5.12 |
| Steam/PC channel | 205 |
| Game server TCP port | 2335 by default |
| SDK/HTTP URL used by the runner | http://127.0.0.1:8080 by default |
Resources/Configs/version_config.json carries the current 4.5.0 -> 4.5.12 version/hash tuple used by the current-client config endpoint.
- Added current-client config generation for the PC package
com.kurogame.pc.punishing.grayraven.en. - Added Steam/PC channel handling with channel
205. - Added current-client CDN and server-list payloads for the config endpoints.
- Added Kuro SDK compatibility endpoints under
/sdkcom/v2/..., including:- email/password login
- Steam third-party login
- auto login
- real-name login/check
- access token
- OAuth code generation
- Steam/PC third-login mark/browser helpers
- player config/system config payloads
- Added gate-login fallback via
ASCNET_GATE_FALLBACK_USERNAME, so Steam/KRSDK handoff can map an unknown external user id to a local AscNet account. - Added current notice fixtures and endpoint compatibility checks for the current client.
- Added
run_steam.py, a local runner that starts AscNet, optionally starts MongoDB, starts mitmproxy, performs SDK/config smoke checks, creates or verifies a local AscNet account, and launches the client command with proxy environment variables. - Added
proxy.pyrouting for current PC/Steam HTTP traffic:sdkapi.kurogame-service.comsdkapi.kurogame-service.xyzprod-encdn-*.kurogame.net- local wildcard
/api/,/prod/, and/sdkcom/requests
- Added redacted proxy flow logging to
.runtime/proxy-flows.log. - Added KRSDK cache repair/seeding helpers for local Steam bridge experiments.
- Added
launch-pgr-ascnet.shas a macOS/CrossOver launch example. Its paths are workstation-specific; adjust them before reuse.
This branch adds or fixes current-client server behavior for:
NotifyLoginshape and current-client login data.- Current-client notice payloads.
- Stage bookmark compatibility.
- Board mutual push compatibility.
- Mainline 2 exhibition chapter compatibility.
- Mainline treasure rewards using current
Treasure.tsvandChapter.tsvcontracts. - Story course rewards.
- Boss single login payload shape.
- Guide table compatibility for current guide TSVs.
- Player cost-time upload.
- Player point upload.
- PR2 quality compatibility.
- Character progression persistence.
- Character/frame experience rollover and commandant-level caps.
- Fight settlement commandant EXP and character/card EXP.
- Current-client first-clear fields such as
FirstTeamExpandFirstCardExp.
The current client needs gender selection to update both persisted player state and the live in-session player cache.
This branch adds:
PlayerData.GenderPlayerData.ChangeGenderTimeChangePlayerGenderRequestChangePlayerGenderResponseNotifyPlayerGenderChangePlayerGenderRequestHandler
Behavior:
- accepts current-client gender values
1..3 - rejects invalid values with
20002020/PlayerGenderCfgNotExist - returns
20002021/PlayerGenderIsSameonly after setup has completed - treats
Gender <= 0orChangeGenderTime <= 0as incomplete first setup - grants first-setup
Inventory.FreeGem x50 - sends
NotifyItemDataListfor the 50 Black Card reward - includes
RewardGoodsListin the response - sends
NotifyPlayerGenderbefore the success response so the profile can refresh without a client restart - persists inventory and player state
This also covers the earlier broken state where Gender may have been written but no reward or ChangeGenderTime was recorded; that account can still receive the first-setup reward once.
| Path | Purpose |
|---|---|
AscNet/ |
Main host process. Starts the TCP game server and ASP.NET SDK server. |
AscNet.GameServer/ |
TCP game protocol, request handlers, commands, combat/settlement logic. |
AscNet.SDKServer/ |
HTTP SDK/config/login/KRSDK endpoints. |
AscNet.Common/ |
Shared database models, MessagePack schemas, config, utility code. |
AscNet.Table/ |
Table generator/parser support. |
AscNet.Test/ |
Focused compatibility harness and regression checks. |
Resources/ |
Runtime configs, current client tables, data fixtures, notices. |
proxy.py |
mitmproxy script that routes client HTTP traffic back to local AscNet. |
run_steam.py |
Steam/PC bridge runner for AscNet + proxy + optional MongoDB + launch command. |
launch-pgr-ascnet.sh |
macOS/CrossOver launch example for the Steam client. |
Minimum local tooling:
- .NET SDK 8
- MongoDB reachable at
127.0.0.1:27017, ormongodavailable forrun_steam.py --with-mongo - Python 3 for
run_steam.py - mitmproxy/mitmdump for Steam/PC bridge mode
- A local Punishing: Gray Raven PC/Steam installation for client testing
Optional/macOS-specific:
- CrossOver or another Wine launcher if you use
launch-pgr-ascnet.sh
Start MongoDB first, then run:
dotnet run --project AscNet/AscNet.csproj -- --urls http://127.0.0.1:8080Default config values come from AscNet.Common/Config.cs:
| Setting | Default |
|---|---|
| Game server host | 127.0.0.1 |
| Game server port | 2335 |
| MongoDB host | 127.0.0.1 |
| MongoDB port | 27017 |
| MongoDB database | asc_net |
Resources/Configs/config.json may be left empty to use those defaults, or populated with overrides.
Basic local bridge with MongoDB managed by the runner:
python3 run_steam.py --with-mongoRun AscNet, proxy traffic, and launch the client command:
python3 run_steam.py --with-mongo --launch-cmd ./launch-pgr-ascnet.shUseful options:
python3 run_steam.py --helpCommon options:
| Option | Purpose |
|---|---|
--sdk-url http://127.0.0.1:8080 |
Local SDK/config URL exposed by AscNet. |
--proxy-host 127.0.0.1 |
mitmproxy bind host. |
--proxy-port 8081 |
mitmproxy bind port. |
--with-mongo |
Start local MongoDB if it is not already reachable. |
--ascnet-username test |
Local AscNet account used for Steam login handoff. |
--ascnet-password test |
Password used when creating that local account. |
--gate-fallback-username <name> |
Map unknown Steam/KRSDK gate logins to an existing local account. |
--seed-krsdk-cache |
Opt in to writing local AscNet account data into KRSDK cache files. |
--no-proxy |
Run only AscNet; skip mitmproxy. |
--no-smoke |
Skip config smoke checks before launching. |
--proxy-log <path> |
Write redacted request/response diagnostics. |
--launch-cmd ... |
Command to start after AscNet/proxy are ready. |
The runner sets:
ASCNET_PUBLIC_HTTP_ORIGINASCNET_GATE_FALLBACK_USERNAME- proxy variables for the launch command
ASCNET_PROXY_TARGETASCNET_PROXY_LOG
The runner can create or verify a local account before the client launches:
python3 run_steam.py --with-mongo --ascnet-username test --ascnet-password testThe underlying account endpoints are:
POST /api/AscNet/registerPOST /api/AscNet/loginPOST /api/AscNet/verifyGET /api/Login/Login
Steam/KRSDK login callbacks can be mapped to the local account through ASCNET_GATE_FALLBACK_USERNAME.
Run the focused compatibility harness:
dotnet run --project AscNet.Test/AscNet.Test.csprojRun one focused check:
dotnet run --project AscNet.Test/AscNet.Test.csproj -- --player-gender-compat-onlyAvailable focused switches:
--notify-login-compat-only
--stage-bookmark-compat-only
--mainline2-exhibition-compat-only
--mainline-treasure-reward-compat-only
--boss-single-login-compat-only
--guide-table-compat-only
--player-cost-time-upload-compat-only
--record-player-point-compat-only
--player-gender-compat-only
--board-mutual-push-compat-only
--character-progression-persistence-compat-only
--exp-level-compat-only
--story-course-reward-compat-only
--pr2-quality-compat-only
--current-client-notice-endpoints-only
Build the main projects:
dotnet build AscNet.Common/AscNet.Common.csproj
dotnet build AscNet.GameServer/AscNet.GameServer.csproj
dotnet build AscNet.SDKServer/AscNet.SDKServer.csproj
dotnet build AscNet.Test/AscNet.Test.csproj
dotnet build AscNet/AscNet.csprojLocal runtime state should stay out of commits:
.runtime/.runtime/mongo.runtime/proxy-flows.log- build outputs under
bin/andobj/
Do not commit runtime logs, MongoDB files, client binaries, or captured credentials.
- This remains a compatibility/research server, not a complete production backend.
- Some modules are still skeletal or best-effort.
- Steam support is local-bridge based: it relies on local SDK/config responses plus mitmproxy routing.
- HTTPS proxying for pinned KRSDK hosts may break; the runner keeps HTTPS proxying opt-in through
--proxy-https. launch-pgr-ascnet.shis an example for one macOS/CrossOver setup and should be edited for other machines.
Original AscNet project:
https://github.com/rafi1212122/AscNet
This branch is intended to document and preserve the current-client compatibility work separately from upstream.