modified: Cargo.toml new file: src/dht.rs modified: src/main.rs new file: src/tor.rs new file: src/tor_axum.rs
27 lines
686 B
Rust
27 lines
686 B
Rust
use env_logger::Builder;
|
|
use log::{info, LevelFilter};
|
|
|
|
//mod dht;
|
|
mod tor_axum;
|
|
mod tor;
|
|
|
|
|
|
#[tokio::main]
|
|
async fn main() {
|
|
Builder::new()
|
|
.filter(None, LevelFilter::Debug)
|
|
.init();
|
|
|
|
/* let config = TorClientConfig::default();
|
|
if let Ok(tor_client) = TorClient::create_bootstrapped(config).await {
|
|
info!("Bootstrapped");
|
|
let onion_service_config = OnionServiceConfigBuilder::default().build().unwrap();
|
|
if let Ok(es) = tor_client.launch_onion_service(onion_service_config) {
|
|
info!("Onion name: {}", es.0.onion_name().unwrap());
|
|
}
|
|
} else {
|
|
info!("Error with bootstrapping");
|
|
} */
|
|
tor::start().await;
|
|
}
|