#csharp#cross_platform#csharp#vpn#xamarin
VpnHood is a free, open-source VPN that helps you stay private online and access blocked content, even on networks with strict firewalls and deep packet inspection[1][5]. It works on Windows and Android, is easy to install, and runs fast without needing special network knowledge or admin rights[1]. You can choose which apps or countries use the VPN, and it supports both IPv4 and IPv6. Because it’s open source and has passed a security audit, you can trust that your data is safe and the software is transparent[1]. This means you get better privacy, can bypass restrictions, and have more control over your internet connection, all without cost or complexity[1][3].
https://github.com/vpnhood/VpnHood
🚀 Вышел стабильный JavaScript движок от Google для Android
Новая стабильная библиотека Jetpack JavaScript Engine позволит разработчикам выполнять JS код в изолированной и ограниченной среде.
class MainActivity : ComponentActivity() {
// Теперь nullable, без lateinit
private var jsSandbox: JavaScriptSandbox? = null
private var jsIsolate: JavaScriptIsolate? = null
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
if (!JavaScriptSandbox.isSupported()) {
Log.e("JS", "JavaScriptSandbox не поддерживается")
return
}
lifecycleScope.launch {
// Создаём и сохраняем в nullable-поле
jsSandbox = JavaScriptSandbox
.createConnectedInstanceAsync(applicationContext)
.await()
jsIsolate = jsSandbox?.createIsolate()
// При выполнении гарантируем, что jsIsolate != null
val result: String = jsIsolate
?.evaluateJavaScriptAsync(JS_SCRIPT_SCRING)
?.await()
?: "Ошибка: isolate не инициализирован"
Log.d("JS", "Результат выполнения: $result")
}
}
override fun onDestroy() {
super.onDestroy()
// Закрываем только если не null
jsIsolate?.close()
jsSandbox?.close()
}
}
#jetpack#js