# How to Update Zapret to the Latest IPSet List from GitHub: 3 Methods Explained

> Easily update Zapret to the latest IPSet list from GitHub. Discover three simple methods, including automated scripts and manual downloads, to keep your IP blocking current.

- Repository: [Flowseal/zapret-discord-youtube](https://github.com/Flowseal/zapret-discord-youtube)
- Tags: how-to-guide
- Published: 2026-05-02

---

**You can update Zapret's IPSet filter by running service.bat and selecting option 7, or by manually downloading the remote ipset-service.txt to your local lists/ipset-all.txt file.**

The Flowseal/zapret-discord-youtube repository maintains the **IPSet lists** that control which traffic flows through the DPI bypass. Keeping these filters current is essential for maintaining Discord and YouTube connectivity as network restrictions evolve. This guide explains three methods to synchronize your local [`ipset-all.txt`](https://github.com/Flowseal/zapret-discord-youtube/blob/main/ipset-all.txt) with the latest upstream version hosted on GitHub.

## How the Zapret IPSet Update Mechanism Works

Zapret stores its active IP filters in `lists\ipset-all.txt` within your installation directory. The repository publishes the authoritative version at [`.service/ipset-service.txt`](https://github.com/Flowseal/zapret-discord-youtube/blob/main/.service/ipset-service.txt). When triggered, the update routine downloads from the raw GitHub URL and overwrites your local copy.

According to the source code in `service.bat` (lines 78-79), the batch script defines the update logic within the `:ipset_update` label:

```bat
:ipset_update
set "listFile=%~dp0lists\ipset-all.txt"
set "url=https://raw.githubusercontent.com/Flowseal/zapret-discord-youtube/refs/heads/main/.service/ipset-service.txt"
echo Updating ipset-all...

```

The `%~dp0` prefix ensures the path resolves relative to the script location. The routine fetches from `https://raw.githubusercontent.com/Flowseal/zapret-discord-youtube/refs/heads/main/.service/ipset-service.txt` and replaces your local filter list with the remote content.

## Method 1: Update Zapret IPSet Using the Service Menu (Recommended)

The `service.bat` script provides an interactive manager that handles the download safely. This method ensures proper path handling and error checking.

1. Open Command Prompt in your Zapret installation folder
2. Execute the service manager:

```bat
service.bat

```

3. When the menu appears, type **7** and press Enter to select **"Update IPSet List"**

The script displays "Updating ipset-all..." and automatically refreshes your `lists\ipset-all.txt` file with the latest GitHub version.

## Method 2: Update Zapret IPSet Using PowerShell

For automation or scripting environments, use **Invoke-WebRequest** to fetch the data directly. This method is useful for scheduled tasks or when the batch menu is inaccessible.

Run this command from the repository root:

```powershell
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/Flowseal/zapret-discord-youtube/refs/heads/main/.service/ipset-service.txt" -OutFile "lists\ipset-all.txt"

```

The command downloads the raw content and overwrites your local [`ipset-all.txt`](https://github.com/Flowseal/zapret-discord-youtube/blob/main/ipset-all.txt) without opening an interactive session.

## Method 3: Update Zapret IPSet Using curl

If you have curl available in your Windows environment, you can perform a lightweight command-line update.

Execute this from your Zapret root directory:

```cmd
curl -L -o lists\ipset-all.txt https://raw.githubusercontent.com/Flowseal/zapret-discord-youtube/refs/heads/main/.service/ipset-service.txt

```

The `-L` flag follows redirects to the raw content, while `-o` specifies the output path relative to your installation directory.

## Key Files for Zapret IPSet Updates

Understanding these three components clarifies the update architecture:

- **service.bat**: Contains the `:ipset_update` routine and the interactive menu logic (option 7) that automates the download process
- **.service/ipset-service.txt**: The remote source file hosted in the repository that contains the latest IP ranges and filter definitions
- **lists/ipset-all.txt**: Your local working copy that the Zapret binaries and batch scripts read at runtime

## Summary

- Zapret maintains its IPSet database in `lists\ipset-all.txt` relative to the installation folder
- The authoritative source is hosted at [`.service/ipset-service.txt`](https://github.com/Flowseal/zapret-discord-youtube/blob/main/.service/ipset-service.txt) in the Flowseal/zapret-discord-youtube repository
- Use **service.bat option 7** for the safest automated update with built-in error handling
- Manual updates require downloading from `https://raw.githubusercontent.com/Flowseal/zapret-discord-youtube/refs/heads/main/.service/ipset-service.txt` to your local `lists` directory
- Restart your bypass (run your `general*.bat` script) after updating to load the new IP ranges into active connections

## Frequently Asked Questions

### What is the exact GitHub URL for the latest Zapret IPSet list?

The repository hosts the current IPSet data at `https://raw.githubusercontent.com/Flowseal/zapret-discord-youtube/refs/heads/main/.service/ipset-service.txt`. This is the specific URL that `service.bat` references during its update routine.

### Where does Zapret store the IPSet list locally?

Zapret maintains the active filter in `lists\ipset-all.txt` within your installation folder. The path is constructed in `service.bat` using the `%~dp0` prefix to ensure it remains relative to the script location, preventing path resolution errors.

### Do I need to restart the Zapret bypass after updating the IPSet?

Yes. The bypass service reads [`ipset-all.txt`](https://github.com/Flowseal/zapret-discord-youtube/blob/main/ipset-all.txt) during initialization. After updating the file, you must restart your `general*.bat` script or the service itself to apply the new IP ranges to active network connections.

### Can I automate IPSet updates without using service.bat?

Yes. You can schedule either the PowerShell or curl commands shown above to run periodically using Windows Task Scheduler. Both methods download directly from the GitHub raw URL and overwrite `lists\ipset-all.txt`, achieving the same result as the menu option without requiring interactive prompts.