feat(asb, cli): Listen on onion address, dial onion addresses (#203)

This pull requests
- Adds rust native support for the `asb` to listen on an onion service. Previously we were depedent on a seperately running `torc` client. Instead we now use [arti](https://tpo.pages.torproject.net/core/arti/), a rust implementation of the tor protocol.
- Removes the `tor.control_port` and `tor.socks5_port` property from the config of the `asb`
- Adds a new `tor.register_hidden_service` boolean property to the config of the `asb` which when enabled automatically runs a hidden service at startup
- Adds a new `tor.hidden_service_num_intro_points` config property to specify how many introduction points to register the onion service at
- Adds support for the `cli` to dial onion addresses

This is dependent on https://github.com/umgefahren/libp2p-tor/pull/24

Closes https://github.com/UnstoppableSwap/core/issues/16
This commit is contained in:
binarybaron 2024-12-03 21:24:33 +01:00 committed by GitHub
parent 45a4cf4fb7
commit d53c12d64e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 427 additions and 387 deletions

View file

@ -275,8 +275,14 @@ async fn initialize_context(
.to_string_lossy()
.starts_with("monero-wallet-rpc")
{
println!("Killing monero-wallet-rpc process with pid: {}", pid);
process.kill();
#[cfg(not(debug_assertions))]
{
println!("Killing monero-wallet-rpc process with pid: {}", pid);
process.kill();
}
#[cfg(debug_assertions)]
println!("Would kill monero-wallet-rpc process with pid: {}", pid);
}
}