mirror of
https://gitclone.com/github.com/MetaCubeX/Clash.Meta
synced 2025-02-23 07:13:17 +08:00
Fix: GET /rules format
This commit is contained in:
parent
03c563a58e
commit
990bba4a05
@ -15,8 +15,8 @@ func ruleRouter() http.Handler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type Rule struct {
|
type Rule struct {
|
||||||
Name string `json:"name"`
|
Type string `json:"type"`
|
||||||
Payload string `json:"type"`
|
Payload string `json:"payload"`
|
||||||
Proxy string `json:"proxy"`
|
Proxy string `json:"proxy"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -30,7 +30,7 @@ func getRules(w http.ResponseWriter, r *http.Request) {
|
|||||||
var rules []Rule
|
var rules []Rule
|
||||||
for _, rule := range rawRules {
|
for _, rule := range rawRules {
|
||||||
rules = append(rules, Rule{
|
rules = append(rules, Rule{
|
||||||
Name: rule.RuleType().String(),
|
Type: rule.RuleType().String(),
|
||||||
Payload: rule.Payload(),
|
Payload: rule.Payload(),
|
||||||
Proxy: rule.Adapter(),
|
Proxy: rule.Adapter(),
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user