On this page
Network & download
How bytes leave a PC, a drive, or a Remote host and arrive in the installer. Container parsing lives on the install pipeline page. The HTTP contract is on Remote API.
Connection modes
| UI source | Transport | Reader |
|---|---|---|
| LAN install | TCP :2000 then HTTP range | HTTPNSP / HTTPXCI |
| URL / Google Drive | HTTP(S) range | HTTPNSP / HTTPXCI |
| Remote | HTTP(S) + Remote auth | HTTPNSP / Remote XCI stream |
| SD card | Local file | SDMCNSP / SDMCXCI |
| USB HDD | USB volume file | SDMCNSP / SDMCXCI |
| NS-USBloader | USB bulk TUC0/TUL0 | USBNSP / USBXCI |
| MTP | Push to install/ | MtpNspStream |
Target storage: 0 = SD (NcmStorageId_SdCard), else internal (NcmStorageId_BuiltInUser).
URL & path types
| Kind | Example | Handling |
|---|---|---|
| HTTP(S) direct | https://host/a.nsp | curl Range, expect 206 |
| Name fragment | url#Display%20Name | Fragment = label only |
| Google Drive | File ID (keyboard) | drive/v3/files/{id}?key=…&alt=media |
| Remote relative | /files/x.nsp | Joined to the active LAN or WAN base URL |
| JBOD | jbod:{chunk}/{url}/… | Virtual multi-URL file |
| Local path | SD / USB filesystem | No HTTP |
| LAN list | URLs over TCP :2000 | Newline-separated |
HTTP streaming download
Remote installs stream into NCM placeholders: the full file is not parked on the SD card first.
Range: offset-(offset+size-1)→ HTTP 206Accept-Encoding: identity- 3 retries / segment, 2 s delay; timeouts plus a user retry dialog after exhaustion
- NSP vs XCI: bytes 0x100-0x103 ==
HEAD→ XCI, else NSP
Install requests may add Tinfoil headers (Theme, UID, HAUTH, UAUTH, …) plus HTTP Basic when configured. Basic auth is sent only to the configured origin.
LAN protocol - port 2000
- Client →
<switch-ip>:2000 - Receive
u32size, then payload (newline-separated URLs, max ~262 KB) - Each URL installed via HTTP range
- Done: 1-byte
0x00ack + HTTP DROP to host
Y on net screen: manual URL or Google Drive ID.
USB protocol
TUL0 - title list (magic 0x304C5554). TUC0 - file range commands, 8 MB bulk reads.
XCI if title name ends with xc.
Local & MTP
Extensions .nsp .nsz .xci .xcz. SD/HDD: 4 MB sequential reads. MTP: incremental parse on upload to install/.
USB volumes hide dot files and Windows metadata names unless usbHddShowHiddenFiles is on.
LAN Remote discovery
Separate from TCP :2000. Settings → Remote broadcasts UDP 8465 with OWNFOIL_DISCOVER and lists AeroFoil replies (name, IPv4, HTTP port, version, public/private).
Auto connection probes the LAN URL (~2 s) then uses WAN. Auth/catalog errors do not switch endpoints. Details: Remote API.