Skip to content

EN Auto Routing

dongle edited this page Oct 9, 2026 · 3 revisions

Auto Routing

The Auto Routing feature in SniShaper is designed to ensure most websites can be connected without manual configuration. When a requested domain does not match any user-defined "Site Rules," the AutoRouter automatically determines the processing logic. View and configure it via the CLI route get|set|status.

Currently, one Auto Routing mode is supported:


Default Mode

Recommended for most users

Important

Priority Note: Rules manually defined by the user in the "Rules Panel" have the highest priority. The Auto Routing (AutoRouter) only intervenes when the requested domain does not match any existing rules.

  • Workflow:
    1. Listen for the requested domain.
    2. Rule Matching: Check if the domain matches any user-defined site rules. If it matches, execute according to the rule and end the routing logic.
    3. GFWList Query: If no rules match, query the built-in local GFWList.
    4. If not in list: Connect directly (Direct).
    5. If in list:
      • Detect if the target is a Cloudflare node (queries IP via DoH and compares with CIDR).
      • If Cloudflare: Apply MITM + ECH Injection mode; use Cloudflare optimized IP.
      • If not Cloudflare: Apply TLS-RF (TLS Fragmentation) mode; use upstream DoH to query IP.

Technical Details

GFWList Local Cache

Auto Routing relies on the local GFWList cache file (gfwlist_cache.txt, loaded at startup alongside the rules file); there is no network update.

Cloudflare Auto-Identification

The software automatically identifies domains belonging to the Cloudflare infrastructure and prioritizes applying ECH injection strategies.

AutoRouted Tag

In the "Connection Logs," requests processed by Auto Routing are tagged as AutoRouted, making it easy for users to trace routing strategies. If auto-routing fails, you can manually configure a specific rule for that domain.

Clone this wiki locally