Added Transport Protocols setting

This commit is contained in:
Juha Heinanen
2025-12-20 03:15:34 +02:00
parent 9907bcda6b
commit 1da85050a4
5 changed files with 77 additions and 1 deletions

View File

@ -18,8 +18,11 @@ class SettingsViewModel: ViewModel() {
val autoStart = MutableStateFlow(false)
val listenAddress = MutableStateFlow("")
val addressFamily = MutableStateFlow("")
val dnsServers = MutableStateFlow("")
val transportProtocols = MutableStateFlow("")
val oldTransportProtocols = Config.variable("sip_transports")
val dnsServers = MutableStateFlow("")
val oldDnsServers = if (Config.variable("dyn_dns") == "yes")
""
else {
@ -59,6 +62,8 @@ class SettingsViewModel: ViewModel() {
mutableIntStateOf(familyValues.indexOf(Config.variable("net_af").lowercase()))
addressFamily.value = familyValues[itemPosition.intValue]
transportProtocols.value = oldTransportProtocols
dnsServers.value = oldDnsServers
tlsCertificateFile.value = File(BaresipService.filesPath + "/cert.pem").exists()