Skip to content

Commit

Permalink
chore: switch to guardianprojecrt
Browse files Browse the repository at this point in the history
  • Loading branch information
siepra committed Oct 31, 2023
1 parent 0622c93 commit 8beb3af
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
4 changes: 1 addition & 3 deletions packages/mobile/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -316,9 +316,7 @@ 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'

// 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 @@ -24,7 +24,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


Expand Down Expand Up @@ -117,9 +116,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")
Expand Down

0 comments on commit 8beb3af

Please sign in to comment.