mihomo-kit/templates/providers/15-sub.each.yaml

33 lines
1.3 KiB
YAML

# own servers kept in the subscription, named "[MY] ...", for group MY (the main
# provider leaves them out); a provider of its own because on whitelist and the
# phone they go through MY-EXIT. Router: not a second download, reads the file the
# main provider saves (mihomo watches it; ./providers exists before the start,
# ovpn_routes_write). Phone: FlClash moves provider files to paths of its own,
# so the subscription is fetched once more. Nodes with an entry of their own
# (MY_NODE_ENTRIES) are left out here for <id>-my-via-<entry> (providers/16-myvia).
${SUB_NAME}-my:
type: file #@router
path: ./providers/${SUB_NAME}.yaml #@router
type: http #@mobile
url: "${SUB_URL}" #@mobile
path: ./providers/${SUB_NAME}-my.yaml #@mobile
interval: 3600 #@mobile
proxy: ${@SUB_PROXY} #@mobile
filter: "(?i)\\[MY\\]"
exclude-filter: "${@@SUB_MY_EXCLUDE}"
override: #@my_exit
dialer-proxy: MY-EXIT #@my_exit
override: #@uplink,!my_exit
dialer-proxy: UPLINK #@uplink,!my_exit
header: #@mobile
User-Agent: ["${SUB_UA}"] #@mobile
${@@SUB_HEADERS} #@mobile
health-check:
enable: true
url: "https://www.gstatic.com/generate_204"
interval: 300 #@!lite
interval: 600 #@lite
timeout: 3000
lazy: false #@!lite
lazy: true #@lite