Skip to content

Merge Configuration ​

Adding New Configuration ​

WARNING

If multiple Merge configurations are created, they will be executed in sequence according to the order of activation. After modifying the configuration, you need to re-enable it. When effective, the card will have a color indicator (right-click the config and select Disable then Enable, or click the đŸ”Ĩ button at the top right).

INFO

If the image is too small to see clearly, right-click the image and open it in a new tab. If the image file is large, please wait patiently.

Adding Script

Configuration Explanation ​

INFO

For configuration syntax, please refer to the Configuration Syntax Documentation. For rules configuration, please refer to the Rules Configuration Documentation.

javascript
# Prepend rules

prepend-rules: []

# Prepend rule providers

prepend-rule-providers: {}

# Prepend proxies

prepend-proxies: []

# Prepend proxy providers

prepend-proxy-providers: {}

# Prepend proxy groups

prepend-proxy-groups: []

# Append rules

append-rules: []

# Append rule providers

append-rule-providers: {}

# Append proxies

append-proxies: []

# Append proxy providers

append-proxy-providers: {}

# Append proxy groups

append-proxy-groups: []

# Override original config (see example)

::: tips Besides adding configurations to the original config, you can also override configuration items in the original config file. The configuration items to override must have the same syntax as in the original config file. :::

Configuration Examples ​

Custom Rules ​

::: warning Rule configurations generally use prepend-rules instead of append-rules (using append-rules inserts after the original MATCH rule, causing the inserted rules to be invalid). :::

For example:

  • Website www.baidu.com uses node đŸ‡¯đŸ‡ĩ6 Japan - East Optimized (hy2).
  • Website www.google.com uses node 🇰🇷9 Korea - Network Optimized (hy2).
  • Website www.youtube.com uses strategy group â™ģī¸ Auto Select.
  • Subnet 10.11.12.0/24 uses direct strategy group DIRECT.
javascript
prepend-rules:

- DOMAIN-SUFFIX,baidu.com,đŸ‡¯đŸ‡ĩ6 Japan - East Optimized (hy2)
- DOMAIN-SUFFIX,google.com,🇰🇷9 Korea - Network Optimized (hy2)
- DOMAIN-SUFFIX,youtube.com,â™ģī¸ Auto Select
- IP-CIDR,10.11.12.0/24,DIRECT,no-resolve

prepend-rule-providers: {}

prepend-proxies: []

prepend-proxy-providers: {}

prepend-proxy-groups: []

append-rules: []

append-rule-providers: {}

append-proxies: []

append-proxy-providers: {}

append-proxy-groups: []

Overriding Original Configuration ​

::: warning Configurations overridden by Clash Verge cannot be successfully overridden. The program must ensure these parts are controlled by itself to maintain normal functionality (e.g., mixed-port, log-level, external-controller, etc.). Other parts of the configuration not specified will remain unchanged. :::

For example, if the original config enabled ipv6 for DNS and you want to disable it now.

javascript
prepend-rules: []

prepend-rule-providers: {}

prepend-proxies: []

prepend-proxy-providers: {}

prepend-proxy-groups: []

append-rules: []

append-rule-providers: {}

append-proxies: []

append-proxy-providers: {}

append-proxy-groups: []

# Override DNS config

dns:
  ipv6: false