Skip to content

Commit

Permalink
Hy2 Protocol Share
Browse files Browse the repository at this point in the history
  • Loading branch information
2dust committed Sep 28, 2024
1 parent 7ff445e commit 3688dd4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions V2rayNG/app/src/main/kotlin/com/v2ray/ang/AppConfig.kt
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,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
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.v2ray.ang.AppConfig
import com.v2ray.ang.AppConfig.HY2
import com.v2ray.ang.R
import com.v2ray.ang.dto.*
import com.v2ray.ang.util.MmkvManager.settingsStorage
Expand Down Expand Up @@ -52,7 +53,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 3688dd4

Please sign in to comment.