[verified] Add F4 onion locator rotate with signed loc frames.
Identity key stays put. Typing ROTATE publishes a new Arti HS, hard-cuts the old nickname, persists self.onion, and pushes loc to reachable friends.
This commit is contained in:
parent
a2dfe3b2b8
commit
07aa97711c
8 changed files with 743 additions and 87 deletions
27
src/main.rs
27
src/main.rs
|
|
@ -1,14 +1,17 @@
|
|||
fn main() {
|
||||
match onionwire::Store::open() {
|
||||
Ok(store) => {
|
||||
if let Err(e) = onionwire::tui::run(store) {
|
||||
eprintln!("onionwire: {e}");
|
||||
std::process::exit(1);
|
||||
}
|
||||
}
|
||||
Err(e) => {
|
||||
eprintln!("onionwire: {e}");
|
||||
std::process::exit(1);
|
||||
}
|
||||
#[tokio::main]
|
||||
async fn main() {
|
||||
if let Err(e) = boot().await {
|
||||
eprintln!("onionwire: {e}");
|
||||
std::process::exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
async fn boot() -> Result<(), String> {
|
||||
let home = onionwire::Store::home_dir().map_err(|e| e.to_string())?;
|
||||
eprintln!("onionwire: bootstrapping Arti…");
|
||||
let node = onionwire::node::Node::start(home).await?;
|
||||
let handle = tokio::runtime::Handle::current();
|
||||
tokio::task::spawn_blocking(move || onionwire::tui::run(node, handle))
|
||||
.await
|
||||
.map_err(|e| e.to_string())?
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue