mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2026-04-22 16:17:16 +08:00
fix: convert accept obfs/obfs-host as aliases for mode/host in ss v2ray-plugin URL (#2712)
This commit is contained in:
@@ -453,10 +453,18 @@ func ConvertsV2Ray(buf []byte) ([]map[string]any, error) {
|
||||
"host": pluginInfo.Get("obfs-host"),
|
||||
}
|
||||
} else if strings.Contains(pluginName, "v2ray-plugin") {
|
||||
mode := pluginInfo.Get("mode")
|
||||
if mode == "" {
|
||||
mode = pluginInfo.Get("obfs")
|
||||
}
|
||||
host := pluginInfo.Get("host")
|
||||
if host == "" {
|
||||
host = pluginInfo.Get("obfs-host")
|
||||
}
|
||||
ss["plugin"] = "v2ray-plugin"
|
||||
ss["plugin-opts"] = map[string]any{
|
||||
"mode": pluginInfo.Get("mode"),
|
||||
"host": pluginInfo.Get("host"),
|
||||
"mode": mode,
|
||||
"host": host,
|
||||
"path": pluginInfo.Get("path"),
|
||||
"tls": strings.Contains(plugin, "tls"),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user