Deezer & Electron
Table of Contents
Fuck Spotify⌗
Me and Spotify have broken up for good.
From songs that were available one day and unavailable the next, to suspending my account for “unauthorized copying of copyrighted material”. Of which I never did because Spotify only provides 160kbps~, and that’s “Premium” quality according to them.
After deciding Spotify were just not playing nice anymore I decided to switch, and I went with Deezer.
Deezer my beloved⌗
Deezer, the French music streaming service, founded in 2007, provides everything you could ever want. Music, Podcasts, Radio and the occasional Music Video for those who listen with their eyes. And with the added bonus of offering FLAC, for those who aren’t audiophiles, that’s basically as good as it gets for digital audio in stereo format.
Unfortunately they only offer 128kbps to free users, which is roughly what Spotify offers its free users too. Luckily Deezer can’t, or more just not interested in, protect their premium streams.
Deezer also throws ads in streams as well as in the sidebar. Not nice.

ARL Tokens⌗
A lot of people want Premium features for free. In the past, the way to do this was by sharing “ARL” tokens. These tokens worked like a login key for Deezer. People posted them on forums and subreddits to help others get access.
It didn’t last long. Deezer noticed when accounts logged in from many places. The tokens were revoked. Sometimes the accounts were suspended. This method faded out quickly.
Account Proxy⌗
Now, things work differently. Instead of sharing tokens, people use proxies. You send your request for a song to a proxy server. The proxy uses its own Premium account to get the track. Then it sends the track back to you.
This method has been around for a while. Deezer hasn’t stopped it yet. For now, it’s the main way people get HiFi streams without paying. But finding a working Proxy is rare.
dzunlock.js⌗
dzunlock.js is a User Script for tampermonkey(or any other user script loader) that would proxy the requests for you to a provided proxy so you could stream HiFi right in your browser without an account. With the added bonus of removing ads, how nice.
dzunlock.js’s original Proxy had the format of “PROXY/get_url”, this is what we want to keep a note of.

But we’ve hit a snag, the proxy in the script is dead. Now what?
Echo for Android⌗
Echo is an Android player that offers a way to unify streaming providers in one App. Deezer? Yep. Spotify? If you want. Jellyfin? Why not. YouTube Music? Of course.
While the app is great and I do use it, it’s not what I’m here for. The Deezer extension for Echo offers HiFi Premium features for free. But how?
After a quick poke around the deezer extension, I find this.
suspend fun getMediaUrl(track: Track, quality: String): JsonObject {
...
val request = Request.Builder()
.url("https://lufts-dzmedia.fly.dev/get_url")
.post(requestBody)
.build()
...
}
This extension redirects stream requests to another domain. Much like the dzunlock.js proxy did, it ends with “/get_url”. Could it be as simple as swapping it?
I give it a go, replacing the old proxy with the one from the extension, and…

No ads and HiFi unlocked!
Deezer Desktop App⌗
Because companies are lazy these days, they release desktop versions of their services with Electron. It’s a glorified browser with some native desktop features. All you need to know is it’s a cheap way to release a desktop app. It also sucks for memory usage, Tauri all the way.

Luckily it being an Electron app means it’s just their web player really. So we can, with a bit of finagling, get dzunlock.js into the desktop app.
First we need the asar tool. Electron apps are stored in this format, .asar, for reasons I don’t really care about.
We use the asar tool to extract Deezer’s “app.asar” into a “app” directory, this gives us html and javascript files that make up the Deezer desktop app.
We can then modify and repack the asar file, reopen Deezer and check for changes. But first we need to modify dzunlock.js to work with Electron.
dzunlock.js requires aesjs, so first we download and place aesjs.min.js
into the app/build directory and put const aesjs = require("./aesjs.min.js")
at the very top of dzunlock.js. This fixes the aesjs calls.
We also need to change unsafeWindow
to window
as dzunlock.js is now running within the page context.
Now with dzunlock.js
and aesjs.min.js
inside the app/build directory, we need to get Deezer to inject dzunlock.js for us. Where better to do that than the index.html
, right after the div with id="dzr-app"
, we can place a <script src="./dzunlock.js"></script>
. This makes the index.html
fetch the script and load it.
Fingers crossed 🤞
Repack the app folder into app.asar. Restart Deezer and…

It really is that easy!
Potential future changes I’d make⌗
Now I know I can run whatever I want in the Deezer desktop app, I’m thinking themes and a way to somehow get downloads to work. It shouldn’t be too hard since I have things in place now.