mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2024-11-16 11:42:43 +08:00
feat: Converter Shadowsocks UoT support
This commit is contained in:
parent
52f4cb599a
commit
4c5853e5e7
|
@ -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["name"] = name
|
||||||
ss["type"] = scheme
|
ss["type"] = scheme
|
||||||
|
@ -297,6 +297,9 @@ func ConvertsV2Ray(buf []byte) ([]map[string]any, error) {
|
||||||
ss["password"] = password
|
ss["password"] = password
|
||||||
query := urlSS.Query()
|
query := urlSS.Query()
|
||||||
ss["udp"] = true
|
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") {
|
if strings.Contains(query.Get("plugin"), "obfs") {
|
||||||
obfsParams := strings.Split(query.Get("plugin"), ";")
|
obfsParams := strings.Split(query.Get("plugin"), ";")
|
||||||
ss["plugin"] = "obfs"
|
ss["plugin"] = "obfs"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user