make tun config compatible with premium

This commit is contained in:
Clash-Mini
2022-01-05 00:33:42 +08:00
parent 14917c8af1
commit 9475799615
11 changed files with 180 additions and 121 deletions

View File

@ -23,7 +23,6 @@ type Rule struct {
func getRules(w http.ResponseWriter, r *http.Request) {
rawRules := tunnel.Rules()
rules := []Rule{}
for _, rule := range rawRules {
rules = append(rules, Rule{
@ -31,6 +30,7 @@ func getRules(w http.ResponseWriter, r *http.Request) {
Payload: rule.Payload(),
Proxy: rule.Adapter(),
})
}
render.JSON(w, r, render.M{