-
Notifications
You must be signed in to change notification settings - Fork 236
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Eval EXEC <execvy@gmail.com>
- Loading branch information
Showing
11 changed files
with
400 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
mod tor; | ||
|
||
pub use tor::TorService; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
use crate::utils::wait_until; | ||
use crate::{Net, Node, Spec}; | ||
use ckb_logger::info; | ||
use ckb_network::SupportProtocols; | ||
use std::time::Duration; | ||
|
||
pub struct TorService; | ||
|
||
impl Spec for TorService { | ||
crate::setup!(num_nodes: 1); | ||
|
||
fn run(&self, nodes: &mut Vec<Node>) {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
use std::net::SocketAddr; | ||
|
||
pub mod onion_service; | ||
mod tests; | ||
|
||
pub struct OnionServiceConfig { | ||
// Tor server url: like: 127.0.0.1:9050 | ||
pub onion_server: String, | ||
// path to store onion private key, default is ./data/network/onion/onion_private_key | ||
pub onion_private_key_path: String, | ||
// tor controllr url, example: 127.0.0.1:9050 | ||
pub tor_controller: String, | ||
// tor controller hashed password | ||
pub tor_password: Option<String>, | ||
// onion service will bind to CKB's p2p listen address, default is "127.0.0.1:8115" | ||
// if you want to use other address, you should set it to the address you want | ||
pub onion_service_target: SocketAddr, | ||
} |
Oops, something went wrong.