360 Secure SkillHub
360 安全技能中心

Mihomo Proxy Management

该 Skill 提供通过 REST API 管理 mihomo(Clash Meta)代理实例的操作指引,涵盖版本与代理状态查询、策略组节点切换、延迟测试、连接查看与清理、DNS/FakeIP 缓存刷新、配置重载与实例重启。需用户提供主机与 Secret,命令以 curl 和 jq 实现。包含重启、清空连接等状态变更操作,材料未提供权限控制与错误处理说明。

分类:自动化
jonasgao
jonasgao
热度 22.47
最近更新 2026-05-11 17:36:59

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add jonasgao/mihomo
兼容性
通用兼容
联网要求
需要联网
数据出网
必须出网
Metadata
name
mihomo
description
Manage mihomo (Clash Meta) proxy instances via REST API. Use when user mentions mihomo, clash, proxy switching, or needs to: (1) Check proxy status/version, (2) Switch proxy nodes, (3) Test proxy delays, (4) Manage connections, (5) Reload config or restart, (6) Flush DNS/FakeIP cache, (7) Monitor traffic/logs.

Mihomo Proxy Management

Control mihomo instances via REST API.

Connection Info

Default values, override with user-provided:

  • Host: http://127.0.0.1:9090
  • Secret: Ask user if not provided

Store connection in environment for session:

MIHOMO_URL="http://host:9090"
MIHOMO_SECRET="your-secret"

Common Operations

Check Status

# Version
curl -s -H "Authorization: Bearer $MIHOMO_SECRET" "$MIHOMO_URL/version"

# All proxies
curl -s -H "Authorization: Bearer $MIHOMO_SECRET" "$MIHOMO_URL/proxies" | jq '.proxies | keys'

# Active connections count
curl -s -H "Authorization: Bearer $MIHOMO_SECRET" "$MIHOMO_URL/connections" | jq '.connections | length'

Switch Proxy

# Switch node in a group
curl -X PUT -H "Authorization: Bearer $MIHOMO_SECRET" \
  -H "Content-Type: application/json" \
  -d '{"name":"节点名"}' \
  "$MIHOMO_URL/proxies/策略组名"

Test Delay

# Test specific proxy
curl -s -H "Authorization: Bearer $MIHOMO_SECRET" \
  "$MIHOMO_URL/proxies/节点名/delay?url=https://www.gstatic.com/generate_204&timeout=5000"

# Test all proxies in group
curl -s -H "Authorization: Bearer $MIHOMO_SECRET" \
  "$MIHOMO_URL/group/策略组名/delay?url=https://www.gstatic.com/generate_204&timeout=5000"

Manage Connections

# List connections
curl -s -H "Authorization: Bearer $MIHOMO_SECRET" "$MIHOMO_URL/connections" | jq '.connections[] | {id, metadata}'

# Close all
curl -X DELETE -H "Authorization: Bearer $MIHOMO_SECRET" "$MIHOMO_URL/connections"

Cache & Config

# Flush DNS cache
curl -X POST -H "Authorization: Bearer $MIHOMO_SECRET" "$MIHOMO_URL/cache/dns/flush"

# Flush FakeIP cache
curl -X POST -H "Authorization: Bearer $MIHOMO_SECRET" "$MIHOMO_URL/cache/fakeip/flush"

# Reload config
curl -X PUT -H "Authorization: Bearer $MIHOMO_SECRET" "$MIHOMO_URL/configs?force=true"

# Restart mihomo
curl -X POST -H "Authorization: Bearer $MIHOMO_SECRET" "$MIHOMO_URL/restart"

API Reference

For complete endpoint list, see references/api.md.