Skip to content

Commit

Permalink
Tor/use guardianproject dependency (#2024)
Browse files Browse the repository at this point in the history
* chore: switch to guardianprojecrt

* chore: change api to implementation for jtorctl
  • Loading branch information
siepra authored Nov 24, 2023
1 parent f2a621f commit 18ed008
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
6 changes: 2 additions & 4 deletions packages/mobile/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -315,10 +315,8 @@ dependencies {

implementation group: 'commons-io', name: 'commons-io', version: '2.6'

api 'info.guardianproject:jtorctl:0.4.5.7'
// implementation 'info.guardianproject:tor-android:0.4.5.7'

implementation 'org.torproject:tor-android-binary:0.4.4.6'
implementation 'info.guardianproject:tor-android:0.4.5.7'
implementation 'info.guardianproject:jtorctl:0.4.5.7'

// Websockets connection
implementation ('io.socket:socket.io-client:2.0.0') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
import org.json.JSONException
import org.json.JSONObject
import org.torproject.android.binary.TorResourceInstaller
import java.util.concurrent.ThreadLocalRandom
import kotlin.collections.ArrayList

Expand Down Expand Up @@ -121,9 +120,9 @@ class BackendWorker(private val context: Context, workerParams: WorkerParameters

val dataPath = Utils.createDirectory(context)

val tor = TorResourceInstaller(context, context.filesDir).installResources()
val torBinary = tor.canonicalPath

val appInfo = context.packageManager.getApplicationInfo(context.packageName, 0)
val torBinary = appInfo.nativeLibraryDir + "/libtor.so"
val platform = "mobile"

startNodeProjectWithArguments("bundle.cjs --torBinary $torBinary --dataPath $dataPath --dataPort $dataPort --platform $platform --socketIOSecret $socketIOSecret")
Expand Down

0 comments on commit 18ed008

Please sign in to comment.