- Network
- A
How I Made an App to Bypass Discord and YouTube on macOS
How I Made an App to Bypass Discord and YouTube on macOS
Why this was needed
Since the fall of 2024, the situation with access to Discord and YouTube in Russia has become, to put it mildly, complicated. VPNs are an option, but:
Paid services cost money and reduce speed
Free ones leak data
Not all work reliably
Setting up a VPN for each device is a hassle
Moreover, providers block not at the IP level (which would be much worse), but at the DPI level — Deep Packet Inspection. This means they analyze network packets and, upon seeing a request to discord.com or youtube.com, drop the connection. This can be bypassed locally, without any servers — you just need to modify the packets correctly so that the DPI system "doesn't recognize" them.
There is a great project zapret by bol-van, which does exactly that. But there’s a catch — it’s a console tool with a lot of parameters and keys. Great for technical people. For others — the entry threshold is too high. And also...
Mac users left out
This was the main headache. Almost all existing GUI solutions for bypassing DPI work only on Windows. If you're on a Mac — you were offered either to fiddle around in the terminal with tpws or... buy a VPN. And there is a huge percentage of Mac users among IT professionals and creatives. They also need Discord for work and communication.
I decided to fix this.
What came out of it
UnblockPro is a desktop application that:
Works with one click. Literally. Click "Connect" — Discord and YouTube are up and running.
Automatically selects a bypass strategy. No need to know what your provider is and what DPI it uses. The application tests 15+ strategies and finds a working one.
Works on macOS. Intel, Apple Silicon (M1/M2/M3/M4) — it doesn't matter. This is probably the only GUI application for bypassing DPI on a Mac.
Works on Windows. Full support with NSIS installer and portable version.
Not a VPN. Does not route traffic through third-party servers. Everything happens locally. Speed does not drop. Ping does not increase.
Open-source. All code is open. No telemetry, no backdoors.
GitHub: github.com/by-sonic/unblock-pro
Download: Releases
How it works under the hood
macOS: tpws + system SOCKS proxy
On Mac, tpws from the zapret project is used. This is a local SOCKS5 proxy that modifies the TCP packets passing through it.
Workflow scheme:
Browser → System SOCKS proxy (127.0.0.1:1080) → tpws → Internet
↓
Packet modification:
• split-pos (splitting)
• disorder (disruption of order)
• hostcase (changing case)
• tlsrec, oob, methodeol...
The application automatically:
Launches tpws with the necessary parameters
Configures the system SOCKS proxy via
networksetupChecks the connection with a real request to Discord/YouTube
If it doesn't work — tries the next strategy
On shutdown or crash — resets proxy settings
Windows: winws + WinDivert
On Windows, the approach is different. winws.exe operates at the network driver level through WinDivert and intercepts packets "on the fly," without a proxy:
Browser → Windows network stack → WinDivert intercepts packets
↓
winws modifies packets:
• dpi-desync=multisplit
• dpi-desync=fake,fakedsplit
• dpi-desync-fooling=ts,badseq
→ Packets go to the network
No proxy is needed, no system configuration is required. But administrator rights are necessary — WinDivert operates at the kernel level.
15 strategies for macOS, 9 for Windows
This is probably the most important part. Different providers use different DPI hardware. What works for Rostelecom may not work for MTS. And subsidiaries have their own specifics.
The strategies are based on the analysis of Flowseal/zapret-discord-youtube (22k+ stars) and our own testing. Here are examples for macOS:
Category | Strategy | What it does |
|---|---|---|
Basic |
| Breaks packet + disrupts fragment order |
TLS-aware |
| Considers TLS records when splitting |
Host manipulation |
| Adds EOL to HTTP method |
OOB |
| Uses out-of-band data |
Combined |
| oob + methodeol + split + disorder + hostdot |
Minimal |
| Only splitting (last resort) |
On Windows, the strategies are different — they use multisplit, fake, fakedsplit, multidisorder with various parameters seqovl, fooling, and repeats.
The application cycles through them automatically. Usually, a working strategy is found within 10–30 seconds.
Technical details that had to be resolved
Problem 1: zapret binaries
The application needs tpws (macOS) or winws.exe (Windows). Including them in the package is a bad idea: zapret gets updated, binaries become outdated.
Solution: upon first launch, the application downloads the latest release of zapret from the GitHub API:
// Dynamically get the URL of the latest release
const response = await fetch(
'https://api.github.com/repos/bol-van/zapret/releases/latest'
);
const release = await response.json();
const zipAsset = release.assets.find(a => a.name.match(/^zapret-.*\.zip$/));
Downloading with a progress bar, unpacking, checking — everything is automatic.
Problem 2: cygwin1.dll on Windows
winws.exe is built with a dependency on Cygwin. Simply copying the exe is not enough. You need cygwin1.dll, cygstdc++-6.dll, and other libraries.
Solution: copy all files from the winws.exe directory, not just the hardcoded list:
const dirFiles = fs.readdirSync(winwsDir);
for (const file of dirFiles) {
if (file === 'winws.exe') continue;
fs.copyFileSync(
path.join(winwsDir, file),
path.join(platformDir, file)
);
}
Problem 3: Checking the functionality of the strategy
It is not enough to just run tpws — you need to ensure that the strategy actually works. I made a multi-step check:
Running tpws with a timeout
TCP check: is port 1080 listening
Setting the system proxy
Actual curl request through SOCKS to discord.com
If no response — try youtube.com and google.com
Retry on the first endpoint
Only after a successful check is the strategy considered working.
Problem 4: Cleanup on crash
If the application crashes and does not reset the system proxy — the user's internet will stop working. This is unacceptable.
Solution: triple insurance:
before-quit— reset on normal exitOn application startup — reset (in case of previous crash)
process.on('exit')— last resort
Problem 5: macOS Gatekeeper
Apple blocks unsigned applications. A Developer ID certificate costs $99/year — not an option for a free open-source project.
Solution: clear instructions in README and during installation:
xattr -cr /Applications/UnblockPro.app
One command — and Gatekeeper retreats. The code is fully open — the user can verify that there is nothing suspicious inside.
Problem 6: Auto-update
If the user has already installed v1.0 — how to deliver updated strategies? We can't make them download again every time.
Solution: integration of electron-updater. When starting, the application checks GitHub Releases for a new version, downloads it in the background, and suggests restarting:
autoUpdater.on('update-downloaded', (info) => {
// Show banner: "Update v1.2.0 is ready — Restart"
sendUpdateStatus('downloaded', info.version);
});
The user sees a subtle banner and decides when to update.
Stack
What | Why |
|---|---|
Electron | Cross-platform macOS + Windows from a single codebase |
zapret | DPI bypass engine (tpws, winws) |
electron-updater | OTA updates via GitHub Releases |
electron-builder | Build .app/.zip for macOS and .exe for Windows |
GitHub Actions | CI/CD — automatic build on new tag |
sudo-prompt | Request for admin rights (Windows — WinDivert, macOS — networksetup) |
Figures
15 bypass strategies for macOS
9 strategies for Windows
0 external servers — everything works locally
~10 sec average time to find a working strategy
0₽ — completely free and open-source
How to try
macOS
Download the ZIP from Releases
Unzip, drag to “Applications”
In the terminal:
xattr -cr /Applications/UnblockPro.appLaunch and click “Connect”
Windows
Download the installer from Releases
Run it
Click “Connect”
What's next
Linux support (already planned — tpws works natively on Linux)
Whitelist/blacklist domains — bypass DPI only for needed sites
Statistics — how much traffic has passed, which strategy works
Custom strategies — for advanced users
In conclusion
I believe that access to communication tools is a basic need. Discord for many is a work chat, voice calls, community. YouTube is education, documentation, tutorials.
The project is fully open-source. If it was helpful to you — please give it a star on GitHub. If you found a bug or want to help — PRs are welcome.
GitHub: github.com/by-sonic/unblock-pro
Write comment