You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -17,242 +17,286 @@ This request includes the header `'Authorization: Bearer ${secret}'`, where:
17
17
-`?force=true` is a parameter that needs to be included in certain requests
18
18
-`'{"path": "", "payload": ""}'` is the data for the resource to be updated
19
19
20
-
In most cases, the data passed is `'{"path": "", "payload": ""}'`, which can include a new configuration file path.
21
-
22
20
!!! note
23
-
Note that if the path is not in the Clash working directory, please manually set the `SAFE_PATHS` environment variable to add it to the safe path. The syntax of this environment variable is the same as the PATH environment variable parsing rules of this operating system (i.e., semicolon-separated in Windows and colon-separated in other systems).
21
+
If you need to pass a path, please note that if the path is not in the mihomo working directory, please manually set the `SAFE_PATHS` environment variable to add it to the safe path. The syntax of this environment variable is the same as the PATH environment variable parsing rules of this operating system (i.e., semicolon-separated in Windows and colon-separated in other systems).
24
22
25
23
## Logs
26
24
27
25
### `/logs`
28
26
29
-
Request method: `GET`
30
-
31
-
- Retrieve real-time logs.
32
-
33
-
### `/logs?level=log_level`
34
-
35
-
Request Method: `GET`
27
+
!!! info ""
28
+
Retrieve real-time logs
36
29
37
-
- Retrieve logs of a specified level. Possible values: info, debug, warning, error
30
+
- Request method: `GET` / `WS`
31
+
- Optional parameter: `?level=log_level`, where `log_level` can be `info`, `warning`, `error`, `debug`
38
32
39
33
## Traffic Information
40
34
41
35
### `/traffic`
42
36
43
-
Request method: `GET`
37
+
!!! info ""
38
+
Retrieve real-time traffic, measured in kbps
44
39
45
-
-Retrieve real-time traffic, measured in kbps.
40
+
-Request method: `GET` / `WS`
46
41
47
42
## Memory Information
48
43
49
44
### `/memory`
50
45
51
-
Request method: `GET`
46
+
!!! info ""
47
+
Retrieve real-time memory usage, measured in kb
52
48
53
-
-Retrieve real-time memory usage, measured in kb.
49
+
-Request method: `GET` / `WS`
54
50
55
51
## Version Information
56
52
57
53
### `/version`
58
54
59
-
Request method: `GET`
55
+
!!! info ""
56
+
Retrieve the Clash version
60
57
61
-
-Retrieve the Clash version.
58
+
-Request method: `GET`
62
59
63
60
## Cache
64
61
65
62
### `/cache/fakeip/flush`
66
63
67
-
Request method: `POST`
64
+
!!! info ""
65
+
Clear the fake IP cache
68
66
69
-
- Clear the fake IP cache.
67
+
- Request method: `POST`
68
+
69
+
### `/cache/dns/flush`
70
+
71
+
!!! info ""
72
+
Clear the DNS cache
73
+
74
+
- Request method: `POST`
70
75
71
76
## Running Configuration
72
77
73
78
### `/configs`
74
79
75
-
Request method: `GET`
80
+
!!! info ""
81
+
Retrieve basic configuration
76
82
77
-
-Retrieve basic configuration.
83
+
-Request method: `GET`
78
84
79
-
Request method: `PUT`
85
+
!!! info ""
86
+
Reload basic configuration
80
87
81
-
- Reload basic configuration; data must be sent, and the URL must include `?force=true` to enforce execution.
88
+
- Request method: `PUT`
89
+
- Parameter: `?force=true`
82
90
83
-
Request method: `PATCH`
91
+
!!! info ""
92
+
Update basic configuration
84
93
85
-
- Update basic configuration; data must be sent in the format `'{"mixed-port": 7890}'`, modified as needed for the configuration items to be updated.
94
+
- Request method: `PATCH`
95
+
- Data: `'{"mixed-port": 7890}'`
86
96
87
97
### `/configs/geo`
88
98
89
-
Request method: `POST`
99
+
!!! info ""
100
+
Update the GEO database
90
101
91
-
- Update the GEO database; data must be sent.
102
+
- Request method: `POST`
103
+
- Data: `'{"path": "", "payload": ""}'`
92
104
93
105
### `/restart`
94
106
95
-
Request method: `POST`
107
+
!!! info ""
108
+
Restart the kernel
96
109
97
-
- Restart the kernel; data must be sent.
110
+
- Request method: `POST`
111
+
- Data: `'{"path": "", "payload": ""}'`
98
112
99
113
## Updates
100
114
101
115
### `/upgrade`
102
116
103
-
Request method: `POST`
117
+
!!! info ""
118
+
Update the kernel
104
119
105
-
- Update the kernel; data must be sent.
120
+
- Request method: `POST`
121
+
- Data: `'{"path": "", "payload": ""}'`
106
122
107
123
### `/upgrade/ui`
108
124
109
-
Request method: `POST`
125
+
!!! info ""
126
+
Update the panel; [external-ui](../config/general.md#external-user-interface) must be set
110
127
111
-
-Update the panel; [external-ui](../config/general.md#external-user-interface) must be set.
128
+
-Request method: `POST`
112
129
113
130
### `/upgrade/geo`
114
131
115
-
Request method: `POST`
132
+
!!! info ""
133
+
Update the GEO database
116
134
117
-
- Update the GEO database; data must be sent.
135
+
- Request method: `POST`
136
+
- Data: `'{"path": "", "payload": ""}'`
118
137
119
138
## Policy Groups
120
139
121
140
### `/group`
122
141
123
-
Request method: `GET`
142
+
!!! info ""
143
+
Retrieve policy group information
124
144
125
-
-Retrieve policy group information.
145
+
-Request method: `GET`
126
146
127
147
### `/group/group_name`
128
148
129
-
Request method: `GET`
149
+
!!! info ""
150
+
Retrieve specific policy group information
130
151
131
-
-Retrieve specific policy group information.
152
+
-Request method: `GET`
132
153
133
-
Request method: `DELETE`
154
+
!!! info ""
155
+
Clear the fixed selection of the automatic policy group
134
156
135
-
-Clear the fixed selection of the automatic policy group.
157
+
-Request method: `DELETE`
136
158
137
159
### `/group/group_name/delay`
138
160
139
-
Request method: `GET`
161
+
!!! info ""
162
+
Test the nodes/strategy groups within the specified strategy group, return new latency information, and clear the fixed selection of the automatic strategy group
140
163
141
-
-Test the nodes/strategy groups within the specified strategy group, return new latency information, and clear the fixed selection of the automatic strategy group
142
-
-the URL must include `?url=xxx&timeout=5000`, modified as needed.
164
+
-Request method: `GET`
165
+
-Parameter: `?url=xxx&timeout=5000`
143
166
144
167
## Proxies
145
168
146
169
### `/proxies`
147
170
148
-
Request method: `GET`
171
+
!!! info ""
172
+
Retrieve proxy information
149
173
150
-
-Retrieve proxy information.
174
+
-Request method: `GET`
151
175
152
176
### `/proxies/proxies_name`
153
177
154
-
Request method: `GET`
178
+
!!! info ""
179
+
Retrieve specific proxy information
155
180
156
-
-Retrieve specific proxy information.
181
+
-Request method: `GET`
157
182
158
-
Request method: `PUT`
183
+
!!! info ""
184
+
Select a specific proxy
159
185
160
-
- Select a specific proxy; data must be included in the format `'{"name":"Japan"}'`.
186
+
- Request method: `PUT`
187
+
- Data: `'{"name":"Japan"}'`
161
188
162
189
### `/proxies/proxies_name/delay`
163
190
164
-
Request method: `GET`
191
+
!!! info ""
192
+
Test a specified proxy and return new delay information
165
193
166
-
-Test a specified proxy and return new delay information
167
-
-the URL must include `?url=xxx&timeout=5000`, modified as needed.
0 commit comments