From e5ba91dc16e6e1236598cea8b1d1a2574ebb0256 Mon Sep 17 00:00:00 2001 From: hiddify <114227601+hiddify-com@users.noreply.github.com> Date: Fri, 2 Aug 2024 09:15:53 +0200 Subject: [PATCH] do not parse # and / and small texts --- ray2sing/convert.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ray2sing/convert.go b/ray2sing/convert.go index 2524260..496907a 100644 --- a/ray2sing/convert.go +++ b/ray2sing/convert.go @@ -93,8 +93,11 @@ func GenerateConfigLite(input string) (string, error) { var outbounds []T.Outbound counter := 0 for _, config := range configArray { - + if len(config) < 5 || config[0] == '#' || config[0] == '/' { + continue + } detourTag := "" + chains := strings.Split(config, "&&detour=") for _, chain := range chains { fmt.Printf("%s", chain)