mrh 840cb046d7 新增 clash web UI 多代理访问示例 10 luni în urmă
..
.gitignore f351ee4983 新增 clash 订阅更新的示例 10 luni în urmă
proxy_api_test.py 840cb046d7 新增 clash web UI 多代理访问示例 10 luni în urmă
readme.md 840cb046d7 新增 clash web UI 多代理访问示例 10 luni în urmă
sub.py 840cb046d7 新增 clash web UI 多代理访问示例 10 luni în urmă

readme.md

$env:http_proxy = "http://192.168.2.12:1881"; $env:https_proxy = "http://192.168.2.12:1881";
下载: https://github.com/MetaCubeX/mihomo/releases/tag/v1.19.1
# 解压,然后先别启动,需要配置文件
# 配置文件默认目录
C:\Users\mg\.config\mihomo\config.yaml
# 或者自己订阅配置
python api_t.py

# 然后下载 clash 内核 https://github.com/MetaCubeX/mihomo/releases/download/v1.18.6/mihomo-windows-amd64-go120-v1.18.6.zip
# 启动
.\mihomo-windows-amd64-go120.exe -f G:\code\upwork\zhang_crawl_bio\tests\mytest\mihomo\config_9389.yaml
# 测试
curl https://www.google.com
curl -x http://127.0.0.1:9388 https://www.google.com
curl -i -x http://localhost:9388 https://www.google.com/

API 文档

https://wiki.metacubex.one/api/

API 页面接口测试,填写 external-controller http://127.0.0.1:9791 https://wiki.metacubex.one/startup/web/?h=we

在页面中,可以管理代理,在 配置 - 切换到后端, 可以切换不同的配置文件API接口

在浏览器 debug tool 中点击代理,可以看到请求的http信息:

请求 URL:
http://127.0.0.1:9791/proxies/FSCloud
Request Method:
PUT
{"name":"美国001 - hysteria2"}

WEB UI 面板

https://www.clashverge.dev/friendship.html#_1

面板访问方式,以及构造 URL 后端

# https://github.com/MetaCubeX/metacubexd
http://yacd.metacubex.one?hostname=127.0.0.1&port=9791&secret=
# https://github.com/MetaCubeX/Yacd-meta/tree/master
https://metacubex.github.io/metacubexd/#/setup?http=true&hostname=127.0.0.1&port=9792&secret=

# 在上述面板设置好代理地址后,可以用下列命令测试
curl -i -x http://localhost:9389 http://ip-api.com/json/
curl -i -x http://localhost:9389 https://www.google.com
curl -i -x http://localhost:9390 http://ip-api.com/json/
curl -i -x http://localhost:9390 https://www.google.com