mirror of
https://github.com/creating2morrow/neveko.git
synced 2024-12-22 11:39:22 +00:00
ensure socks proxy is up before starting wallet rpc
This commit is contained in:
parent
f50cb91842
commit
9077a61cfd
3 changed files with 14 additions and 5 deletions
|
@ -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`
|
||||
|
|
|
@ -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<String> = 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();
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue