Docs Config Proxy Providers

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

config.yaml YAML
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

Key Name (e.g. provider1)Required

The provider's name — must be unique, and it's a good idea to keep it distinct from your proxy group names.

typeRequired

Optional: http/file/inline.

urlRequired when type is http

The subscription URL.

pathOptional

The 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.

intervalOptional

How often to update the provider, in seconds.

proxyOptional

Download/update through a specified proxy.

size-limitDefault: 0

The maximum download file size, in bytes; 0 means no limit.

headerOptional

Custom HTTP request headers, e.g. adding an Authorization header for a subscription URL that requires authentication.

payloadRequired when type is inline

Nodes defined inline, in the same format as proxies; also used as a fallback if the http/file fetch fails.

Health Check

FieldDescription
enableWhether to enable it
urlThe health check URL — https://www.gstatic.com/generate_204 or https://cp.cloudflare.com are recommended
intervalCheck interval, in seconds
timeoutTimeout, in milliseconds
lazyDefault true — skips testing nodes in the provider that aren't currently in use
expected-statusThe expected HTTP response status code; see common proxy group fields for syntax

Override

Bulk-overrides fields on every node in this provider. Common uses:

FieldDescription
additional-prefix / additional-suffixAdd a common prefix/suffix to every node's name
proxy-nameRewrite 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-versionBulk-override common fields, with the same meaning as their regular field descriptions
up / downBulk-set bandwidth (Hysteria/Hysteria2 only)
udp-over-tcpBulk-set UDP over TCP (Shadowsocks only)

Filtering & Decryption

filter / exclude-filterOptional

Filter/exclude nodes by keyword or regex; separate multiple regexes with `.

exclude-typeOptional

Doesn't support regex — separate with | to exclude by node type, e.g. "ss|http".

age-secret-keyOptional

If 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.