Improve: get /rules return proxy now

This commit is contained in:
gVisor bot 2018-10-06 14:19:06 +08:00
parent 9aa8e734ac
commit 610ff7194d

View File

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