mirror of
https://github.com/jwinterm/grin-wallet.git
synced 2026-10-17 15:21:39 +02:00
TOR bridge + TOR Proxy + migration config_file_version (#617)
* tor bridge config and args * migration `config_file_version=2` * small fixes typo, comment etc.. * support: snowflake, meek_lite, obsf4 and tor proxy * remove useless serde * improve migrate function * few fixes * add bridge flags to pay and receive + few fixes * some improvements
This commit is contained in:
@@ -334,6 +334,7 @@ pub struct SendArgs {
|
||||
pub ttl_blocks: Option<u64>,
|
||||
pub skip_tor: bool,
|
||||
pub outfile: Option<String>,
|
||||
pub bridge: Option<String>,
|
||||
}
|
||||
|
||||
pub fn send<L, C, K>(
|
||||
@@ -412,6 +413,9 @@ where
|
||||
|
||||
let tor_config = match tor_config {
|
||||
Some(mut c) => {
|
||||
if let Some(b) = args.bridge.clone() {
|
||||
c.bridge.bridge_line = Some(b);
|
||||
}
|
||||
c.skip_send_attempt = Some(args.skip_tor);
|
||||
Some(c)
|
||||
}
|
||||
@@ -605,6 +609,7 @@ pub struct ReceiveArgs {
|
||||
pub input_slatepack_message: Option<String>,
|
||||
pub skip_tor: bool,
|
||||
pub outfile: Option<String>,
|
||||
pub bridge: Option<String>,
|
||||
}
|
||||
|
||||
pub fn receive<L, C, K>(
|
||||
@@ -634,6 +639,9 @@ where
|
||||
|
||||
let tor_config = match tor_config {
|
||||
Some(mut c) => {
|
||||
if let Some(b) = args.bridge {
|
||||
c.bridge.bridge_line = Some(b);
|
||||
}
|
||||
c.skip_send_attempt = Some(args.skip_tor);
|
||||
Some(c)
|
||||
}
|
||||
@@ -889,6 +897,7 @@ pub struct ProcessInvoiceArgs {
|
||||
pub ttl_blocks: Option<u64>,
|
||||
pub skip_tor: bool,
|
||||
pub outfile: Option<String>,
|
||||
pub bridge: Option<String>,
|
||||
}
|
||||
|
||||
/// Process invoice
|
||||
@@ -965,6 +974,9 @@ where
|
||||
|
||||
let tor_config = match tor_config {
|
||||
Some(mut c) => {
|
||||
if let Some(b) = args.bridge {
|
||||
c.bridge.bridge_line = Some(b);
|
||||
}
|
||||
c.skip_send_attempt = Some(args.skip_tor);
|
||||
Some(c)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user