This commit is contained in:
Your Name
2024-03-03 22:28:29 -06:00
parent 5cfcd2c3c7
commit 74ff304e40
6 changed files with 41 additions and 32 deletions

View File

@@ -567,6 +567,8 @@ object TetheringManager {
val tetheredInterfaces = args!![0] as List<String?>
callback?.onTetheredInterfacesChanged(tetheredInterfaces)
// Toast.makeText(this, "Adding Tether Interface to VPN", 5).show()
// hansonxyz
tetheredInterfaces?.let {
for (iface in it) {

View File

@@ -8,6 +8,7 @@ import timber.log.Timber
import java.util.*
import java.util.concurrent.locks.ReentrantLock
import kotlin.concurrent.withLock
import android.util.Log
class RootSession : AutoCloseable {
companion object {
@@ -38,8 +39,12 @@ class RootSession : AutoCloseable {
fun submit(command: String) = execQuiet(command).message(listOf(command))?.let { Timber.v(it) }
fun execQuiet(command: String, redirect: Boolean = false) = runBlocking {
// Log the command to debug console
Log.d("ExecQuiet", "Executing command: $command")
server!!.execute(RoutingCommands.Process(listOf("sh", "-c", command), redirect))
}
fun exec(command: String) = execQuiet(command).check(listOf(command))
/**