浏览代码

Fix clash api proxy type

世界 3 年之前
父节点
当前提交
ad14719b14
共有 1 个文件被更改,包括 15 次插入3 次删除
  1. 15 3
      experimental/clashapi/proxies.go

+ 15 - 3
experimental/clashapi/proxies.go

@@ -70,18 +70,30 @@ func proxyInfo(server *Server, detour adapter.Outbound) *badjson.JSONObject {
 	case C.TypeSocks:
 	case C.TypeSocks:
 		clashType = "Socks"
 		clashType = "Socks"
 	case C.TypeHTTP:
 	case C.TypeHTTP:
-		clashType = "Http"
+		clashType = "HTTP"
 	case C.TypeShadowsocks:
 	case C.TypeShadowsocks:
 		clashType = "Shadowsocks"
 		clashType = "Shadowsocks"
 	case C.TypeVMess:
 	case C.TypeVMess:
-		clashType = "Vmess"
+		clashType = "VMess"
 	case C.TypeTrojan:
 	case C.TypeTrojan:
 		clashType = "Trojan"
 		clashType = "Trojan"
+	case C.TypeHysteria:
+		clashType = "Hysteria"
+	case C.TypeWireGuard:
+		clashType = "WireGuard"
+	case C.TypeShadowsocksR:
+		clashType = "ShadowsocksR"
+	case C.TypeVLESS:
+		clashType = "VLESS"
+	case C.TypeTor:
+		clashType = "Tor"
+	case C.TypeSSH:
+		clashType = "SSH"
 	case C.TypeSelector:
 	case C.TypeSelector:
 		clashType = "Selector"
 		clashType = "Selector"
 		isGroup = true
 		isGroup = true
 	default:
 	default:
-		clashType = "Socks"
+		clashType = "Direct"
 	}
 	}
 	info.Put("type", clashType)
 	info.Put("type", clashType)
 	info.Put("name", detour.Tag())
 	info.Put("name", detour.Tag())