Feature Request: Add API Support for Editing/Updating YAML Configs, Proxy Providers, and Rule Providers #2400
Replies: 1 comment 1 reply
-
|
First, we must acknowledge that this functionality itself is valuable. However, it's crucial to recognize that providing the ability to view, modify, and replace local files via a RESTful API is extremely dangerous. Many users may not have properly configured their API secrets or may be using weak passwords. If this functionality is provided by the kernel, it creates a massive attack surface (currently, there are numerous exploits that use the RESTful API to modify the The APIs provided by Until a sufficiently robust solution is found to address these security issues, this proposal will not be considered. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello!
I would like to propose adding functionality to the API that allows editing and replacing YAML configuration files, as well as proxy provider and rule-provider files located inside the Mihomo container (in the working directory).
The purpose of this request is to enable the development of full-featured web panels with visual configuration for Mihomo. I experimented with a simple file-server–style API in Go, and it worked perfectly for modifying configs inside the container.
This is just a basic example, but if Mihomo natively included such API capabilities, it could open a new era of web-based panels for the project. It might even inspire the creation of server-side management panels similar to 3x-ui, but powered by Mihomo — which would be amazing for the community.
I hope this idea will be positively considered.
Below is a small mihomo-file-api.go example I used:
With the binary startup command:
Beta Was this translation helpful? Give feedback.
All reactions