How to Configure Custom Domain Lists for Zapret Bypass: Complete Guide
You can customize Zapret’s traffic filtering by editing the *-user.txt files in the lists/ directory, which are automatically appended to the built-in lists when the service starts.
The Flowseal/zapret-discord-youtube repository provides a DPI bypass tool that relies on plain-text domain and IP lists to determine which traffic to intercept. Learning how to configure custom domain lists for Zapret bypass allows you to extend the default filtering rules without modifying the upstream files, ensuring your personal overrides persist through updates.
Understanding Zapret's Domain List Hierarchy
Zapret uses a layered file structure in the lists/ folder to decide which connections to process. The system distinguishes between default lists (maintained by the project) and user lists (your custom additions).
| Default List | Purpose | User-Editable Counterpart |
|---|---|---|
lists/list-general.txt |
Domains routed through Zapret (subdomains included automatically) | lists/list-general-user.txt |
lists/list-exclude.txt |
Domains explicitly exempt from filtering | lists/list-general-user.txt |
lists/ipset-all.txt |
Raw IP addresses and CIDR blocks to filter | lists/ipset-all.txt (edit directly) |
lists/ipset-exclude.txt |
IPs and CIDRs exempt from filtering | lists/ipset-exclude.txt (edit directly) |
When Zapret starts—either via service.bat or the general*.bat scripts—it checks for the existence of *-user.txt files. If they do not exist, the system creates empty placeholders automatically. During runtime, the contents of user files are appended to their corresponding default lists, creating a combined filter set.
Editing User Domain Lists
Adding Domains to the Bypass List
To route additional domains through the WinDivert driver, edit the user whitelist:
-
Open
lists/list-general-user.txtin any text editor (create it if it does not exist):notepad lists\list-general-user.txt -
Append one domain per line without protocols or trailing slashes:
example.com another-site.org -
Save the file and reload Zapret.
Important: Entries in list-general-user.txt automatically match all subdomains. Adding example.com will also match sub.example.com and www.example.com.
Excluding Specific Hosts
To prevent specific hosts from being intercepted—even if their parent domain appears in the general list—use the exclusion file:
notepad lists\list-exclude-user.txt
Add exact hostnames to bypass filtering:
blocked.example.com
specific.cdn.net
The exclude list takes precedence. If a hostname exists in both list-general.txt (or its user counterpart) and list-exclude-user.txt, Zapret will skip processing for that request.
Configuring Raw IP Filters
For IP-based filtering rather than domain names, edit the IPset files directly. These do not have separate user counterparts; modifications are made to the base files.
To add a CIDR block to the filter list:
# Edit lists/ipset-all.txt
203.0.113.0/24
198.51.100.50
To exempt specific IPs from filtering:
# Edit lists/ipset-exclude.txt
192.168.1.100
10.0.0.0/8
How the Filtering Logic Works
According to the source implementation in general*.bat, Zapret evaluates traffic according to this priority order:
-
General Matching: The requested hostname is checked against the combined content of
list-general.txtpluslist-general-user.txt. If no match is found, the connection proceeds normally. -
Exclusion Check: If a match exists in the general lists, the hostname is then verified against
list-exclude.txtpluslist-exclude-user.txt. If found here, the request is allowed without DPI bypass. -
IP Evaluation: For raw IP connections (no hostname), the same logic applies using
ipset-all.txtandipset-exclude.txt.
This hierarchy ensures that user exclusions override general inclusions, giving you granular control over the filtering behavior.
Reloading and Verifying Your Configuration
After modifying any list files, you must refresh the running configuration:
Option 1: Use Service Menu
Run service.bat and select Update IPSet List to reload domain and IP lists without restarting the service.
Option 2: Restart via Batch Scripts
Execute any general*.bat script (e.g., general.bat or general_alt.bat) to restart Zapret with the new lists loaded.
Option 3: Verify Configuration Use the built-in test suite to confirm your custom domains are being intercepted:
- Run
service.bat - Select Run Tests
- Check the output to verify your domains from
list-general-user.txtappear in the active filter set
Summary
- User files prevent override: Edit
lists/list-general-user.txtandlists/list-exclude-user.txtrather than the default files to preserve changes through updates. - Automatic subdomain matching: Entries in general lists match the domain and all its subdomains automatically.
- Exclusion precedence: Hostnames in exclude lists are always allowed, even if they match general filter criteria.
- IP support: Raw IP and CIDR filtering is configured directly in
lists/ipset-all.txtandlists/ipset-exclude.txt. - Runtime appending: User lists are concatenated with default lists when Zapret initializes, creating a unified filter set.
Frequently Asked Questions
What is the difference between list-general.txt and list-general-user.txt?
lists/list-general.txt contains the default domains maintained by the Flowseal/zapret-discord-youtube project and should not be edited directly. lists/list-general-user.txt is your personal override file that gets appended to the default list on startup. Using the user file ensures your custom domains persist when you download repository updates.
Do I need to include subdomains like www.example.com?
No. The filtering engine automatically matches subdomains when you add a root domain to lists/list-general-user.txt. Entering example.com will match www.example.com, api.example.com, and any other subdomains. However, for exclusions in list-exclude-user.txt, you should specify the exact hostname you want to exempt if it differs from the root domain.
Why are my changes not taking effect immediately?
Zapret loads and concatenates the list files only during initialization. If you edit the files while the service is running, you must reload the configuration by running service.bat and selecting Update IPSet List, or by restarting the application using one of the general*.bat scripts. The changes will not apply to existing connections until the lists are reloaded.
Can I block specific IPs instead of domains?
Yes. While Zapret is primarily designed for domain-based DPI bypass, you can filter specific IP addresses or CIDR blocks by editing lists/ipset-all.txt directly. Add one entry per line, such as 203.0.113.5 for a single IP or 203.0.113.0/24 for a subnet. To exempt specific IPs from filtering, add them to lists/ipset-exclude.txt using the same format.
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 →