From ab0daf31c1c84d8bb7079b9b8af49aa7f235bf9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Thu, 15 Sep 2022 13:11:44 +0800 Subject: [PATCH] Fix clash api proxy type --- experimental/clashapi/proxies.go | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/experimental/clashapi/proxies.go b/experimental/clashapi/proxies.go index b32e0cff..38d4304d 100644 --- a/experimental/clashapi/proxies.go +++ b/experimental/clashapi/proxies.go @@ -70,18 +70,26 @@ func proxyInfo(server *Server, detour adapter.Outbound) *badjson.JSONObject { case C.TypeSocks: clashType = "Socks" case C.TypeHTTP: - clashType = "Http" + clashType = "HTTP" case C.TypeShadowsocks: clashType = "Shadowsocks" case C.TypeVMess: - clashType = "Vmess" + clashType = "VMess" case C.TypeTrojan: clashType = "Trojan" + case C.TypeHysteria: + clashType = "Hysteria" + case C.TypeWireGuard: + clashType = "WireGuard" + case C.TypeTor: + clashType = "Tor" + case C.TypeSSH: + clashType = "SSH" case C.TypeSelector: clashType = "Selector" isGroup = true default: - clashType = "Socks" + clashType = "Direct" } info.Put("type", clashType) info.Put("name", detour.Tag())