mirror of
https://github.com/creating2morrow/neveko.git
synced 2024-12-22 19:49:24 +00:00
force monero remote connections over i2p
This commit is contained in:
parent
e15dff04ce
commit
ba958f0b52
1 changed files with 15 additions and 2 deletions
|
@ -11,6 +11,7 @@ use log::{
|
|||
debug,
|
||||
error,
|
||||
info,
|
||||
warn,
|
||||
};
|
||||
use std::process::Command;
|
||||
|
||||
|
@ -200,8 +201,9 @@ pub fn start_rpc() {
|
|||
std::env::var("USER").unwrap_or(String::from("user")),
|
||||
);
|
||||
let release_env = utils::get_release_env();
|
||||
let cli_args = args::Args::parse();
|
||||
if release_env == utils::ReleaseEnvironment::Development {
|
||||
let args = [
|
||||
let mut args = vec![
|
||||
"--rpc-bind-port",
|
||||
&port,
|
||||
"--wallet-dir",
|
||||
|
@ -212,6 +214,13 @@ pub fn start_rpc() {
|
|||
&daemon_address,
|
||||
"--stagenet",
|
||||
];
|
||||
if cli_args.remote_node {
|
||||
if !&cli_args.i2p_proxy_host.contains(".i2p") {
|
||||
warn!("invalid i2p monero remote node detected");
|
||||
}
|
||||
args.push("--proxy");
|
||||
args.push(&cli_args.i2p_proxy_host);
|
||||
}
|
||||
let output = Command::new(format!("{}/monero-wallet-rpc", bin_dir))
|
||||
.args(args)
|
||||
.spawn()
|
||||
|
@ -222,7 +231,7 @@ pub fn start_rpc() {
|
|||
"/home/{}/.neveko/wallet/",
|
||||
std::env::var("USER").unwrap_or(String::from("user")),
|
||||
);
|
||||
let args = [
|
||||
let mut args = vec![
|
||||
"--rpc-bind-port",
|
||||
&port,
|
||||
"--wallet-dir",
|
||||
|
@ -232,6 +241,10 @@ pub fn start_rpc() {
|
|||
"--daemon-address",
|
||||
&daemon_address,
|
||||
];
|
||||
if cli_args.remote_node {
|
||||
args.push("--proxy");
|
||||
args.push(&cli_args.i2p_proxy_host);
|
||||
}
|
||||
let output = Command::new(format!("{}/monero-wallet-rpc", bin_dir))
|
||||
.args(args)
|
||||
.spawn()
|
||||
|
|
Loading…
Reference in a new issue