package app.xixi.nomo

import com.google.gson.Gson

data class XrayConfig(
    var sessionId: String = "",
    var socksPort: Int = 0,
    var tunnelConfig: String = "",
    var startOptions: ProxyStartOptions? = null,
    var allowVpnApps: ArrayList<String> = ArrayList(),
    var disallowVpnApps: ArrayList<String> = ArrayList()
) {
    fun getProxyStartOptions(): String {
        return try {
            val gson = Gson()
            gson.toJson(startOptions)
        } catch (e: Exception) {
            e.printStackTrace()
            ""
        }
    }
}
