Rules

Clash Verge Merge / Extended Config: Write Rules That Actually Apply

Treat Merge as a patch: the subscription owns nodes/base rules; Merge holds a few local must-haves. Don’t paste entire converted subscriptions into Merge—unmaintainable on every refresh.

Be in Rule mode before blaming Merge. Concepts: routing; game downloads: Steam DIRECT.

Check your version first: Merge was renamed and rules moved

Plenty of guides still tell you to write prepend-rules into Merge. That was the v1.6.x way and copying it today does nothing. The changelog on the official Extend docs is explicit: v1.7.x renamed Merge config to Extended Configuration and Script config to Extended Script, moved prepend/append into the per-profile visual editor, and limited Extended Configuration to overriding/merging config keys.

Override is the operative word. rules, proxy-groups and proxies are YAML lists, and overriding a list replaces it wholesale. Put three rules entries in Extended Configuration and the provider’s few thousand are gone. Maintainers gave the same answer for proxy-groups in issue #4565, and confirmed prepend/append/delete only work in the GUI editor for a single profile. The + suffix does not change this.

Migration is mechanical:

  • prepend-rules / append-rules move to right-click the profile card → Edit Rules: prepend area for anything that must match first, append area for fallbacks.
  • prepend-proxy-groups / prepend-proxies move to Edit Proxy Groups and its prepend area.
  • Key-value items such as dns, mode, find-process-mode and unified-delay stay in Extended Configuration and behave exactly as before.

There is an equivalent code path: right-click the profile, choose Edit Script, and splice the lists yourself inside main(config, profileName) — for example config.rules = [...myRules, ...config.rules], or merge a new group into config['proxy-groups'], then return config. Scripts pay off when rules must be generated per profile; for a handful of static exceptions the visual editor is less work (scripts). Execution order is global config, global script, profile config, profile script, and later stages can undo earlier ones.

function main(config, profileName) {
  const myRules = [
    'DOMAIN-SUFFIX,example.com,DIRECT',
    'DOMAIN-SUFFIX,internal.corp,Proxy',
  ];
  config.rules = [...myRules, ...config.rules];
  return config;
}

Still on v1.6.x? The old keys keep working there, but every menu name in current docs and forum answers will mismatch what you see, so upgrading costs less than translating.

What belongs in Merge

Good: domain/process DIRECT or force-proxy exceptions; short triage lists. Bad: vendor rule dumps, pasted GEO strategies. Teams: exceptions only, commented, one editor at a time.

Minimal examples and order traps

A few DOMAIN DIRECT/PROXY lines in the prepend area of Edit Rules prove your changes load. The prepend area always sits ahead of the provider ruleset, which is exactly why it replaced prepend-rules. Order matters—specific rules lose to earlier broad matches. "Written but ignored" is often hijacked match or wrong mode. PROCESS-NAME is Windows-friendly; other OSes differ. CFW imports: port exceptions, don’t dump whole files.

When Merge seems dead

  1. Right entry point? Rules belong in the prepend area of Edit Rules; a prepend-rules key in Extended Configuration is ignored since v1.7.x, silently.
  2. Saved and reloaded?
  3. Connections page shows your hit?
  4. Did you pollute subscription body instead of Merge?
  5. Script fighting the same fields (scripts)?

Change DNS after rules so you know what worked (DNS, fake-ip). GEOIP DIRECT can miss overseas sites you meant to proxy—verify on the connections page.

Rollback and watch window

Copy Merge text before edits. Watch ~10 minutes: daily sites, downloaders, AI tools. Slow games/downloaders → process/domain DIRECT, not Global off. AI/dev: Tun & AI.

Acceptance

Hits visible; no collateral; Merge survives subscription refresh. Failure = paste the backup back.