How to Troubleshoot WinDivert Service Conflicts in zapret: Complete Guide
WinDivert service conflicts occur when multiple DPI-bypass tools lock the kernel driver in a RUNNING or STOP_PENDING state, preventing zapret from starting its packet capture service.
The Flowseal/zapret-discord-youtube repository uses the WinDivert driver to intercept and modify network packets, bypassing Deep Packet Inspection (DPI) blocks on Discord and YouTube. When other applications like GoodbyeDPI or conflicting winws instances install their own WinDivert services, the driver enters a locked state that stops zapret from initializing. Understanding how to troubleshoot WinDivert service conflicts ensures you can restore network bypass functionality without system reboots or reinstallation.
What Causes WinDivert Service Conflicts
Windows only allows one instance of the WinDivert kernel driver (WinDivert64.sys) to be loaded at a time. When another tool registers a WinDivert-based service under a different name—such as GoodbyeDPI, discordfix_zapret, or custom winws1 services—it occupies the driver exclusively. If that service crashes or enters a STOP_PENDING state, the driver remains locked, causing zapret's winws.exe to fail with "service already exists" errors.
According to the source code in service.bat (lines 64-71), the diagnostics routine first queries the driver state using sc query "WinDivert" to determine if the conflict exists before attempting remediation.
Using the Built-in Diagnostics Routine
The repository includes an automated diagnostics block (:service_diagnostics) that handles most conflict scenarios without manual intervention.
Run the Diagnostics Menu
Execute the diagnostic routine by selecting menu option 10 from service.bat. This triggers the automated check at lines 64-71:
service.bat 10
The script performs the following sequence:
- Checks if
winws.exeis currently running to avoid stopping an active zapret instance - Queries the WinDivert driver state (lines 64-71)
- If the driver is active while zapret is not running, attempts to stop and delete the service
Automated Conflict Resolution
When the initial driver deletion fails, the script iterates through a hard-coded list of known conflicting services at lines 80-96. The routine executes net stop followed by sc delete for each service:
- GoodbyeDPI
- discordfix_zapret
- winws1
- winws2
After removing these services, the script retries the WinDivert driver removal and reports success or persistent failure.
Manual Troubleshooting Steps
If the automated diagnostics fail, perform manual cleanup using administrative Command Prompt or PowerShell.
Step 1: Verify winws.exe Status
Ensure no zapret processes are running before clearing driver locks:
tasklist /FI "IMAGENAME eq winws.exe"
If winws.exe appears in the output, terminate it forcefully:
taskkill /IM winws.exe /F
This check prevents the script from accidentally stopping a functioning zapret instance while cleaning up external conflicts.
Step 2: Stop and Delete the WinDivert Driver
Execute the following commands to remove the primary driver service (lines 74-78):
net stop "WinDivert"
sc delete "WinDivert"
If Windows reports "The service is not started," proceed to delete it anyway to clear registry entries.
Step 3: Remove Conflicting Services
Manually stop and delete known conflicting services that may hold the driver reference:
net stop "GoodbyeDPI"
sc delete "GoodbyeDPI"
net stop "discordfix_zapret"
sc delete "discordfix_zapret"
net stop "winws1"
sc delete "winws1"
net stop "winws2"
sc delete "winws2"
These commands mirror the logic found in the :service_diagnostics block (lines 80-96), ensuring no residual service handles block the driver.
Step 4: Verify Driver Removal
Confirm the driver is completely removed:
sc query "WinDivert" | findstr /i "RUNNING STOP_PENDING"
If the command returns no results, the driver is cleared and ready for zapret to install its own instance.
Reinstalling the WinDivert Driver
Persistent conflicts may indicate corrupted driver binaries. Replace the driver files with fresh copies from the repository:
- Delete existing binaries:
bin\WinDivert64.sysandbin\WinDivert.dll - Extract fresh copies from the latest release archive
- Re-run
service.batand select Install Service, or launch anygeneral*.batstrategy
The README.md file in the repository notes that some antivirus software flags WinDivert as a potentially unwanted application (PUA). Temporarily disable real-time scanning if the driver fails to install after cleanup.
Summary
- WinDivert conflicts arise when multiple DPI-bypass tools attempt to load the same kernel driver simultaneously
- Automated resolution is available through
service.batmenu option 10, which runs the:service_diagnosticsroutine (lines 64-96) - Manual cleanup requires stopping
winws.exe, deleting theWinDivertservice, and removing conflicting services likeGoodbyeDPIordiscordfix_zapret - Driver verification ensures no RUNNING or STOP_PENDING states remain before restarting zapret
- Fresh installation of driver binaries resolves corruption issues that survive service deletion
Frequently Asked Questions
Why does the WinDivert conflict happen?
WinDivert registers a kernel-mode driver (WinDivert64.sys) that Windows allows only one instance of at a time. When another tool installs a service using the same driver—common with DPI bypass tools—the driver becomes locked, preventing zapret from creating its service. This manifests as "service already exists" or "cannot start driver" errors when launching winws.exe.
Can I run GoodbyeDPI and zapret simultaneously?
No. Both tools rely on the WinDivert packet filter driver, and Windows enforces exclusive access. Running them simultaneously causes the second tool to fail with driver initialization errors. You must stop and delete one service (sc delete "GoodbyeDPI") before starting the other.
What if sc delete fails with "access denied"?
Run Command Prompt as Administrator. If the error persists, the driver may be held by a zombie process. Reboot the system to release kernel locks, then immediately run the cleanup commands before starting any other network tools. As a last resort, delete bin\WinDivert64.sys manually in Safe Mode.
How do I know if the conflict is resolved?
After running the cleanup commands, execute sc query "WinDivert". If the service displays "STATE: 1 STOPPED" or "The specified service does not exist as an installed service," the conflict is resolved. You can then launch service.bat to install the zapret service or run a general strategy batch file to verify packet capture begins without errors.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →