Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NX Simple Downloader

A Nintendo Switch homebrew application that reads a download URL from a .ini configuration file, fetches the file over HTTP or HTTPS, and saves it to a predefined directory on the SD card — overwriting any existing file.

Features

  • HTTP & HTTPS support via libnx BSD sockets and the native Switch SSL service
  • No external portlibs required — no libcurl, no mbedtls package; everything is built on libnx alone
  • Automatic redirects — follows up to 5 HTTP 3xx redirects
  • Progress bar with KB counter and percentage (when Content-Length is known)
  • Chunked transfer (Transfer-Encoding: chunked) support
  • Self-signed certificate support via ssl_verify = false
  • SD card enforcement — the app refuses to write anywhere other than sdmc:/, protecting the Switch NAND from accidental or malicious writes
  • Path traversal protection.. sequences in destination and filename are rejected

Requirements

  • devkitPro with devkitA64 and libnx
  • No additional portlibs needed

Building

# Set the devkitPro environment (adjust path if needed)
export DEVKITPRO=/opt/devkitpro
export DEVKITA64=$DEVKITPRO/devkitA64
export PATH=$DEVKITPRO/tools/bin:$DEVKITA64/bin:$PATH

make

This produces NXSimpleDownloader.nro.

Installation

  1. Copy NXSimpleDownloader.nro to your SD card:

    sdmc:/switch/NXSimpleDownloader/NXSimpleDownloader.nro
    
  2. Create the configuration file at:

    sdmc:/switch/NXSimpleDownloader/config.ini
    

    See config.ini.example for the full reference.

    If config.ini is missing, the app creates a template automatically on first launch.

Configuration

[downloader]

; Full URL of the file to download
url         = https://example.com/myupdate.nro

; Target directory on the SD card (must start with sdmc:/ and end with /)
destination = sdmc:/switch/MyApp/

; Filename to save as (overwrites any existing file)
filename    = myupdate.nro

; SSL certificate verification for HTTPS (default: true)
;   true  = verify against system CA store (recommended)
;   false = skip verification, accepts self-signed certificates
; ssl_verify = false

Options

Key Required Default Description
url Yes Full HTTP or HTTPS URL
destination Yes Target directory, must start with sdmc:/
filename Yes Output filename
ssl_verify No true Set to false to accept self-signed certificates

Security

Check Details
SD card only destination must start with sdmc:/ — writing to NAND (bis:/) or any other mount point is rejected
No path traversal .. segments in destination and filename are blocked
Filename safety / and \ characters in filename are not allowed

Controls

Button Action
+ Exit the app

How It Works

config.ini  ──►  parse URL + path
                      │
                 socket connect (TCP)
                      │
              ┌───────┴────────┐
           HTTP              HTTPS
         (port 80)         (port 443)
              │          libnx SSL service
              │          (system CA store)
              └───────┬────────┘
                 GET request
                      │
               parse response
             (headers + body)
                      │
              write to sdmc:/

License

PolyForm Noncommercial License 1.0.0 — © 2026 Mayo0x0

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages