Compare commits

..

No commits in common. "c626ed5a48ed5decca60f6064b9e6d4d773e8a48" and "094a5b8969d95ee0ab172454ece28356fb95e366" have entirely different histories.

4 changed files with 456 additions and 589 deletions

1001
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -78,23 +78,23 @@ gif = "0.13.1"
rkv = { version = "0.19.0", features = ["lmdb"] }
## tor
arti-client = { version = "0.26.0", features = ["pt-client", "static", "onion-service-service", "onion-service-client"] }
tor-rtcompat = { version = "0.26.0", features = ["static"] }
tor-config = "0.26.0"
arti-client = { version = "0.23.0", features = ["pt-client", "static", "onion-service-service", "onion-service-client"] }
tor-rtcompat = { version = "0.23.0", features = ["static"] }
tor-config = "0.23.0"
fs-mistrust = "0.8.0"
tor-hsservice = "0.26.0"
tor-hsrproxy = "0.26.0"
tor-keymgr = "0.26.0"
tor-llcrypto = "0.26.0"
tor-hscrypto = "0.26.0"
tor-error = "0.26.0"
tor-hsservice = "0.23.0"
tor-hsrproxy = "0.23.0"
tor-keymgr = "0.23.0"
tor-llcrypto = "0.23.0"
tor-hscrypto = "0.23.0"
tor-error = "0.23.0"
sha2 = "0.10.8"
ed25519-dalek = "2.1.1"
curve25519-dalek = "4.1.3"
hyper = { version = "0.14.30", features = ["full"] }
hyper-tls = "0.5.0"
tls-api = "0.12.0"
tls-api-native-tls = "0.12.1"
tls-api = "0.9.0"
tls-api-native-tls = "0.9.0"
## stratum server
tokio-old = {version = "0.2", features = ["full"], package = "tokio" }

View file

@ -63,8 +63,8 @@ function build_apk() {
./gradlew clean
# Build signed apk if keystore exists
if [ ! -f keystore.properties ]; then
./gradlew assembleDebug
apk_path=app/build/outputs/apk/debug/app-debug.apk
./gradlew assembleRelease
apk_path=app/build/outputs/apk/release/app-release.apk
else
./gradlew assembleSignedRelease
apk_path=app/build/outputs/apk/signedRelease/app-signedRelease.apk

View file

@ -80,16 +80,20 @@ pub struct Tor {
impl Default for Tor {
fn default() -> Self {
// Cleanup keys, state and cache on start.
fs::remove_dir_all(TorConfig::keystore_path()).unwrap_or_default();
fs::remove_dir_all(TorConfig::state_path()).unwrap_or_default();
fs::remove_dir_all(TorConfig::cache_path()).unwrap_or_default();
// Create Tor client.
let runtime = TokioNativeTlsRuntime::create().unwrap();
let config = Self::build_config();
let client = TorClient::with_runtime(runtime)
let client = if let Ok(c) = TorClient::with_runtime(runtime)
.config(config.clone())
.create_unbootstrapped().unwrap();
.create_unbootstrapped() {
c
} else {
fs::remove_dir_all(TorConfig::state_path()).unwrap();
fs::remove_dir_all(TorConfig::cache_path()).unwrap();
let runtime = TokioNativeTlsRuntime::create().unwrap();
TorClient::with_runtime(runtime)
.config(config.clone())
.create_unbootstrapped().unwrap()
};
Self {
running_services: Arc::new(RwLock::new(BTreeMap::new())),
starting_services: Arc::new(RwLock::new(BTreeSet::new())),