sheltupdate is a fork of GooseUpdate, which replicates Discord's update API, and injects mods and tweaks into the served modules.
Changes from GooseUpdate:
- Fixes to bring it up to date for 2024
- Different branches, for use with shelter
- Hugely refactored and converted to use much more modern technology (axios -> fetch, fastify -> hono, etc.)
- A more robust patch system that improves multi-mod support
Check the shelter documentation for install instructions.
The uwu.network instance of sheltupdate hosts the branches exactly as found in this repository:
shelter- injects sheltervencord- injects Vencordequicord- injects Equicordbetterdiscord- injects BetterDiscordmoonlight- injects Moonlightreactdevtools- adds React Developer Tools to your clientspotify_embed_volume- adds a volume slider to Spotify embedsyt_ad_block- removes ads in embeds and in the Watch Together activityyt_embed_fix- makes more videos viewable from within Discord (like UMG blocked ones)native_titlebar- replaces Discord's custom titlebar with Windows' native one
- Install SheltUpdate's dependencies with
npm install - Copy
config.example.jsontoconfig.jsonand modify it to your liking, then runnode src/index.js.
The required files to deploy are src, node_modules, branches, config.json, package.json and CHANGELOG.md.
Run the container as so:
docker run -v /path/to/your/config.json:/config.json --tmpfs /tmp -p 8080:8080 ghcr.io/uwu/sheltupdatesheltupdate stores downloaded update responses and patched modules in its cache directory, which defaults to /tmp/sheltupdate-cache inside the Docker image. Mounting /tmp as tmpfs using --tmpfs /tmp makes that cache live in RAM rather than on disk if the host supports it, but is completely optional.
Omitting this flag will leave the cache in the container, so it can end up in some disk space being wasted. To mitigate this, the disk cache does not persist between container restarts and is instead cleared on each startup.
If resource usage is a concern, the cache limits can be configured under the cache section in config.json.
In a docker compose file, you specify this with:
services:
sheltupdate:
# rest of entry omitted here
tmpfs:
- /tmpDiscord fetches the update API URL from a settings.json file stored in various directories depending on your operating system.
Said directories are found below:
- Windows:
%appdata%\discord<channel>\settings.json
- Mac:
~/Library/Application Support/discord<channel>/settings.json
- Linux:
- Package Manager/tar.gz Installation:
~/.config/discord<channel>/settings.json - Flatpak:
~/.var/app/com.discordapp.Discord/config/discord<channel>/settings.json
- Package Manager/tar.gz Installation:
Set UPDATE_ENDPOINT and NEW_UPDATE_ENDPOINT in settings.json as follows:
"UPDATE_ENDPOINT": "https://<instance URL>/branch"
"NEW_UPDATE_ENDPOINT": "https://<instance URL>/branch/"SheltUpdate also supports including multiple branches in updates by separating their names with a +, like https://<instance URL>/branch1+branch2.
SheltUpdate branches patch discord_desktop_core with files stored in branches/<branch category>/<branch name>/.
Branches must have a main.js file to handle their injection in their branch directory, which is prepended to Discord's base index.js of the module.
They must have a meta.js file that exports a name and description, and can optionally export a setup function,
which may be asynchronous and will be periodically run. Use this to download other branch files you need.
As arguments, you will be passed an absolute path to a folder to leave your files in,
which on scheduled setup reruns may or may not contain your previous set-up files, and a log function.
You have access to node and @electron/asar.
They may optionally include a preload.js file to supplement their injection,
which will automatically be injected for you by sheltupdate.
sheltupdate will not automatically pick up and inject anything into the renderer, but it is trivial to implement this in your preload.
// main.js
require('mod.js')// preload.js (optional)
const { webFrame } = require("electron");
webFrame.top.executeJavaScript("console.log('HELLO FROM THE RENDERER');");If other files are in the branch directory, they will be added the module directory.
GooseUpdate was originally written by Ducko.
The shelter desktop injector has been contributed to by most of uwu.network at this point,
and is the basis of the shelter branch here.
The vencord branch is very very loosely based on the Kernel vencord loader.
sheltupdate is a passion project made with love, primarily by Hazel and wiz, with help from other uwu.network contributors.