Configuration Switching Fails Due to mihomo's SAFE_PATHS Restriction
After a recent update to mihomo , configuration switching in ClashN fails due to the new SAFE_PATHS environment variable restriction. According to the mihomo documentation, all paths in the configuration file are now limited to the working directory (workdir) or paths specified in the SAFE_PATHS environment variable (semicolon-separated on Windows). This change, introduced in mihomo v1.19.2 and enforced in later versions (e.g., alpha version 2116640), restricts the /configs RESTful API's path parameter to only allow directories within workdir or SAFE_PATHS.
你自己设置 SAFE_PATHS 后不行?
Thank you for your response! I’ve managed to resolve the issue, but it took considerable effort to identify the cause related to the SAFE_PATHS restriction. My goal is to share this solution with others who might face the same problem. Do you have any suggestions on the best way to document or share this fix for the community? I appreciate your guidance!
Thank you for your response! I’ve managed to resolve the issue, but it took considerable effort to identify the cause related to the SAFE_PATHS restriction. My goal is to share this solution with others who might face the same problem. Do you have any suggestions on the best way to document or share this fix for the community? I appreciate your guidance!
Hi, how did you fix this issue? Could you share it here? Thank you!
The fix is in this commit: https://github.com/cf00-zywzsr/clashN/commit/9829873ca5b8abeb1a91401d80f15b59d983aa70