diff --git a/README.md b/README.md index 10321fa..0858f85 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ NEVidebla-EKOnomia (invisible economy) * `git clone https://github.com/creating2morrow/neveko` * `cd neveko && ./scripts/build_all_and_run.sh "-- -h"` * Example to start neveko with remote stagenet node / i2p proxy remote for development: - * `./scripts/build_all_and_run.sh "-- --monero-rpc-daemon http://xmr3kaacphwkk4z2gp35bdl47lrrnzimmyqj4oliauqrjzqecofa.b32.i2p:38081 --monero-location /path/to/monero-x86_64-linux-gnu-v0.18.2.2/ --i2p-proxy-host x.x.x.x:port --i2p-tunnels-json /path/to/manual-i2p/config/ --i2p-advanced --i2p-socks-proxy-host x.x.x.x:xxxx` + * `./scripts/build_all_and_run.sh "-- --monero-rpc-daemon http://xmr3kaacphwkk4z2gp35bdl47lrrnzimmyqj4oliauqrjzqecofa.b32.i2p:38081 --monero-location /path/to/monero-x86_64-linux-gnu-v0.18.2.2/ --i2p-proxy-host http://x.x.x.x:port --i2p-tunnels-json /path/to/manual-i2p/config/ --i2p-advanced --i2p-socks-proxy-host http://x.x.x.x:xxxx` * the `--monero-location` flag is needed even when using a remote node because neveko has its own monero-wallet-rpc instance * remote nodes are forced over the `--i2p-proxy-host` diff --git a/neveko-core/src/i2p.rs b/neveko-core/src/i2p.rs index c2064e2..7ec95b3 100644 --- a/neveko-core/src/i2p.rs +++ b/neveko-core/src/i2p.rs @@ -155,7 +155,7 @@ fn create_tx_proxy_tunnel() { .args([ "socks.create", "127.0.0.1", - &format!("{}", utils::get_i2p_wallet_proxy_host()), + &format!("{}", get_i2p_socks_proxy_port()), ]) .spawn() .expect("i2p-zero failed to create a tx proxy tunnel"); @@ -187,6 +187,15 @@ fn get_i2p_proxy_port() -> String { port } +/// Extract i2p socks port from command line arg +fn get_i2p_socks_proxy_port() -> String { + let proxy_host = utils::get_i2p_wallet_proxy_host(); + let values = proxy_host.split(":"); + let mut v: Vec = values.map(|s| String::from(s)).collect(); + let port = v.remove(2); + port +} + /// Create the http proxy if it doesn't exist fn create_http_proxy() { let args = args::Args::parse(); diff --git a/neveko-core/src/utils.rs b/neveko-core/src/utils.rs index d187027..6971c8b 100644 --- a/neveko-core/src/utils.rs +++ b/neveko-core/src/utils.rs @@ -535,12 +535,12 @@ pub async fn start_up() { wallet_password = read_password().unwrap(); std::env::set_var(crate::MONERO_WALLET_PASSWORD, &wallet_password); } - gen_app_wallet(&wallet_password).await; + gen_app_gpg().await; + let env: String = get_release_env().value(); if !args.i2p_advanced { i2p::start().await; } - gen_app_gpg().await; - let env: String = get_release_env().value(); + gen_app_wallet(&wallet_password).await; start_gui(); { tokio::spawn(async {