Improve: get /rules return proxy now

This commit is contained in:
Dreamacro 2018-10-06 14:19:06 +08:00
parent 7b80377849
commit a0f077b091
1 changed files with 2 additions and 0 deletions

View File

@ -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(),
})
}