mirror of
https://github.com/MetaCubeX/Clash.Meta.git
synced 2025-04-20 01:00:56 +00:00
feat: support hy2 schema parsing
This commit is contained in:
parent
9b130177ab
commit
e11587768b
1 changed files with 2 additions and 2 deletions
|
@ -80,7 +80,7 @@ func ConvertsV2Ray(buf []byte) ([]map[string]any, error) {
|
|||
hysteria2 := make(map[string]any, 20)
|
||||
|
||||
hysteria2["name"] = name
|
||||
hysteria2["type"] = scheme
|
||||
hysteria2["type"] = "hysteria2"
|
||||
hysteria2["server"] = urlHysteria2.Hostname()
|
||||
if port := urlHysteria2.Port(); port != "" {
|
||||
hysteria2["port"] = port
|
||||
|
@ -409,7 +409,7 @@ func ConvertsV2Ray(buf []byte) ([]map[string]any, error) {
|
|||
}
|
||||
plugin := query.Get("plugin")
|
||||
if strings.Contains(plugin, ";") {
|
||||
pluginInfo, _ := url.ParseQuery("pluginName=" + strings.ReplaceAll(plugin, ";", "&"))
|
||||
pluginInfo, _ := url.ParseQuery("pluginName=" + strings.ReplaceAll(plugin, ";", "&"))
|
||||
pluginName := pluginInfo.Get("pluginName")
|
||||
if strings.Contains(pluginName, "obfs") {
|
||||
ss["plugin"] = "obfs"
|
||||
|
|
Loading…
Add table
Reference in a new issue