Adding compiled libs and customizing the log message.

This commit is contained in:
Vitor Pamplona
2026-04-01 13:50:36 -04:00
parent bc24434f1c
commit 45f1d79410
3 changed files with 16 additions and 11 deletions
@@ -51,18 +51,23 @@ class TorService(
val status: StateFlow<TorServiceStatus> = _status.asStateFlow()
init {
ArtiNative.setLogCallback(
ArtiLogCallback { text ->
Log.d("TorService") { "Arti: $text" }
when {
text.contains("Sufficiently bootstrapped", ignoreCase = true) -> {
_status.value = TorServiceStatus.Active(socksPort)
Log.d("TorService") { "Arti SOCKS proxy active on port $socksPort" }
}
ArtiNative.setLogCallback { text ->
Log.d("TorService") {
val newLine = text.indexOf('\n')
if (newLine > 1) {
"Arti: ${text.substring(0, newLine)}"
} else {
"Arti: $text"
}
},
)
}
when {
text.contains("Sufficiently bootstrapped", ignoreCase = true) -> {
_status.value = TorServiceStatus.Active(socksPort)
Log.d("TorService") { "Arti SOCKS proxy active on port $socksPort" }
}
}
}
}
/**
Binary file not shown.
Binary file not shown.