Fixes in AmneziaVpnService
This commit is contained in:
parent
d7ec611ff4
commit
ef530780bd
1 changed files with 2 additions and 1 deletions
|
|
@ -308,6 +308,7 @@ class AmneziaVpnService : VpnService() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@MainThread
|
||||||
private fun getProtocol(protocolName: String): Protocol =
|
private fun getProtocol(protocolName: String): Protocol =
|
||||||
protocolCache[protocolName]
|
protocolCache[protocolName]
|
||||||
?: when (protocolName) {
|
?: when (protocolName) {
|
||||||
|
|
@ -315,7 +316,7 @@ class AmneziaVpnService : VpnService() {
|
||||||
"awg" -> Awg()
|
"awg" -> Awg()
|
||||||
"openvpn" -> OpenVpn()
|
"openvpn" -> OpenVpn()
|
||||||
"cloak" -> Cloak()
|
"cloak" -> Cloak()
|
||||||
else -> throw IllegalArgumentException("Failed to load $protocolName protocol")
|
else -> throw IllegalArgumentException("Protocol '$protocolName' not found")
|
||||||
}.apply { initialize(applicationContext, protocolState) }
|
}.apply { initialize(applicationContext, protocolState) }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue