mirror of
https://gitclone.com/github.com/MetaCubeX/Clash.Meta
synced 2025-02-23 02:43:13 +08:00
Improve: get /rules return proxy now
This commit is contained in:
parent
7b80377849
commit
a0f077b091
@ -17,6 +17,7 @@ func ruleRouter() http.Handler {
|
|||||||
type Rule struct {
|
type Rule struct {
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
Payload string `json:"type"`
|
Payload string `json:"type"`
|
||||||
|
Proxy string `json:"proxy"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type GetRulesResponse struct {
|
type GetRulesResponse struct {
|
||||||
@ -31,6 +32,7 @@ func getRules(w http.ResponseWriter, r *http.Request) {
|
|||||||
rules = append(rules, Rule{
|
rules = append(rules, Rule{
|
||||||
Name: rule.RuleType().String(),
|
Name: rule.RuleType().String(),
|
||||||
Payload: rule.Payload(),
|
Payload: rule.Payload(),
|
||||||
|
Proxy: rule.Adapter(),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user