SSXray for Android (#885)
This commit is contained in:
parent
ae4b33d042
commit
74ae4f3e67
5 changed files with 22 additions and 5 deletions
|
|
@ -384,7 +384,8 @@ class AmneziaActivity : QtActivity() {
|
|||
getVpnProto(vpnConfig)?.let { proto ->
|
||||
Log.d(TAG, "Proto from config: $proto, current proto: $vpnProto")
|
||||
if (isServiceConnected) {
|
||||
if (proto == vpnProto) {
|
||||
if (proto.serviceClass == vpnProto?.serviceClass) {
|
||||
vpnProto = proto
|
||||
connectToVpn(vpnConfig)
|
||||
return
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,7 +49,15 @@ enum class VpnProto(
|
|||
"org.amnezia.vpn:amneziaXrayService",
|
||||
XrayService::class.java
|
||||
) {
|
||||
override fun createProtocol(): Protocol = Xray()
|
||||
override fun createProtocol(): Protocol = Xray.instance
|
||||
},
|
||||
|
||||
SSXRAY(
|
||||
"SSXRay",
|
||||
"org.amnezia.vpn:amneziaXrayService",
|
||||
XrayService::class.java
|
||||
) {
|
||||
override fun createProtocol(): Protocol = Xray.instance
|
||||
};
|
||||
|
||||
private var _protocol: Protocol? = null
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue