Skip to content

TheGrapeJuice/mangoplugin

Repository files navigation

MangoPlugin

A Millennium plugin for Steam that enables game manifest unlocking, automatic DLC unlocking, game requests, and multiplayer fix functionality—all directly within the Steam client interface.


What It Does

MangoUnlock integrates directly into Steam's WebKit-based UI through the Millennium modding framework. When you browse a game page in Steam, the plugin injects custom buttons that allow you to:

  • Unlock Games — Download and install game manifests from community repositories directly to your Steam installation
  • Unlock All DLC — Automatically fetch and apply DLC manifests for owned games
  • Request Games — Submit game requests to a proxy API for games not yet available in manifest repositories
  • Apply Multiplayer Fixes — Download and install online-fix patches for multiplayer functionality, with automatic file backup and restore
  • Auto-Update — The plugin checks GitHub releases on startup and prompts you to update when new versions are available

The plugin communicates between a JavaScript frontend (injected into Steam's browser) and a Python backend that handles file operations, API calls, and manifest processing.


Installation

Run the following command in PowerShell:

irm https://plugin.mangounlock.dev | iex
MangoPlugin.mp4

What the Installer Does

  1. Closes Steam — Force-stops any running Steam processes
  2. Detects Steam Installation — Reads the Steam path from HKCU:\Software\Valve\Steam
  3. Applies Initial Modifications
    • Removes outdated steam.cfg and package\beta files
    • Installs SteamTools DLL's
    • Adds Windows Defender exclusions for plugin directories
    • Configures SteamTools registry keys at HKCU:\Software\Valve\Steamtools
  4. Installs Millennium — Downloads and runs the Millennium installer if not present (requires v2.34.0+)
  5. Installs MangoUnlock Plugin
    • Fetches latest release from GitHub API (api.github.com/repos/TheGrapeJuice/mangoplugin/releases/latest)
    • Extracts MangoUnlock.zip to Steam\plugins\MangoUnlock
    • Compares versions and skips if already up-to-date
  6. Launches Steam with Millennium and MangoUnlock loaded

The plugin auto-updates on Steam startup. When a new version is available, a modal prompts you to update, downloads the release ZIP, extracts it in-place, and restarts Steam.


Tech Stack

Frontend (JavaScript)

Component Purpose
MangoUnlock.js Injects UI elements into Steam's WebKit pages
Millennium API Millennium.callServerMethod() for frontend-backend RPC
DOM Manipulation Creates buttons, modals, overlays, progress bars
URL Parsing Extracts appid from Steam store URLs via regex (/app\/(\d+)/)

Key Features:

  • Dynamic button injection based on manifest availability
  • Real-time download progress polling (600ms intervals)
  • Modal system for confirmations, updates, and status displays
  • CSS injection for Steam-themed button styling

Backend (Python)

Library Purpose
Millennium Plugin framework integration
httpx Async-capable HTTP client for API requests
threading Background update checks, download polling
zipfile Archive extraction for updates and manifests
subprocess External archiver execution (WinRAR/7-Zip) for multiplayer fixes
winreg Windows registry access for Steam path detection
shutil File operations, backup management

Deployment & Hosting

Service Purpose
Vercel Hosts the PowerShell installer script
GitHub Releases Plugin distribution and version management
Cloudflare Workers Proxy API (mangoplugin.grapejuice897.workers.dev)

How It Works

Architecture

┌──────────────────────────────────────────────────────────────┐
│                        Steam Client                          │
│  ┌────────────────────────────────────────────────────────┐  │
│  │                     WebKit Browser                     │  │
│  │  ┌──────────────────────────────────────────────────┐  │  │
│  │  │                  MangoUnlock.js                  │  │  │
│  │  │               • Button injection                 │  │  │
│  │  │               • Modal/overlay UI                 │  │  │
│  │  │               • Progress polling                 │  │  │
│  │  └───────────────────────┬──────────────────────────┘  │  │
│  └──────────────────────────│─────────────────────────────┘  │
│                             │ Millennium.callServerMethod()  │
│  ┌──────────────────────────▼─────────────────────────────┐  │
│  │                   main.py (Backend)                    │  │
│  │          • Manifest downloading & installation         │  │
│  │          • DLC unlocking                               │  │
│  │          • Multiplayer fix management                  │  │
│  │          • Auto-update system                          │  │
│  └───────────────────────┬────────────────────────────────┘  │
└──────────────────────────│───────────────────────────────────┘
                           │
     ┌─────────────────────┼─────────────────────┐
     ▼                     ▼                     ▼
┌───────────────┐   ┌─────────────────┐   ┌───────────────┐
│  GitHub API   │   │   Cloudflare    │   │  Steam Store  │
│  • Releases   │   │  Workers Proxy  │   │      API      │
│  • Manifests  │   │  • Downloads    │   │ • App details │
│               │   │  • Requests     │   │ • Categories  │
└───────────────┘   └─────────────────┘   └───────────────┘

API Calls & Endpoints

Game Request System

POST https://mangoplugin.grapejuice897.workers.dev/request/{appid}

Multiplayer Check

GET https://store.steampowered.com/api/appdetails?appids={appid}

Auto-Update

GET https://api.github.com/repos/TheGrapeJuice/Mango-Unlock-Plugin/releases/latest

Manifest Installation Process

  1. Check Availability — Check's API for {appid} existence
  2. Download Manifest — Fetch raw manifest files via API
  3. Write to Depotcache — Install to Steam\depotcache\ directory
  4. Signal Completion — Update frontend state, prompt for Steam restart

Multiplayer Fix System

  1. Detect Game Folder — Parse appmanifest_*.acf files in Steam library folders
  2. Check for Multiplayer — Query Steam API for category IDs
  3. Download Fix Archive — Stream .rar/.zip/.7z from online-fix sources
  4. Backup Existing Files — Copy originals to .bak before overwriting
  5. Extract with Archiver — Use WinRAR or 7-Zip via subprocess
  6. Log Changes — Store fix metadata in multiplayer_fixes.json for removal

Caching Strategy

Cache TTL Purpose
MANIFEST_CACHE 15 min GitHub API responses
DLC_CACHE 30 min DLC availability data
MULTIPLAYER_CACHE 30 min Steam category lookups

File Structure

MangoUnlock/
├── plugin.json              # Millennium plugin manifest
├── requirements.txt         # Python dependencies (httpx, selenium)
├── backend/
│   ├── main.py              # Core plugin logic (2400+ lines)
│   ├── update.json          # Auto-update configuration
│   ├── multiplayer.json     # Multiplayer fix settings
│   └── restart_steam.cmd    # Steam restart helper
└── public/
    ├── mango.ps1            # PowerShell installer script
    ├── MangoUnlock.js       # Frontend UI injection
    └── steamdb-webkit.css   # Legacy CSS (deprecated)

Features

Feature Description
One-Click Unlock Add games via manifest without leaving Steam
DLC Unlocking Automatic DLC manifest fetching and installation
Game Requests Request unavailable games through proxy API
Multiplayer Fixes Apply online-fix patches with automatic backup/restore
Auto-Updates GitHub release checking with in-app update prompts
Progress Tracking Real-time download progress with polling
Steam Restart Integrated restart button for applying changes

Dependencies

Python

  • httpx==0.27.2 — HTTP client with connection pooling
  • requests — Fallback HTTP library
  • selenium — Browser automation (optional features)

System

  • Millennium v2.34.0+ — Steam modding framework
  • SteamTools — DLL-based Steam modification
  • WinRAR or 7-Zip — Archive extraction for multiplayer fixes

License

This project is provided as-is for educational purposes.


About

Lets you download games straight from steam using SteamTools and Millennium. Easy online fix button on game store page for a one click fix. Credits to melly for the inspiration

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors