Compare commits
2 commits
094a5b8969
...
c626ed5a48
Author | SHA1 | Date | |
---|---|---|---|
c626ed5a48 | |||
d79d05ef5a |
4 changed files with 592 additions and 459 deletions
1007
Cargo.lock
generated
1007
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
22
Cargo.toml
22
Cargo.toml
|
@ -78,23 +78,23 @@ gif = "0.13.1"
|
|||
rkv = { version = "0.19.0", features = ["lmdb"] }
|
||||
|
||||
## tor
|
||||
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"
|
||||
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"
|
||||
fs-mistrust = "0.8.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"
|
||||
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"
|
||||
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.9.0"
|
||||
tls-api-native-tls = "0.9.0"
|
||||
tls-api = "0.12.0"
|
||||
tls-api-native-tls = "0.12.1"
|
||||
|
||||
## stratum server
|
||||
tokio-old = {version = "0.2", features = ["full"], package = "tokio" }
|
||||
|
|
|
@ -63,8 +63,8 @@ function build_apk() {
|
|||
./gradlew clean
|
||||
# Build signed apk if keystore exists
|
||||
if [ ! -f keystore.properties ]; then
|
||||
./gradlew assembleRelease
|
||||
apk_path=app/build/outputs/apk/release/app-release.apk
|
||||
./gradlew assembleDebug
|
||||
apk_path=app/build/outputs/apk/debug/app-debug.apk
|
||||
else
|
||||
./gradlew assembleSignedRelease
|
||||
apk_path=app/build/outputs/apk/signedRelease/app-signedRelease.apk
|
||||
|
|
|
@ -80,20 +80,16 @@ 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 = if let Ok(c) = TorClient::with_runtime(runtime)
|
||||
let client = TorClient::with_runtime(runtime)
|
||||
.config(config.clone())
|
||||
.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()
|
||||
};
|
||||
.create_unbootstrapped().unwrap();
|
||||
Self {
|
||||
running_services: Arc::new(RwLock::new(BTreeMap::new())),
|
||||
starting_services: Arc::new(RwLock::new(BTreeSet::new())),
|
||||
|
|
Loading…
Reference in a new issue