Allows you to dockerize zapret + dnscrypt-proxy and access them via any proxy protocol supported by sing-box
Based on https://github.com/F33RNI/zapret-v2ray-docker [deprecated]
https://docs.docker.com/engine/install/
git clone https://github.com/F33RNI/zapret-sing-box-docker.git
cd zapret-sing-box-docker./build.shEdit
.envfile if needed
All configs are located in configs/ dir
- sing-box official documentation: https://sing-box.sagernet.org/configuration/
- dnscrypt-proxy official documentation: https://github.com/DNSCrypt/dnscrypt-proxy/wiki/Configuration
- zapret official documentation: https://github.com/bol-van/zapret?tab=readme-ov-file#nfqws
Use provided strategies-converter-tester.sh script to fetch and parse windows .bat strategies from strategies-converter-tester_strategies.txt and edit configs/zapret.conf accordingly
Or you can start the container (by calling start.sh) and use strategies-converter-tester.sh with test argument to test parsed strategies:
# Start the container
TZ="Etc/UTC" ./start.sh
# Parse and test ALL strategies from strategies-converter-tester_strategies.txt using custom URL
TEST_URL="https://cp.cloudflare.com" ./strategies-converter-tester.sh testYou can specify custom URLs or local filepaths to windows .bat strategies inside strategies-converter-tester_strategies.txt and custom lists (URLs or local file paths) used by them inside strategies-converter-tester_lists.txt
PORTS="127.0.0.1:2080:2080" TZ="Etc/UTC" ./start.shPlease see comments in the
.envfile for more infoNOTE: To start without -d / --detach arg, use
./start.sh nd/./start.sh nodetachinstead
# Check zapret logs
tail -f logs/zapret.log
# Check dnscrypt-proxy logs
tail -f logs/dnscrypt-proxy.log
# Check sing-box logs
tail -f logs/sing-box.logcurl --proxy "127.0.0.1:2080" --head -L https://youtube.comSimply run
./stop.sh rmSpecify
rmargument to this script to remove the container
You can apply new config files without restarting the container. For that, simply run
./reload.shOptionally, to see logs after reload you can run
./reload.sh && tail -f logs/sing-box.log
Simply start the container and run
./blockcheck.shSo
./start.sh
# Wait a few seconds
./blockcheck.shOutput will be written into logs/blockcheck.log
To edit domains, add DOMAINS variable to the .env file and run ./build.sh script again
/lib/systemd/system/zapret-sing-box-docker.service
[Unit]
Description=zapret-sing-box-docker service
After=docker.service network-online.target
Requires=docker.service network-online.target multi-user.target
[Service]
Type=simple
WorkingDirectory=/path/to/zapret-sing-box-docker
Environment=PORTS="0.0.0.0:2080:2080" TZ="Etc/UTC"
ExecStartPre=/usr/bin/sleep 5
ExecStart=/path/to/zapret-sing-box-docker/start.sh nd
ExecStop=/path/to/zapret-sing-box-docker/stop.sh rm
ExecReload=/path/to/zapret-sing-box-docker/reload.sh
Restart=no
User=your-user-name
Group=your-user-name
[Install]
WantedBy=multi-user.targetsudo systemctl daemon-reload
sudo systemctl enable --now zapret-sing-box-docker.serviceWith that service you can reload container by typing
sudo systemctl reload zapret-sing-box-docker.service