From 4c5853e5e79a0cc555aac4d504c0b0a90defdc73 Mon Sep 17 00:00:00 2001 From: H1JK Date: Sat, 5 Nov 2022 06:41:07 +0000 Subject: [PATCH] feat: Converter Shadowsocks UoT support --- common/convert/converter.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/common/convert/converter.go b/common/convert/converter.go index 238e241b..24043a41 100644 --- a/common/convert/converter.go +++ b/common/convert/converter.go @@ -287,7 +287,7 @@ func ConvertsV2Ray(buf []byte) ([]map[string]any, error) { } } - ss := make(map[string]any, 20) + ss := make(map[string]any, 10) ss["name"] = name ss["type"] = scheme @@ -297,6 +297,9 @@ func ConvertsV2Ray(buf []byte) ([]map[string]any, error) { ss["password"] = password query := urlSS.Query() ss["udp"] = true + if query.Get("udp-over-tcp") == "true" || query.Get("uot") == "1" { + ss["udp-over-tcp"] = true + } if strings.Contains(query.Get("plugin"), "obfs") { obfsParams := strings.Split(query.Get("plugin"), ";") ss["plugin"] = "obfs"