chore: rebuild rule parsing code

This commit is contained in:
wwqgtxx
2025-07-10 11:27:54 +08:00
parent 2b84dd3618
commit 300eb8b12a
6 changed files with 65 additions and 70 deletions

View File

@@ -6,19 +6,11 @@ import (
"net/netip"
"os"
"strconv"
"strings"
"github.com/metacubex/mihomo/adapter/outboundgroup"
"github.com/metacubex/mihomo/common/structure"
)
func trimArr(arr []string) (r []string) {
for _, e := range arr {
r = append(r, strings.Trim(e, " "))
}
return
}
// Check if ProxyGroups form DAG(Directed Acyclic Graph), and sort all ProxyGroups by dependency order.
// Meanwhile, record the original index in the config file.
// If loop is detected, return an error with location of loop.