yacd
yacd copied to clipboard
面板的默认服务器连接添加当前网页的地址
就是面板通过clash的extern-ui启动的时候,默认的管理地址仍然是127.0.0.1:9090
是否可以通过js获取到当前href,如果href的path是/ui的话就替换默认的管理地址为前面的部分?
yacd支持传参。把host,port,secret拼接上去就行了。
@flyhigherpi 怎么传参有没有实例?我试了下?host=127.0.0.1&port=9090&&secret=xxx无效
不是这意思吧,比如clash跑在路由器上,电脑请求路由器yacd地址192.168.1.1:9090/ui,然后yacd自动连接了 127.0.0.1:9090这当然连不上了,不管clash怎么配置都是没用的,clash压根不在电脑上,
xtoys @.***> 于 2021年9月5日周日 01:24写道:
试试这样 ?
external-controller: 0.0.0.0:9090
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/haishanh/yacd/issues/559#issuecomment-913009146, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACZEDFV5E4GCKKPKF5L4FJLUAJI5XANCNFSM4V4IWH6Q .
@cjwddtc 用腳本,啓動前暴力改html?
@Un1Gfn 不至于,已知直接添加一个localStore就可以,只是希望官方js能主动支持个更方便的方法,
localStorage['yacd.haishan.me'] = '{"clashAPIConfigs":[{"baseURL":"http://127.0.0.1:9090","secret":"password","addedAt":0}]}'