Repository navigation
Expand file tree
/
Copy pathservices.example.toml
More file actions
119 lines (115 loc) · 4.21 KB
/
Copy pathservices.example.toml
File metadata and controls
119 lines (115 loc) · 4.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
[health]
url = "https://www.gstatic.com/generate_204"
interval = 60
timeout = 5000
# One failed check evicts a dead node from fallback groups: with free-pool
# churn this caps 502 batches at ~one interval instead of two. A transient
# blip may move the group off a good node, but fallback moves back up the
# list once the top recovers, so the cost of a false move is one interval.
max_failed_times = 1
expected_status = 204
# Optional single authenticated entry point for clients that support proxy auth.
# Each service below can add username/password; IN-USER routes it to SVC_<name>.
# With credentials, a service no longer needs its own port.
# [dispatcher]
# port = 20000
# Two extra global endpoints, reachable from the LAN like every proxy port.
# The controller stays on 127.0.0.1.
# free_port -> FREE group: every subscription and local pool, no custom proxies.
# custom_port -> CUSTOM group: only proxies from mihomo/providers/mine.yaml.
# The default 17890 endpoint stays the "everything" POOL group.
# [global_pools]
# free_port = 17891
# custom_port = 17892
# Add one [[subscriptions]] block per remote subscription.
# Mihomo accepts Clash/Mihomo YAML, URI lists, and base64 subscriptions.
# The URL stays in this gitignored file.
#
# [[subscriptions]]
# name = "my-vless"
# url = "https://example.com/subscription"
# interval = 21600
#
# Optional per-subscription health probe: applies to this provider and to
# service groups that use only this subscription (mixed groups are rejected
# loudly). Missing keys fall back to the global [health] values. Mihomo
# probes with GET; there is no way to send headers or a body.
#
# [subscriptions.health]
# url = "https://example.com/probe"
# interval = 15
# expected_status = 404
# One [[services]] block per client: a Windows app, or one account behind the
# dispatcher. Up to 300 entries.
#
# port - fixed port for this service, reachable from the LAN. Omit it
# when the service has username/password and reaches the stack
# through [dispatcher].
# primary - name of one proxy from mihomo/providers/mine.yaml. It is tried
# first; generation fails if the name is not in that file.
# subscriptions- free providers used as fallback when primary is down.
# lock_proxy - true pins the account to primary: no fallback, so the client is
# disconnected instead of silently using a free node. Requires
# that fallback and subscriptions are left out.
# fallback - extra named proxies tried after primary, before subscriptions.
#
# Pinned account that survives on the free pool when its proxy dies:
#
# [[services]]
# name = "acc01"
# primary = "my-proxy-01"
# subscriptions = ["my-vless"]
# username = "acc01"
# password = "change-me-at-least-8"
#
# Same account with its own port instead of the dispatcher:
#
# [[services]]
# name = "acc01"
# port = 20001
# primary = "my-proxy-01"
# subscriptions = ["my-vless"]
#
# Account locked to its own proxy, never falls back to a free node:
#
# [[services]]
# name = "acc02"
# primary = "my-proxy-02"
# lock_proxy = true
# username = "acc02"
# password = "change-me-at-least-8"
#
# balance - "round-robin" rotates every connection across the whole pool
# instead of sticking to one node (load-balance group). Requires
# subscriptions, forbids primary/fallback/lock_proxy.
#
# Rotating account: a different exit node on every connection:
#
# [[services]]
# name = "random"
# subscriptions = ["my-vless"]
# balance = "round-robin"
# username = "random"
# password = "change-me-at-least-8"
#
# select - true makes the group a plain select list whose current node
# is switched only from outside (PUT /proxies/SVC_<name>),
# e.g. by an external prober with its own check. Mihomo never
# moves it on its own. Requires subscriptions, forbids
# primary/fallback/lock_proxy/balance.
#
# Externally steered account (a prober container picks the node):
#
# [[services]]
# name = "managed"
# subscriptions = ["my-vless"]
# select = true
# username = "managed"
# password = "change-me-at-least-8"
#
# Plain pool service, no custom proxy at all:
#
# [[services]]
# name = "telegram"
# port = 20001
# subscriptions = ["my-vless"]