Skip to content
This repository has been archived by the owner on Nov 14, 2024. It is now read-only.

Commit

Permalink
Hy2 Protocol Share
Browse files Browse the repository at this point in the history
  • Loading branch information
2dust authored and AnGgIt86 committed Sep 30, 2024
1 parent 3b2e1cc commit cfb654a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/src/main/kotlin/com/neko/v2ray/AppConfig.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/kotlin/com/neko/v2ray/util/AngConfigManager.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit cfb654a

Please sign in to comment.