A regular subscription bundles nodes and rules together - you cannot swap one without the other. proxy-providers extracts the node source into an independently updating unit: your main config holds your own rules, nodes are pulled from one or more providers. This is the backbone of the "multiple providers, one ruleset" setup.
Basic form
proxy-providers:
provider-a:
type: http
url: "https://a.example.com/sub?clash=1"
path: ./providers/provider-a.yaml
interval: 3600
health-check:
enable: true
url: http://www.gstatic.com/generate_204
interval: 300
provider-b:
type: http
url: "https://b.example.com/clash"
path: ./providers/provider-b.yaml
interval: 3600
health-check:
enable: true
url: http://www.gstatic.com/generate_204
interval: 300
Using providers in groups
proxy-groups:
- name: "Select"
type: select
use: # reference providers (note: use, not proxies)
- provider-a
- provider-b
proxies: # hand-written entries can coexist
- DIRECT
- name: "Auto"
type: url-test
use: [provider-a, provider-b]
url: http://www.gstatic.com/generate_204
interval: 300
use and proxies can coexist; all provider nodes expand into the group automatically.
Details and pitfalls
- The url must return Clash-format YAML containing a proxies section. Only nodes are consumed; rules inside a provider file are ignored.
pathmust be unique per provider, ideally under./providers/, to avoid files clobbering each other.- Enable
health-check: url-test and fallback groups depend on its latency data. - A failed update keeps the cached nodes working (the old file is used); look for
provider ... update failedin the logs. - Filter nodes with
filter: "HK|Hong Kong"- keeps only names matching the regex, perfect for per-region groups.
The typical architecture
"Own rules + several providers": the main config carries your routing rules and region-filtered groups; all nodes come from providers. When a provider changes its subscription URL, you edit one line - the rule system stands untouched.