mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2024-11-16 11:42:43 +08:00
Improve: get /rules return proxy now
This commit is contained in:
parent
9aa8e734ac
commit
610ff7194d
|
@ -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