diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 0a72efddda37f9be4dbdeb8d94a916f7cf61b3ed..dff0d78c53313b5b874cba85f823c7f01dd872a2 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,7 +1,11 @@
image: "registry.gitlab.e.foundation/e/os/docker-android-apps-cicd:latest"
+variables:
+ GIT_SUBMODULE_STRATEGY: recursive
+
stages:
- build
+- .post
before_script:
- export GRADLE_USER_HOME=$(pwd)/.gradle
@@ -15,7 +19,15 @@ cache:
build:
stage: build
script:
- - ./gradlew assemble
+ - ./gradlew :orbotservice:assembleRelease :privacymoduletor:assembleRelease
artifacts:
paths:
- - privacymodulesgoogle/build/outputs/aar
+ - privacymoduletor/build/outputs/aar
+ - orbotservice/build/outputs/aar
+
+deploy:
+ stage: .post
+ script:
+ - ./gradlew publish
+ only:
+ - main
diff --git a/.gitmodules b/.gitmodules
index a7dabf13f412a6f5654d053abbe88314439a0862..e2dc9bb25271fe6285f4b92d50699de69257370a 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,12 +1,4 @@
[submodule "orbotservice"]
path = orbotservice
- url = git@gitlab.e.foundation:e/os/orbotservice.git
-[submodule "external/jtorctl"]
- path = external/jtorctl
- url = https://github.com/guardianproject/jtorctl
-[submodule "external/badvpn"]
- path = external/badvpn
- url = https://github.com/guardianproject/badvpn.git
-[submodule "external/jsocks"]
- path = external/jsocks
- url = https://github.com/guardianproject/jsocks.git
+ url = ../orbotservice.git
+
diff --git a/BUILD.md b/BUILD.md
index 4780a3eaeba4cd5461784729bec9b0eb4f024e4b..5c6321b9c1c95a2f45fcfc252696bce41b8b0ab1 100644
--- a/BUILD.md
+++ b/BUILD.md
@@ -1,39 +1,17 @@
This document explains how to properly build the module AAR for orbostservice and privacymoduletor from
source.
-PrivacyModuleTor includes, in the external directory, git repo submodules of:
-- OrbotService: the module used by Orbot to run Tor
-- JTorControl: The Tor Control Library for Java
-- BadVPN
-- JSocks
-
-Please install the following prerequisites (instructions for each follows):
-
-- Android Software Development Kit or SDK (for Java code): http://developer.android.com/sdk/index.html *(Android Studio)*
-- Android Native Development Kit or NDK (for C/C++ code) http://developer.android.com/sdk/ndk/index.html *(This can be installed through Android Studio's SDK Manager)*
+PrivacyModuleTor includes git repo submodules of OrbotService, the module used by Orbot to run Tor
Be sure that you have all of the git submodules up-to-date:
git submodule update --init --recursive
-
-You then need to run "ndk-build" and the following commands to compile and prepare Orbot's native code:
-
-UNIX:
-
- cd orbotservice/src/main
- ndk-build (located in Android/Sdk/ndk/VERSION/)
-
-Windows:
-
- cd orbotservice\src\main
- ndk-build.cmd (located in Android\Sdk\ndk\VERSION\)
-
-Now you can build the AAR modules :
+You can build the AAR modules :
./gradlew :orbotservice:assembleRelease :privacymoduletor:assembleRelease
-To deploy localy duringdevelopment
+To deploy localy during development
./gradlew --console=verbose publishToMavenLocal
diff --git a/build.gradle b/build.gradle
index 96782f134eae4354d93117ba0e7cb4cf0aee9c3b..a750949c43aa3f1d671fe70c0969d49ac79443fa 100644
--- a/build.gradle
+++ b/build.gradle
@@ -2,7 +2,12 @@
apply plugin: 'maven-publish'
buildscript {
- ext.kotlin_version = "1.6.0"
+ apply from: './dependencies.gradle'
+
+ ext.kotlin_version = "1.6.10"
+ ext.orbot_version = "orbot-16.6.2"
+ ext.advanced_privacy_version = "1.2.0"
+
repositories {
google()
mavenCentral()
@@ -10,9 +15,6 @@ buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:7.0.4'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
-
- // NOTE: Do not place your application dependencies here; they belong
- // in the individual module build.gradle files
}
}
@@ -23,7 +25,7 @@ configure(project(':orbotservice')) {
groupId 'foundation.e'
//You can either define these here or get them from project conf elsewhere
artifactId 'orbotservice'
- version '0.2.1-orbot.16.4.1'
+ version orbot_version
artifact "$buildDir/outputs/aar/orbotservice-release.aar" //aar artifact you want to publish
//generate pom nodes for dependencies
diff --git a/commons.gradle b/commons.gradle
new file mode 100644
index 0000000000000000000000000000000000000000..3aba425bda989f1733ae9293d0de062d62e264c7
--- /dev/null
+++ b/commons.gradle
@@ -0,0 +1,12 @@
+
+/*
+ Applies across all modules
+ */
+android {
+ compileSdkVersion 30
+ buildToolsVersion '30.0.3'
+ compileOptions {
+ sourceCompatibility JavaVersion.VERSION_11
+ targetCompatibility JavaVersion.VERSION_11
+ }
+}
\ No newline at end of file
diff --git a/demoapp/build.gradle b/demoapp/build.gradle
index 0876a40af4cec42d86a991efffc5b4bd555b2a7f..6736fe135add473d198ff91e8dd15b7a7df9d94a 100644
--- a/demoapp/build.gradle
+++ b/demoapp/build.gradle
@@ -21,12 +21,12 @@ plugins {
}
android {
- compileSdk 30
+ compileSdk 31
defaultConfig {
applicationId "foundation.e.tordemoapp"
- minSdk 24
- targetSdk 30
+ minSdk 26
+ targetSdk 31
versionCode 1
versionName "1.0"
}
@@ -53,6 +53,5 @@ dependencies {
implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.0'
- //implementation 'foundation.e:privacymodule.tor:0.2.0'
- implementation project(':privacymoduletor')
+ implementation 'foundation.e:privacymodule.tor:1.2.0-orbot-16.6.2'
}
diff --git a/demoapp/src/main/java/foundation/e/tordemoapp/MainActivity.kt b/demoapp/src/main/java/foundation/e/tordemoapp/MainActivity.kt
index 71b6298a3a8875c4e3a2ea8bcfb88c816bfedff2..824d04ebdd1a59df9146120fa449a9111ed27a44 100644
--- a/demoapp/src/main/java/foundation/e/tordemoapp/MainActivity.kt
+++ b/demoapp/src/main/java/foundation/e/tordemoapp/MainActivity.kt
@@ -28,8 +28,9 @@ import android.widget.TextView
import androidx.appcompat.app.AppCompatActivity
import foundation.e.privacymodules.ipscrambler.IpScramblerModule
import foundation.e.privacymodules.ipscramblermodule.IIpScramblerModule
+import org.torproject.android.service.util.Prefs
-const val APP_1 = "org.mozilla.firefox"
+const val APP_1 = "dnsfilter.android" ///"org.mozilla.firefox"
class MainActivity : AppCompatActivity(), IIpScramblerModule.Listener {
@@ -52,7 +53,7 @@ class MainActivity : AppCompatActivity(), IIpScramblerModule.Listener {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
-
+ Prefs.getSharedPrefs(this).edit().putBoolean("pref_enable_logging", true).commit()
ipScramblerModule = IpScramblerModule(this)
ipScramblerModule.addListener(this)
@@ -65,6 +66,7 @@ class MainActivity : AppCompatActivity(), IIpScramblerModule.Listener {
mSelectAll = findViewById(R.id.select_all)
mSelectApp1 = findViewById(R.id.select_app1)
mToggleCountry = findViewById(R.id.toggle_exit_node)
+ mBtnRequestStatus = findViewById(R.id.button_status)
mBtnStart?.setOnClickListener { v: View? ->
ipScramblerModule.prepareAndroidVpn()?.let { startActivityForResult(it, 3)}
diff --git a/dependencies.gradle b/dependencies.gradle
new file mode 100644
index 0000000000000000000000000000000000000000..62435469dbac85bd05eb72cad915bf900649e968
--- /dev/null
+++ b/dependencies.gradle
@@ -0,0 +1,60 @@
+ext {
+ versions = [
+ android_material : "1.4.0",
+ android_shell : "1.0.0",
+ android_snowfall : "1.2.1",
+ android_volley : "1.2.0",
+ androidx_appcompat : "1.3.1",
+ androidx_constraint : "2.1.0",
+ androidx_coordinator : "1.1.0",
+ androidx_core : "1.6.0",
+ androidx_leanback : "1.2.0-alpha01",
+ androidx_leanback_paging : "1.1.0-alpha08",
+ androidx_leanback_tab : "1.1.0-beta01",
+ androidx_localbroadcast : "1.0.0",
+ androidx_multidex : "2.0.1",
+ androidx_palette : "1.0.0",
+ androidx_recyclerview : "1.2.1",
+ apl_appintro : "v4.2.3",
+ bclogic_pulsator : "1.0.3",
+ fastlane_screengrab : "1.2.0",
+ guardian_geoip : "20191217",
+ guardian_jsocks : "1.0.4",
+ guardian_jtorctl : "0.4.5.7",
+ ipt_proxy : "1.7.1",
+ portmapper : "2.0.5",
+ tor_android : "0.4.7.8",
+ pcap_core : "1.8.2",
+ pcap_factory : "1.8.2"
+ ]
+
+ libs = [
+ android_material : "com.google.android.material:material:$versions.android_material",
+ android_shell : "com.jaredrummler:android-shell:$versions.android_shell",
+ android_snowfall : "com.github.jetradarmobile:android-snowfall:$versions.android_snowfall",
+ android_volley : "com.android.volley:volley:$versions.android_volley",
+ androidx_appcompat : "androidx.appcompat:appcompat:$versions.androidx_appcompat",
+ androidx_constraint : "androidx.constraintlayout:constraintlayout:$versions.androidx_constraint",
+ androidx_coordinator : "androidx.coordinatorlayout:coordinatorlayout:$versions.androidx_coordinator",
+ androidx_core : "androidx.core:core:$versions.androidx_core",
+ androidx_leanback_core : "androidx.leanback:leanback:$versions.androidx_leanback",
+ androidx_leanback_paging : "androidx.leanback:leanback-paging:$versions.androidx_leanback_paging",
+ androidx_leanback_preferences : "androidx.leanback:leanback-preference:$versions.androidx_leanback",
+ androidx_leanback_tab : "androidx.leanback:leanback-tab:$versions.androidx_leanback_tab",
+ androidx_localbroadcast : "androidx.localbroadcastmanager:localbroadcastmanager:$versions.androidx_localbroadcast",
+ androidx_multidex : "androidx.multidex:multidex:$versions.androidx_multidex",
+ androidx_palette : "androidx.palette:palette:$versions.androidx_palette",
+ androidx_recyclerview : "androidx.recyclerview:recyclerview:$versions.androidx_recyclerview",
+ apl_appintro : "com.github.apl-devs:appintro:$versions.apl_appintro",
+ bclogic_pulsator : "pl.bclogic:pulsator4droid:$versions.bclogic_pulsator",
+ fastlane_screengrab : "tools.fastlane:screengrab:$versions.fastlane_screengrab",
+ guardian_geoip : "info.guardianproject:geoip:$versions.guardian_geoip",
+ guardian_jsocks : "com.gitlab.guardianproject:jsocksandroid:$versions.guardian_jsocks",
+ guardian_jtorctl : "info.guardianproject:jtorctl:$versions.guardian_jtorctl",
+ ipt_proxy : "com.github.bitmold:OrbotIPtProxy:$versions.ipt_proxy",
+ portmapper : "com.offbynull.portmapper:portmapper:$versions.portmapper",
+ tor_android : "info.guardianproject:tor-android:$versions.tor_android",
+ pcap_core : "org.pcap4j:pcap4j-core:$versions.pcap_core",
+ pcap_factory : "org.pcap4j:pcap4j-packetfactory-static:$versions.pcap_factory"
+ ]
+}
\ No newline at end of file
diff --git a/external/badvpn b/external/badvpn
deleted file mode 160000
index 6f80cc1beb9f93987159f669eae9c19c627b2794..0000000000000000000000000000000000000000
--- a/external/badvpn
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 6f80cc1beb9f93987159f669eae9c19c627b2794
diff --git a/external/jsocks b/external/jsocks
deleted file mode 160000
index 9ae7520508d37a2b7fbb8477871f8f2c2a0a3b3d..0000000000000000000000000000000000000000
--- a/external/jsocks
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 9ae7520508d37a2b7fbb8477871f8f2c2a0a3b3d
diff --git a/external/jtorctl b/external/jtorctl
deleted file mode 160000
index c141d26f24b067dea4c3c17576f971d33bea3235..0000000000000000000000000000000000000000
--- a/external/jtorctl
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit c141d26f24b067dea4c3c17576f971d33bea3235
diff --git a/libs/tor-android-binary-release.aar b/libs/tor-android-binary-release.aar
new file mode 100644
index 0000000000000000000000000000000000000000..01414d4c89ab2213dace973970800234e9206150
Binary files /dev/null and b/libs/tor-android-binary-release.aar differ
diff --git a/orbotservice b/orbotservice
index e1cc6aef65eb646f347d28174a6b00840c1cb94d..788bbd1272467ed0cc523c0d5921af9ca1a09707 160000
--- a/orbotservice
+++ b/orbotservice
@@ -1 +1 @@
-Subproject commit e1cc6aef65eb646f347d28174a6b00840c1cb94d
+Subproject commit 788bbd1272467ed0cc523c0d5921af9ca1a09707
diff --git a/privacymoduletor/build.gradle b/privacymoduletor/build.gradle
index 8b65f729002d68e9ec9cfe6249865c2a276901c8..c7cf6ff57144d9ea904a36dc4737e5e6fadc2acd 100644
--- a/privacymoduletor/build.gradle
+++ b/privacymoduletor/build.gradle
@@ -19,15 +19,17 @@ apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'maven-publish'
+apply from: '../commons.gradle'
+apply from : '../dependencies.gradle'
+
android {
- compileSdkVersion 30
+ compileSdkVersion 31
defaultConfig {
minSdkVersion 24
- targetSdkVersion 30
+ targetSdkVersion 31
- versionCode 7
- versionName "0.2.4"
+ versionName "$advanced_privacy_version-$orbot_version"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
@@ -50,11 +52,10 @@ android {
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
- implementation 'androidx.core:core-ktx:1.6.0'
- implementation "androidx.localbroadcastmanager:localbroadcastmanager:1.0.0"
+ implementation 'androidx.core:core-ktx:1.8.0'
- implementation 'foundation.e:orbotservice:0.2.1-orbot.16.4.1'
- //implementation project(':orbotservice')
+ implementation(libs.androidx_localbroadcast)
+ implementation "foundation.e:orbotservice:$orbot_version"
}
diff --git a/privacymoduletor/src/main/AndroidManifest.xml b/privacymoduletor/src/main/AndroidManifest.xml
index 8bfe129d47bc8119f225fefd6e535a87ea56968c..e9481477dc04fbc26959c59848f6382d0ec570f7 100644
--- a/privacymoduletor/src/main/AndroidManifest.xml
+++ b/privacymoduletor/src/main/AndroidManifest.xml
@@ -2,24 +2,20 @@
package="foundation.e.privacymodules.tor"
android:installLocation="internalOnly"
>
+
+
+
+
+
+
+
-
-
@@ -27,11 +23,4 @@
-
-
-
-
-
-
-
diff --git a/privacymoduletor/src/main/java/foundation/e/privacymodules/ipscramblermodule/IpScramblerModule.kt b/privacymoduletor/src/main/java/foundation/e/privacymodules/ipscramblermodule/IpScramblerModule.kt
index 905677c46c318e1effe5803eda70f55c1b55dc8e..2e9be19bef9bf380ac37221ee5705a7b3a158d8d 100644
--- a/privacymoduletor/src/main/java/foundation/e/privacymodules/ipscramblermodule/IpScramblerModule.kt
+++ b/privacymoduletor/src/main/java/foundation/e/privacymodules/ipscramblermodule/IpScramblerModule.kt
@@ -22,6 +22,7 @@ import android.content.Context
import android.content.Intent
import android.content.IntentFilter
import android.net.VpnService
+import android.os.Bundle
import android.os.Handler
import android.os.Looper
import android.os.Message
@@ -30,21 +31,11 @@ import androidx.localbroadcastmanager.content.LocalBroadcastManager
import foundation.e.privacymodules.ipscramblermodule.IIpScramblerModule
import foundation.e.privacymodules.ipscramblermodule.IIpScramblerModule.Listener
import foundation.e.privacymodules.ipscramblermodule.IIpScramblerModule.Status
-import org.torproject.android.service.OrbotService
-import org.torproject.android.service.TorServiceConstants
-import org.torproject.android.service.util.Prefs
-import org.torproject.android.service.vpn.VpnPrefs
-import android.service.notification.StatusBarNotification
-
-import android.content.Context.NOTIFICATION_SERVICE
-
-import androidx.core.content.ContextCompat.getSystemService
-
-import android.app.NotificationManager
-import android.net.VpnManager
-import android.os.Bundle
import java.security.InvalidParameterException
import java.util.*
+import org.torproject.android.service.OrbotConstants
+import org.torproject.android.service.OrbotService
+import org.torproject.android.service.util.Prefs
class IpScramblerModule(private val context: Context): IIpScramblerModule {
@@ -65,18 +56,6 @@ class IpScramblerModule(private val context: Context): IIpScramblerModule {
private val localBroadcastReceiver: BroadcastReceiver = object : BroadcastReceiver() {
override fun onReceive(context: Context, intent: Intent) {
val action = intent.action ?: return
- if (action == TorServiceConstants.ACTION_RUNNING_SYNC) {
- try {
- intent.getStringExtra(TorServiceConstants.EXTRA_STATUS)?.let {
- val newStatus = Status.valueOf(it)
- currentStatus = newStatus
- }
- } catch (e: Exception) {
- Log.e(TAG, "Can't parse Orbot service status.")
- }
- return
- }
-
val msg = messageHandler.obtainMessage()
msg.obj = action
msg.data = intent.extras
@@ -88,28 +67,11 @@ class IpScramblerModule(private val context: Context): IIpScramblerModule {
override fun handleMessage(msg: Message) {
val action = msg.obj as? String ?: return
val data = msg.data
- try {
- data.getString(TorServiceConstants.EXTRA_STATUS)?.let {
- val newStatus = Status.valueOf(it)
- if (currentStatus == Status.STARTING && newStatus == Status.ON) {
- // Wait for bandwidth action to ensure true start.
- if (action == TorServiceConstants.LOCAL_ACTION_BANDWIDTH) {
- updateStatus(newStatus, force = true)
- }
- } else {
- updateStatus(newStatus,
- force = action == TorServiceConstants.ACTION_STATUS)
- }
- }
- } catch (e: Exception) {
- Log.e(TAG, "Can't parse Orbot service status.")
- }
-
when (action) {
- TorServiceConstants.LOCAL_ACTION_LOG ->
- data.getString(TorServiceConstants.LOCAL_EXTRA_LOG)?.let { newLog(it) }
+ OrbotConstants.LOCAL_ACTION_LOG ->
+ data.getString(OrbotConstants.LOCAL_EXTRA_LOG)?.let { newLog(it) }
- TorServiceConstants.LOCAL_ACTION_BANDWIDTH -> {
+ OrbotConstants.LOCAL_ACTION_BANDWIDTH -> {
trafficUpdate(
data.getLong("up", 0),
data.getLong("down", 0),
@@ -118,11 +80,21 @@ class IpScramblerModule(private val context: Context): IIpScramblerModule {
)
}
- TorServiceConstants.LOCAL_ACTION_PORTS -> {
+ OrbotConstants.LOCAL_ACTION_PORTS -> {
httpProxyPort = data.getInt(OrbotService.EXTRA_HTTP_PROXY_PORT, -1)
socksProxyPort = data.getInt(OrbotService.EXTRA_SOCKS_PROXY_PORT, -1)
}
- }
+
+ OrbotConstants.LOCAL_ACTION_STATUS ->
+ data.getString(OrbotConstants.EXTRA_STATUS)?.let {
+ try {
+ val newStatus = Status.valueOf(it)
+ updateStatus(newStatus, force = true)
+ } catch (e: Exception) {
+ Log.e(TAG, "Can't parse Orbot service status.")
+ }
+ }
+ }
super.handleMessage(msg)
}
}
@@ -133,27 +105,27 @@ class IpScramblerModule(private val context: Context): IIpScramblerModule {
val lbm = LocalBroadcastManager.getInstance(context)
lbm.registerReceiver(
localBroadcastReceiver,
- IntentFilter(TorServiceConstants.ACTION_STATUS)
+ IntentFilter(OrbotConstants.LOCAL_ACTION_STATUS)
)
lbm.registerReceiver(
localBroadcastReceiver,
- IntentFilter(TorServiceConstants.LOCAL_ACTION_BANDWIDTH)
+ IntentFilter(OrbotConstants.LOCAL_ACTION_BANDWIDTH)
)
lbm.registerReceiver(
localBroadcastReceiver,
- IntentFilter(TorServiceConstants.LOCAL_ACTION_LOG)
+ IntentFilter(OrbotConstants.LOCAL_ACTION_LOG)
)
lbm.registerReceiver(
localBroadcastReceiver,
- IntentFilter(TorServiceConstants.LOCAL_ACTION_PORTS)
+ IntentFilter(OrbotConstants.LOCAL_ACTION_PORTS)
)
lbm.registerReceiver(
localBroadcastReceiver,
- IntentFilter(TorServiceConstants.ACTION_RUNNING_SYNC)
+ IntentFilter(OrbotConstants.ACTION_RUNNING_SYNC)
)
Prefs.getSharedPrefs(context).edit()
- .putInt(VpnPrefs.PREFS_DNS_PORT, TorServiceConstants.TOR_DNS_PORT_DEFAULT)
+ .putInt(OrbotConstants.PREFS_DNS_PORT, OrbotConstants.TOR_DNS_PORT_DEFAULT)
.apply()
}
@@ -170,7 +142,7 @@ class IpScramblerModule(private val context: Context): IIpScramblerModule {
// Reset status, and then ask to refresh it synchronously.
currentStatus = Status.OFF
LocalBroadcastManager.getInstance(context)
- .sendBroadcastSync(Intent(TorServiceConstants.ACTION_CHECK_RUNNING_SYNC))
+ .sendBroadcastSync(Intent(OrbotConstants.ACTION_CHECK_RUNNING_SYNC))
return currentStatus != Status.OFF
}
@@ -192,17 +164,17 @@ class IpScramblerModule(private val context: Context): IIpScramblerModule {
private fun saveTorifiedApps(packageNames: Collection) {
packageNames.joinToString("|")
Prefs.getSharedPrefs(context).edit().putString(
- VpnPrefs.PREFS_KEY_TORIFIED, packageNames.joinToString("|")
+ OrbotConstants.PREFS_KEY_TORIFIED, packageNames.joinToString("|")
).commit()
if (isServiceRunning()) {
- sendIntentToService(TorServiceConstants.ACTION_STOP_VPN)
- sendIntentToService(TorServiceConstants.ACTION_START_VPN)
+ sendIntentToService(OrbotConstants.ACTION_STOP_VPN)
+ sendIntentToService(OrbotConstants.ACTION_START_VPN)
}
}
private fun getTorifiedApps(): Set {
- val list = Prefs.getSharedPrefs(context).getString(VpnPrefs.PREFS_KEY_TORIFIED, "")
+ val list = Prefs.getSharedPrefs(context).getString(OrbotConstants.PREFS_KEY_TORIFIED, "")
?.split("|")
return if (list == null ||list == listOf("")) {
emptySet()
@@ -219,7 +191,7 @@ class IpScramblerModule(private val context: Context): IIpScramblerModule {
if (isServiceRunning()) {
val extra = Bundle()
extra.putString("exit", countryParam)
- sendIntentToService(TorServiceConstants.CMD_SET_EXIT, extra)
+ sendIntentToService(OrbotConstants.CMD_SET_EXIT, extra)
} else {
Prefs.getSharedPrefs(context)
.edit().putString(PREFS_KEY_EXIT_NODES, countryParam)
@@ -241,22 +213,22 @@ class IpScramblerModule(private val context: Context): IIpScramblerModule {
Prefs.putUseVpn(true)
Prefs.putStartOnBoot(true)
- // TODO: should check for prepare VPN ?
- sendIntentToService(TorServiceConstants.ACTION_START)
- sendIntentToService(TorServiceConstants.ACTION_START_VPN)
+ sendIntentToService(OrbotConstants.ACTION_START)
+ sendIntentToService(OrbotConstants.ACTION_START_VPN)
}
override fun stop() {
Prefs.putUseVpn(false)
Prefs.putStartOnBoot(false)
- sendIntentToService(TorServiceConstants.ACTION_STOP_VPN)
+ sendIntentToService(OrbotConstants.ACTION_STOP_VPN)
+ sendIntentToService(OrbotConstants.ACTION_STOP)
context.stopService(Intent(context, OrbotService::class.java))
}
override fun requestStatus() {
if (isServiceRunning()) {
- sendIntentToService(TorServiceConstants.ACTION_STATUS)
+ sendIntentToService(OrbotConstants.ACTION_STATUS)
} else {
updateStatus(Status.OFF, force = true)
}
diff --git a/settings.gradle b/settings.gradle
index 4ebab8ce2d4f2484d1a7de0b8cc9d569472c8df6..bd26505f176b5d4a1663261ba9c719521559d933 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -3,7 +3,6 @@ dependencyResolutionManagement {
repositories {
google()
mavenCentral()
- maven { url "https://raw.githubusercontent.com/guardianproject/gpmaven/master" }
maven { url 'https://jitpack.io' }
mavenLocal()