Skip to content

host/online: opt-in online mode for local stand-in servers (DM_ONLINE) - #2615

Open
FifteenPen wants to merge 1 commit into
seedds:mainfrom
FifteenPen:pr/online-mode
Open

FifteenPen wants to merge 1 commit into
seedds:mainfrom
FifteenPen:pr/online-mode

Conversation

@FifteenPen

Copy link
Copy Markdown
Contributor

Opt-in online mode (DM_ONLINE=1) for local stand-in servers. It's off by default, and offline behaviour is unchanged.

  • The game's sockets are host sockets. Horizon's errno numbers and O_NONBLOCK are Linux's, not the Mac's (as Online play through Nextendo for NEX and NPLN games: gRPC sockets, MIT sign-in, signed game patches, service profile #2589 found). Poll with a zero timeout always polls once.
  • nn::ssl runs over the host's TLS (ssl_online_apple.m), trusting DM_ONLINE_CA.
  • nifm reports a network, the account has a network service account (DM_ONLINE_TOKEN), and there is a network clock.
  • BCAT is served from a folder (DM_ONLINE_BCAT).
  • The game's names resolve to 127.0.0.1 (DM_ONLINE_HOSTS), and port 443 goes to DM_ONLINE_SERVER. DM_ONLINE_PUBLIC=1 lets other names through.
  • A new profile key, core_mask, sets GetInfo CoreMask for Switch 2 games whose NPDM allows cores 0-5. The default 0x7 is unchanged.

It was tested with The Duskbloods network test against playDB-CNT's stand-in servers: login, regulation download and the hub all work.

…): host sockets, TLS, BCAT, account, network clock, core mask
@github-actions github-actions Bot added host The Horizon host: SVCs, services, threads, memory (dm/host) tools Tools and scripts (dm/tools, scripts) docs Documentation labels Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation host The Horizon host: SVCs, services, threads, memory (dm/host) tools Tools and scripts (dm/tools, scripts)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant