diff --git a/app/src/main/kotlin/com/neko/v2ray/AppConfig.kt b/app/src/main/kotlin/com/neko/v2ray/AppConfig.kt index 4f5c6165..7b9f3f95 100644 --- a/app/src/main/kotlin/com/neko/v2ray/AppConfig.kt +++ b/app/src/main/kotlin/com/neko/v2ray/AppConfig.kt @@ -153,6 +153,7 @@ object AppConfig { const val WIREGUARD = "wireguard://" const val TUIC = "tuic://" const val HYSTERIA2 = "hysteria2://" + const val HY2 = "hy2://" /** Give a good name to this, IDK*/ const val VPN = "VPN" diff --git a/app/src/main/kotlin/com/neko/v2ray/util/AngConfigManager.kt b/app/src/main/kotlin/com/neko/v2ray/util/AngConfigManager.kt index 80d3adb4..4969db2b 100644 --- a/app/src/main/kotlin/com/neko/v2ray/util/AngConfigManager.kt +++ b/app/src/main/kotlin/com/neko/v2ray/util/AngConfigManager.kt @@ -11,6 +11,7 @@ import com.google.gson.JsonSerializationContext import com.google.gson.JsonSerializer import com.google.gson.reflect.TypeToken import com.neko.v2ray.AppConfig +import com.neko.v2ray.AppConfig.HY2 import com.neko.v2ray.R import com.neko.v2ray.dto.* import com.neko.v2ray.util.MmkvManager.settingsStorage @@ -51,7 +52,7 @@ object AngConfigManager { VlessFmt.parse(str) } else if (str.startsWith(EConfigType.WIREGUARD.protocolScheme)) { WireguardFmt.parse(str) - } else if (str.startsWith(EConfigType.HYSTERIA2.protocolScheme)) { + } else if (str.startsWith(EConfigType.HYSTERIA2.protocolScheme) || str.startsWith(HY2)) { Hysteria2Fmt.parse(str) } else { null