Proxy Providers
proxy-providers lets you dynamically pull in a batch of nodes from a subscription link, instead of writing each node into proxies by hand. Proxy groups reference a provider using the use field.
Example Config
proxy-providers: provider1: type: http url: "http://test.com" path: ./proxy_providers/provider1.yaml interval: 3600 health-check: enable: true url: https://www.gstatic.com/generate_204 interval: 300 lazy: true filter: "(?i)港|hk|hongkong|hong kong" override: additional-prefix: "[provider1] " udp: true
Basic Fields
provider1)RequiredThe provider's name — must be unique, and it's a good idea to keep it distinct from your proxy group names.
typeRequiredOptional: http/file/inline.
urlRequired when type is httpThe subscription URL.
pathOptionalThe file path to save the download to; if omitted, the URL's MD5 hash is used as the filename. For security reasons, this path is restricted to HomeDir — set the SAFE_PATHS environment variable to allow other locations.
intervalOptionalHow often to update the provider, in seconds.
proxyOptionalDownload/update through a specified proxy.
size-limitDefault: 0The maximum download file size, in bytes; 0 means no limit.
headerOptionalCustom HTTP request headers, e.g. adding an Authorization header for a subscription URL that requires authentication.
payloadRequired when type is inlineNodes defined inline, in the same format as proxies; also used as a fallback if the http/file fetch fails.
Health Check
| Field | Description |
|---|---|
enable | Whether to enable it |
url | The health check URL — https://www.gstatic.com/generate_204 or https://cp.cloudflare.com are recommended |
interval | Check interval, in seconds |
timeout | Timeout, in milliseconds |
lazy | Default true — skips testing nodes in the provider that aren't currently in use |
expected-status | The expected HTTP response status code; see common proxy group fields for syntax |
Override
Bulk-overrides fields on every node in this provider. Common uses:
| Field | Description |
|---|---|
additional-prefix / additional-suffix | Add a common prefix/suffix to every node's name |
proxy-name | Rewrite node names using a regex: pattern to match, target to replace (supports $1 group references) |
udp / tfo / mptcp / skip-cert-verify / dialer-proxy / interface-name / routing-mark / ip-version | Bulk-override common fields, with the same meaning as their regular field descriptions |
up / down | Bulk-set bandwidth (Hysteria/Hysteria2 only) |
udp-over-tcp | Bulk-set UDP over TCP (Shadowsocks only) |
Filtering & Decryption
filter / exclude-filterOptionalFilter/exclude nodes by keyword or regex; separate multiple regexes with `.
exclude-typeOptionalDoesn't support regex — separate with | to exclude by node type, e.g. "ss|http".
age-secret-keyOptionalIf the subscription file is encrypted with age, provide this key to decrypt it automatically; you can generate a key pair with mihomo age keygen.
For the subscription file's content format itself (YAML / URI / Base64), see Proxy Provider Content.