zapret4rocket Documentation

repository·master·Indexed 21 days ago

https://github.com/indeecfox/zapret4rocket

A script for installing and managing the latest version of 'zapret' with optimized bypass strategies to restore access to blocked services like YouTube and Discord. Supports VPS and various routers including OpenWRT, Keenetic, MerlinWRT, iStoreOS, and x-wrt. Features include interactive strategy selection via the z4r CLI, domain exception management, SNI fake modification, and specific configurations for Keenetic and ASUS hardware.

Tokens
1.9K
Snippets
4
Records
11
Agent score
27%

What's inside zapret4rocket

  1. Optimize network settings for stability

    master

    To ensure zapret works reliably, especially on routers, follow these best practices:

    • DNS Configuration: Do not use your ISP's DNS. It is highly recommended to use Google DNS (8.8.8.8) or encrypted DNS (DoH/DoT).
    • Disable Hardware Acceleration: Ensure that Network Acceleration (offload) is DISABLED in your router settings. zapret will not work if offloading is enabled.
  2. Manage zapret configuration and domain exceptions

    master

    The script provides menu options to manage how domains are handled by zapret.

    • Domain Exceptions (Menu Item 6): You can add domains to an exclusion list so they are not processed by the bypass strategies. You can add domains in https:// format or as plain domains. You can also add multiple domains at once by separating them with spaces. You can view your current list of exceptions within this menu.
    • Strategy Selection & Domain Matching (Menu Item 1 > 5): You can add domains to a list for strategy testing/selection. Custom domains assigned to specific strategies take priority over the 'indiscriminate mode' (безразборный режим).
    • Indiscriminate Mode (Безразборный режим): When active, the script attempts to find working strategies for unknown traffic. You can configure this mode to include or exclude specific Russian (.ru) domains. Note that adding domains to exceptions requires an update to the config file (via menu item 5) or a reinstallation to ensure they are excluded from UDP strategies as well.
  3. Install and update zapret4rocket

    master

    To install, update, or perform strategy selection, run the following command via SSH. The script is designed to be interactive; for most prompts, you can simply press Enter to accept defaults.

    Installation/Update/Strategy Selection:

    curl -O https://raw.githubusercontent.com/IndeecFOX/z4r/4/z4r && sh z4r

    Post-Installation Usage:

    • Running the script again: If current strategies are not working or you need to select new ones, run the script a second time. Running it a second time also opens the action menu for stopping or removing zapret.
    • CLI Shortcut: After installation, you can launch the script by simply typing z4r in your terminal.
  4. Backup and restore zapret settings

    master

    The script includes mechanisms to prevent data loss during updates or reinstallation:

    • Settings Backup: During updates or reinstallation, you can request a backup of your configured strategies, the current 'fooling' method, and the state of the 'indiscriminate mode'.
    • SNI Backup: If a backup is requested during an update/reinstallation, the current SNI settings are backed up along with other configurations.
    • Config Rollback: You can roll back your configuration to the version used by the previously installed version of zapret if an update causes issues.
  5. Configure requirements and dependencies

    master

    Depending on your environment, you may need to install specific dependencies or adjust settings to ensure the script works correctly.

    General Dependencies

    If curl is missing or errors occur, install it using:

    apt update || opkg update && apt install curl || opkg install curl

    Entware (OpenWRT/Keenetic) Troubleshooting

    If package downloading hangs due to network blocks, switch the Entware mirror:

    sed -i 's|bin.entware.net|entware.diversion.ch|g' /opt/etc/opkg.conf

    ASUS Router

    If you encounter a bash error, install bash and reboot the router:

    opkg install bash

    Windows Clients

    If Windows clients are not working, enable TCP timestamps via CMD:

    netsh interface tcp set global timestamps=enabled
  6. Configure fooling and SNI fake settings

    master

    The script allows fine-tuning of the packet manipulation techniques used to bypass blocks:

    • Fooling Selection: In the first menu item, you can switch between different fooling methods, specifically ts and ts+badsum. Note that for some users, ts+badsum may cause issues with Discord, so you may need to revert to ts if Discord connectivity fails.
    • SNI Fake Modification: For specific strategies (Default RKN list, 2, 4, and 12), you can modify the SNI fake file directly from the script menu. This allows you to change the host used in the TLS Client Hello to bypass detection.
  7. Configure Keenetic router for zapret

    master

    To use zapret on a Keenetic router, follow these steps:

    1. Web Interface Setup: You must manually install the following components in the router's web interface:

      • Протокол IPv6 (IPv6 Protocol)
      • Модули ядра подсистемы Netfilter (Netfilter subsystem kernel modules) — Note: This option only appears after selecting the IPv6 component.
    2. nfqws Policies: The z4r menu includes a specific section for configuring policies:

      • POLICY_NAME: Restricts nfqws operation to devices within the specified policy.
      • POLICY_EXCLUDE=1: Reverses the logic to apply to all devices except those in the specified policy.
      • If the policy is not found in NDMS, zapret will issue a warning and run in standard mode without filtering.
      • If you change the devices in a policy, you may need to run zapret restart if the router does not automatically rebuild netfilter.
  8. Use the z4r CLI for quick strategy selection

    master

    You can bypass the interactive menu and quickly run strategy selection or test specific domains using the z4r command.

    To test a specific domain, use:

    z4r <domain>

    To quickly trigger strategy selection (using predefined indices 1-3), use:

    z4r <1|2|3>

    Note: To ensure the z4r command is available in your system's /bin for quick access, run the script menu at least once and then exit it.

    z4r meduza.io
  9. Access the script menu via the z4r command

    master

    The script provides a shortcut to its interactive menu. Once the proxy link is anchored to your system's /bin directory (which happens automatically after running the menu once), you can launch the full interactive menu by simply typing:

    z4r
    z4r
  10. Review the zapret4rocket changelog

    master

    The project maintains a detailed changelog documenting updates to bypass strategies, menu improvements, and bug fixes for various router OS environments (Keenetic, OpenWRT, MerlinWRT, iStoreOS, x-wrt, etc.).

    Key recent improvements include:

    • Strategy Updates: Regular updates to bypass strategies (e.g., strategies #4, #9, #13) to maintain effectiveness.
    • Web Terminal: Support for activating a web-based terminal (menu item #13) to access the script via a browser.
    • Discord Support: Added support for specific ports (2053, 2083, 2087, 2096, 8443) to assist with Discord services.
    • Performance: Added an option (menu item #11) to enable offload for zapret on supported routers to reduce CPU load and increase speed.
  11. Review the zapret4rocket changelog

    master

    The changelog provides a historical record of updates, fixes, and new features. Key areas of interest for users include:

    • Strategy Updates: Frequent updates to bypass strategies (e.g., updates to strategies 1, 2, 6, 7, 9, 11-17) to adapt to changing censorship environments.
    • Platform Fixes: Specific fixes for MerlinWRT, Keenetic (including Netcraze), and support for apk package managers.
    • Feature Additions:
      • No-analysis mode (безразборный режим): When enabled, it may recommend adding .ru domains to exceptions. Press Enter to add them or 1 to refuse.
      • YouTube Optimization: Separate strategies for googlevideo.com and YouTube interface to prevent one from breaking the other.
      • WhatsApp Bypass: Specific strategies for whatsapp.net.
      • Beta Features: Ability to share selected strategies and receive tips based on provider/city matches.
    • Bug Fixes: Improvements to menu rendering, DNS fallback (using 8.8.8.8 or 1.1.1.1 if GitHub is unreachable), and handling of kernel modules like xt_multiport.ko.