mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-22 02:01:08 +07:00
aae3cdcac1
* added saving allowed_ips to the array of strings for old configs * Remove config string processing, add getting all AWG, WG parameters from JSON * fixed checking of default routes when adding split tunneling from the application * added check when processing siteBasedSplitTunneling
10 lines
279 B
Kotlin
10 lines
279 B
Kotlin
package org.amnezia.vpn.util
|
|
|
|
import org.json.JSONArray
|
|
import org.json.JSONObject
|
|
|
|
inline fun <reified T> JSONArray.asSequence(): Sequence<T> =
|
|
(0..<length()).asSequence().map { get(it) as T }
|
|
|
|
fun JSONObject.optStringOrNull(name: String) = optString(name).ifEmpty { null }
|