mirror of
https://github.com/jwinterm/grin-wallet.git
synced 2026-11-19 21:43:58 +01:00
Integrated Tor arti Client (#750)
* tor: integrated client for listener, update tokio to last version * tor: send transaction with integrated client * build: code format * tor: optimize bootstrap percent check * tor: handle config build error * tor: do not show slatepack address if tor not launched * tor: handle keystore errors * tor: keep service launched * tor: bootstrap timeout, clean cache before client launch * tor: post request timeout * fix: post timeout * build: update deps after merge * tor: store arti runtime * tor: do not send over tor if `manual` arg presents or `skip_send_attempt` set at config * fix: arg name * tor: handle arti runtime creation error * tor: handle connection error * tor: handle bootstrap error * tor: handle start service name error * tor: handle service config creation error * tor: service proxy errors * tor: handle service key creation emptiness * build: format code * build: update arti to 0.43, hyper to 0.10.1 * api: start foreign listener before tor connection * tor: handle json parse errors * tor: prevent to create several client runtimes, ability to recreate * tor: return bootstrap error * tor: handle host parse error * tor: restart proxy on error * tor: do not use integrated client when config value use_integrated is missing, add logging * build: update lock file
This commit is contained in:
@@ -224,7 +224,7 @@ where
|
||||
g_args.tls_conf.clone(),
|
||||
tor_config.use_tor_listener,
|
||||
test_mode,
|
||||
Some(tor_config.clone()),
|
||||
tor_config,
|
||||
);
|
||||
if let Err(e) = res {
|
||||
error!("Error starting listener: {}", e);
|
||||
@@ -335,7 +335,7 @@ pub struct SendArgs {
|
||||
pub target_slate_version: Option<u16>,
|
||||
pub payment_proof_address: Option<SlatepackAddress>,
|
||||
pub ttl_blocks: Option<u64>,
|
||||
pub skip_tor: bool,
|
||||
pub skip_tor: Option<bool>,
|
||||
pub outfile: Option<String>,
|
||||
pub bridge: Option<String>,
|
||||
pub slatepack_qr: bool,
|
||||
@@ -431,7 +431,9 @@ where
|
||||
if let Some(b) = args.bridge.clone() {
|
||||
c.bridge.bridge_line = Some(b);
|
||||
}
|
||||
c.skip_send_attempt = Some(args.skip_tor);
|
||||
if let Some(s) = args.skip_tor {
|
||||
c.skip_send_attempt = Some(s);
|
||||
}
|
||||
Some(c)
|
||||
}
|
||||
None => None,
|
||||
@@ -630,7 +632,7 @@ where
|
||||
pub struct ReceiveArgs {
|
||||
pub input_file: Option<String>,
|
||||
pub input_slatepack_message: Option<String>,
|
||||
pub skip_tor: bool,
|
||||
pub skip_tor: Option<bool>,
|
||||
pub outfile: Option<String>,
|
||||
pub bridge: Option<String>,
|
||||
pub slatepack_qr: bool,
|
||||
@@ -666,7 +668,9 @@ where
|
||||
if let Some(b) = args.bridge {
|
||||
c.bridge.bridge_line = Some(b);
|
||||
}
|
||||
c.skip_send_attempt = Some(args.skip_tor);
|
||||
if let Some(s) = args.skip_tor {
|
||||
c.skip_send_attempt = Some(s);
|
||||
}
|
||||
Some(c)
|
||||
}
|
||||
None => None,
|
||||
@@ -688,7 +692,7 @@ where
|
||||
Ok(Some(_)) => {
|
||||
println!();
|
||||
println!(
|
||||
"Transaction recieved and sent back to sender at {} for finalization.",
|
||||
"Transaction received and sent back to sender at {} for finalization.",
|
||||
dest
|
||||
);
|
||||
println!();
|
||||
@@ -925,7 +929,7 @@ pub struct ProcessInvoiceArgs {
|
||||
pub slate: Slate,
|
||||
pub estimate_selection_strategies: bool,
|
||||
pub ttl_blocks: Option<u64>,
|
||||
pub skip_tor: bool,
|
||||
pub skip_tor: Option<bool>,
|
||||
pub outfile: Option<String>,
|
||||
pub bridge: Option<String>,
|
||||
pub slatepack_qr: bool,
|
||||
@@ -1008,7 +1012,9 @@ where
|
||||
if let Some(b) = args.bridge {
|
||||
c.bridge.bridge_line = Some(b);
|
||||
}
|
||||
c.skip_send_attempt = Some(args.skip_tor);
|
||||
if let Some(skip_tor) = args.skip_tor {
|
||||
c.skip_send_attempt = Some(skip_tor);
|
||||
}
|
||||
Some(c)
|
||||
}
|
||||
None => None,
|
||||
|
||||
Reference in New Issue
Block a user