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 {
|
||||
Name string `json:"name"`
|
||||
Payload string `json:"type"`
|
||||
Proxy string `json:"proxy"`
|
||||
}
|
||||
|
||||
type GetRulesResponse struct {
|
||||
|
@ -31,6 +32,7 @@ func getRules(w http.ResponseWriter, r *http.Request) {
|
|||
rules = append(rules, Rule{
|
||||
Name: rule.RuleType().String(),
|
||||
Payload: rule.Payload(),
|
||||
Proxy: rule.Adapter(),
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user