migrate nevmes -> neveko

This commit is contained in:
creating2morrow 2023-06-03 10:17:58 -04:00
parent 8cf7337e8c
commit 01a629d46b
283 changed files with 214 additions and 213 deletions

View file

@ -23,5 +23,5 @@ jobs:
- run: ./scripts/build_release.sh ${{ steps.extract_branch.outputs.branch }}
- uses: actions/upload-artifact@v3
with:
name: nevmes-x86_64-linux-gnu-${{ steps.extract_branch.outputs.branch }}
path: nevmes-x86_64-linux-gnu-${{ steps.extract_branch.outputs.branch }}.tar.bz2
name: neveko-x86_64-linux-gnu-${{ steps.extract_branch.outputs.branch }}
path: neveko-x86_64-linux-gnu-${{ steps.extract_branch.outputs.branch }}.tar.bz2

View file

@ -25,4 +25,4 @@ jobs:
- name: Build
run: cargo build --verbose
- name: Run tests
run: cd nevmes-core && RUST_TEST_THREADS=1 cargo test --verbose
run: cd neveko-core && RUST_TEST_THREADS=1 cargo test --verbose

36
Cargo.lock generated
View file

@ -1926,41 +1926,41 @@ dependencies = [
]
[[package]]
name = "nevmes"
name = "neveko"
version = "0.5.0-alpha"
dependencies = [
"env_logger",
"nevmes_auth",
"nevmes_contact",
"nevmes_core",
"nevmes_gui",
"nevmes_market",
"nevmes_message",
"neveko_auth",
"neveko_contact",
"neveko_core",
"neveko_gui",
"neveko_market",
"neveko_message",
"rocket",
]
[[package]]
name = "nevmes_auth"
name = "neveko_auth"
version = "0.5.0-alpha"
dependencies = [
"env_logger",
"log 0.4.17",
"nevmes_core",
"neveko_core",
"rocket",
]
[[package]]
name = "nevmes_contact"
name = "neveko_contact"
version = "0.5.0-alpha"
dependencies = [
"env_logger",
"log 0.4.17",
"nevmes_core",
"neveko_core",
"rocket",
]
[[package]]
name = "nevmes_core"
name = "neveko_core"
version = "0.5.0-alpha"
dependencies = [
"chrono",
@ -1985,7 +1985,7 @@ dependencies = [
]
[[package]]
name = "nevmes_gui"
name = "neveko_gui"
version = "0.5.0-alpha"
dependencies = [
"chrono",
@ -1996,7 +1996,7 @@ dependencies = [
"hex",
"image",
"log 0.4.17",
"nevmes_core",
"neveko_core",
"qrcode",
"reqwest",
"serde",
@ -2009,23 +2009,23 @@ dependencies = [
]
[[package]]
name = "nevmes_market"
name = "neveko_market"
version = "0.5.0-alpha"
dependencies = [
"chrono",
"env_logger",
"log 0.4.17",
"nevmes_core",
"neveko_core",
"rocket",
]
[[package]]
name = "nevmes_message"
name = "neveko_message"
version = "0.5.0-alpha"
dependencies = [
"env_logger",
"log 0.4.17",
"nevmes_core",
"neveko_core",
"rocket",
]

View file

@ -1,5 +1,5 @@
[package]
name = "nevmes"
name = "neveko"
version = "0.5.0-alpha"
edition = "2021"
@ -7,10 +7,10 @@ edition = "2021"
[dependencies]
env_logger = "0.10.0"
nevmes_auth = { path = "./nevmes-auth" }
nevmes_contact = { path = "./nevmes-contact" }
nevmes_core = { path = "./nevmes-core" }
nevmes_gui = { path = "./nevmes-gui" }
nevmes_market = { path = "./nevmes-market" }
nevmes_message = { path = "./nevmes-message" }
neveko_auth = { path = "./neveko-auth" }
neveko_contact = { path = "./neveko-contact" }
neveko_core = { path = "./neveko-core" }
neveko_gui = { path = "./neveko-gui" }
neveko_market = { path = "./neveko-market" }
neveko_message = { path = "./neveko-message" }
rocket = { version = "0.5.0-rc.2", features = ["json"] }

View file

@ -1,18 +1,19 @@
# NEVMES
# NEVEKO
NEVidebla-MESago (invisible message)
NEVidebla-EKOnomia (invisible economy)
[![cargo-build](https://github.com/creating2morrow/nevmes/actions/workflows/rust.yml/badge.svg?branch=main)](https://github.com/creating2morrow/nevmes/actions/workflows/rust.yml)
[![cargo-audit](https://github.com/creating2morrow/nevmes/actions/workflows/audit.yml/badge.svg?branch=main)](https://github.com/creating2morrow/nevmes/actions/workflows/audit.yml)
[![cargo-build](https://github.com/creating2morrow/neveko/actions/workflows/rust.yml/badge.svg?branch=main)](https://github.com/creating2morrow/neveko/actions/workflows/rust.yml)
[![cargo-audit](https://github.com/creating2morrow/neveko/actions/workflows/audit.yml/badge.svg?branch=main)](https://github.com/creating2morrow/neveko/actions/workflows/audit.yml)
### gpg and i2p made simple for end-to-end encrypted, secure comms
### gpg and i2p made simple for end-to-end encrypted, secure marketplace, messaging and more
## About
* send messages over the invisible internet
* vanity base32 addresses (advanced)
* automated mandatory gpg key encryption
* xmr payment integration
* self-hosted i2p marketplace
* xmr multisig / payment integration
## Dev
@ -20,14 +21,14 @@ NEVidebla-MESago (invisible message)
* install dependencies
* ubuntu example: `sudo apt update -y && sudo apt upgrade -y`
* `sudo apt install -y libssl-dev build-essential libgpgme-dev`
* `git clone https://github.com/creating2morrow/nevmes`
* `cd nevmes && ./scripts/build_all_and_run.sh "-- -h"`
* `git clone https://github.com/creating2morrow/neveko`
* `cd neveko && ./scripts/build_all_and_run.sh "-- -h"`
* gui built with rust [egui](https://docs.rs/egui/latest/egui/)
## Installation Mananger
* additional required software can be downloaded from the gui home or `Binaries` links below
* hashes are in core [lib.rs](./nevmes-core/src/lib.rs)
* hashes are in core [lib.rs](./neveko-core/src/lib.rs)
* download i2p-zero, put the path in the connection manager or cli `--i2p-zero-dir` flag
* download monero, update connection manager or cli
* `--monero-blockchain-dir`, where to put lmdb for monero (e.g. path/to/ssd)
@ -72,19 +73,19 @@ NEVidebla-MESago (invisible message)
## Binaries
* nevmes-auth - `internal` auth server
* nevmes-contact - `internal` add contacts server
* nevmes-gui - primary user interface
* nevmes-market - `internal` marketplace admin server
* nevmes-message - `internal` message tx/read etc. server
* nevmes - `external` primary server for contact share, payment, market, message rx etc.
* neveko-auth - `internal` auth server
* neveko-contact - `internal` add contacts server
* neveko-gui - primary user interface
* neveko-market - `internal` marketplace admin server
* neveko-message - `internal` message tx/read etc. server
* neveko - `external` primary server for contact share, payment, market, message rx etc.
* [monerod](https://www.getmonero.org/downloads/#cli) - (not included) monero-wallet-rpc needs this
* can be overriden with remote node
* use the `--remote-node` flag
* [monero-wallet-rpc](https://www.getmonero.org/downloads/#cli) - (not included) interface for xmr wallet ops
* [i2p-zero](https://github.com/creating2morrow/i2p-zero/releases/tag/v1.21-nevmes) - (not included) tunnel creation and http proxy
* [i2p-zero](https://github.com/creating2morrow/i2p-zero/releases/tag/v1.21-neveko) - (not included) tunnel creation and http proxy
most of the complex logic stays in nevmes-core, exported from [lib.rs](./nevmes-core/src/lib.rs)
most of the complex logic stays in neveko-core, exported from [lib.rs](./neveko-core/src/lib.rs)
## Manual

View file

@ -10,10 +10,10 @@
### JWP (JSON Web Proof)
* utilizes some external blockchain (nevmes uses monero) for authorization of auth tokens
* utilizes some external blockchain (neveko uses monero) for authorization of auth tokens
* 32 byte random signing keys generated on app start-up
* `Hmac<Sha384>` internal, `Hmac<Sha512>` external (jwp)
* see [proof.rs](../nevmes-core/src/proof.rs)
* see [proof.rs](../neveko-core/src/proof.rs)
`eyJhbGciOiJIUzUxMiJ9.eyJhZGRyZXNzIjoiNThvaUJMQUtBQ3JaeTRqVnRYdUFXMzlCOW1zR3dlbVVkSm9HVlozcGdSY1RoWHZqWjZ0RERqRGpuOE1mTUZ5cEtZMlU1U1B6SkE3NnFHeHhDdjJzd1Y0NjhFYkI2dEsiLCJoYXNoIjoiNzRhOTM5NTU1Y2EyMWJmY2MxYzlhMjhlYjFkN2M5MWZiMjRhYzRiOTY4MDk2Yzg4ODU1ODA3ODcwMDA1NmQ2NiIsIm1lc3NhZ2UiOiIiLCJzaWduYXR1cmUiOiJPdXRQcm9vZlYyWHdYTEJYV0VtbXlWd3YyOHFQRWQ0Mk14bm1FNTU3aUFEVHFGNjZDWG9LQ1ZFeFBqTVU4NFNIeWprZmdLd01WZEI4OUZkTkJ5QUxyeU1ZamVxQlY1U0VtU0V4MUJWWE1ITVJNWHVuMzh5aWVtcWhCcmVSWUdpRGdMN1lmRmVmemJSTnhlIn0.gH4RlLrxu3xqxNvsHv7lX1yYomg07yTlv6VEKpDfXwbDV4O267CXzm30G4YBQOfuDf3xpegUmeVXOScPvIZVRw`
* contents be decoded by 3rd parties but only the owner of the signing key can finalize the validation
* should be kept secret
@ -24,7 +24,7 @@
* go to `AddressBook` in the gui
* enter .b32.i2p address of contact and click add
* if all goes well you will have imported their public nevmes gpg app key
* if all goes well you will have imported their public neveko gpg app key
* dont reuse the app gpg keys anywhere else!
* don't forget to trust the contact with `sign key` in the `check status` window
@ -32,7 +32,7 @@
* getting started the app will automatically generate an account and associated monero PRIMARY address. Only use it here to maintain privacy
* deposit some stagenet monero in your xmr account (address at top of gui screen)
* once unlocked nevmes xmr balance will display
* once unlocked neveko xmr balance will display
* click `check status` and `Create JWP`
* when authorizing to send to contact an invoice will be generated
* authorize payment and tx proof generation in the prompt
@ -46,7 +46,7 @@
* the `check status` button will show current jwp for each contact
* `clear stale jwp` will purge data in case of timeout issues
* don't keep large amounts in nevmes just enough for fees and jwps
* don't keep large amounts in neveko just enough for fees and jwps
* once a valid jwp is created (takes a few minutes) the `compose` button will be visible
* you need to click `check status` on contacts before sending to refresh jwp expiration check
* draft a plain text message, dont be shy

View file

@ -1188,17 +1188,17 @@ dependencies = [
]
[[package]]
name = "nevmes_auth"
name = "neveko_auth"
version = "0.5.0-alpha"
dependencies = [
"env_logger",
"log 0.4.17",
"nevmes_core",
"neveko_core",
"rocket",
]
[[package]]
name = "nevmes_core"
name = "neveko_core"
version = "0.5.0-alpha"
dependencies = [
"chrono",

View file

@ -1,5 +1,5 @@
[package]
name = "nevmes_auth"
name = "neveko_auth"
version = "0.5.0-alpha"
edition = "2021"
@ -7,6 +7,6 @@ edition = "2021"
[dependencies]
env_logger = "0.10.0"
nevmes_core = { path = "../nevmes-core" }
neveko_core = { path = "../neveko-core" }
log = "0.4"
rocket = { version = "0.5.0-rc.2", features = ["json"] }

View file

@ -5,7 +5,7 @@ use rocket::{
serde::json::Json,
};
use nevmes_core::{
use neveko_core::{
auth,
models::*,
};

View file

@ -1,8 +1,8 @@
#[macro_use]
extern crate rocket;
use nevmes_auth::*;
use nevmes_core::*;
use neveko_auth::*;
use neveko_core::*;
// The only changes in here should be mounting new controller methods
@ -13,6 +13,6 @@ async fn rocket() -> _ {
..rocket::Config::debug_default()
};
env_logger::init();
log::info!("nevmes-auth is online");
log::info!("neveko-auth is online");
rocket::custom(&config).mount("/", routes![controller::login])
}

View file

@ -1188,17 +1188,17 @@ dependencies = [
]
[[package]]
name = "nevmes_contact"
name = "neveko_contact"
version = "0.5.0-alpha"
dependencies = [
"env_logger",
"log 0.4.17",
"nevmes_core",
"neveko_core",
"rocket",
]
[[package]]
name = "nevmes_core"
name = "neveko_core"
version = "0.5.0-alpha"
dependencies = [
"chrono",

View file

@ -1,5 +1,5 @@
[package]
name = "nevmes_contact"
name = "neveko_contact"
version = "0.5.0-alpha"
edition = "2021"
@ -7,6 +7,6 @@ edition = "2021"
[dependencies]
env_logger = "0.10.0"
nevmes_core = { path = "../nevmes-core" }
neveko_core = { path = "../neveko-core" }
log = "0.4"
rocket = { version = "0.5.0-rc.2", features = ["json"] }

View file

@ -6,7 +6,7 @@ use rocket::{
serde::json::Json,
};
use nevmes_core::{
use neveko_core::{
auth,
contact,
models::*,

View file

@ -1,8 +1,8 @@
#[macro_use]
extern crate rocket;
use nevmes_contact::*;
use nevmes_core::*;
use neveko_contact::*;
use neveko_core::*;
// The only changes in here should be mounting new controller methods
@ -13,7 +13,7 @@ async fn rocket() -> _ {
..rocket::Config::debug_default()
};
env_logger::init();
log::info!("nevmes-contact is online");
log::info!("neveko-contact is online");
rocket::custom(&config)
.mount("/trust", routes![controller::trust_contact])
.mount("/prove", routes![controller::prove_payment])

View file

@ -1188,7 +1188,7 @@ dependencies = [
]
[[package]]
name = "nevmes_core"
name = "neveko_core"
version = "0.5.0-alpha"
dependencies = [
"chrono",

View file

@ -1,5 +1,5 @@
[package]
name = "nevmes_core"
name = "neveko_core"
version = "0.5.0-alpha"
edition = "2021"

View file

@ -17,7 +17,7 @@ use rocket::serde::json::Json;
use std::error::Error;
/// Environment variable for activating vendor functionality
pub const NEVMES_VENDOR_ENABLED: &str = "NEVMES_VENDOR_ENABLED";
pub const NEVEKO_VENDOR_ENABLED: &str = "NEVEKO_VENDOR_ENABLED";
/// Create a new contact
pub async fn create(c: &Json<Contact>) -> Contact {
@ -99,7 +99,7 @@ async fn validate_contact(j: &Json<Contact>) -> bool {
/// Send our information
pub async fn share() -> Contact {
let vendor_env = std::env::var(NEVMES_VENDOR_ENABLED).unwrap_or(String::from("0"));
let vendor_env = std::env::var(NEVEKO_VENDOR_ENABLED).unwrap_or(String::from("0"));
let is_vendor = vendor_env == String::from("1");
let m_address: reqres::XmrRpcAddressResponse = monero::get_address().await;
let gpg_key = gpg::export_key().unwrap_or(Vec::new());
@ -123,11 +123,11 @@ pub fn exists(from: &String) -> bool {
return addresses.contains(from);
}
/// Sign for trusted nevmes contacts
/// Sign for trusted neveko contacts
///
/// UI/UX should have some prompt about the implication of trusting keys
///
/// however that is beyond the scope of this app. nevmes assumes contacts
/// however that is beyond the scope of this app. neveko assumes contacts
///
/// using the app already have some level of knowledge about each other.
///

View file

@ -29,7 +29,7 @@ impl Interface {
pub fn open() -> Self {
let release_env = utils::get_release_env();
let file_path = format!(
"/home/{}/.nevmes/",
"/home/{}/.neveko/",
std::env::var("USER").unwrap_or(String::from("user"))
);
let mut env_str: &str = "test-lmdb";
@ -46,7 +46,7 @@ impl Interface {
tokio::time::sleep(std::time::Duration::from_micros(1)).await;
self::Interface::open()
}
/// Write a key-value to LMDB. NEVMES does not currently support
/// Write a key-value to LMDB. NEVEKO does not currently support
///
/// writing multiple key value pairs.
pub fn write(e: &Environment, h: &DbHandle, k: &str, v: &str) {
@ -72,7 +72,7 @@ impl Interface {
///
/// string. If the value does not exist an empty string is
///
/// returned. NEVMES does not currently support duplicate keys.
/// returned. NEVEKO does not currently support duplicate keys.
pub fn read(e: &Environment, h: &DbHandle, k: &str) -> String {
let reader = e.get_reader().unwrap();
let db = reader.bind(&h);

View file

@ -75,7 +75,7 @@ pub fn export_key() -> Result<Vec<u8>, Box<dyn Error>> {
/// Import gpg keys from contacts
pub fn import_key(cid: String, key: Vec<u8>) -> Result<(), Box<dyn Error>> {
info!("importing key: {}", hex::encode(&key));
let filename = format!("{}.nevmes", &cid);
let filename = format!("{}.neveko", &cid);
let mut f = File::create(&filename)?;
f.write_all(&key)?;
let mut ctx = Context::from_protocol(gpgme::Protocol::OpenPgp)?;
@ -99,7 +99,7 @@ pub fn encrypt(name: String, body: &Vec<u8>) -> Result<Vec<u8>, Box<dyn Error>>
.filter_map(|x| x.ok())
.filter(|k| k.can_encrypt())
.collect();
let filename = format!("{}.nevmes", name);
let filename = format!("{}.neveko", name);
let mut f = File::create(&filename)?;
f.write_all(body)?;
let mut input =
@ -119,7 +119,7 @@ pub fn decrypt(mid: &String, body: &Vec<u8>) -> Result<Vec<u8>, Box<dyn Error>>
let proto = Protocol::OpenPgp;
let mut ctx = Context::from_protocol(proto)?;
ctx.set_armor(true);
let filename = format!("{}.nevmes", mid);
let filename = format!("{}.neveko", mid);
let mut f = File::create(&filename)?;
f.write_all(&body)?;
let mut input =

View file

@ -113,7 +113,7 @@ pub async fn start() {
}
}
/// Create an i2p tunnel for the NEVMES application
/// Create an i2p tunnel for the NEVEKO application
fn create_tunnel() {
info!("creating tunnel");
let args = args::Args::parse();

View file

@ -12,8 +12,8 @@ pub mod reqres; // http request/responses
pub mod user; // misc.
pub mod utils; // user rep/service layer
pub const NEVMES_JWP_SECRET_KEY: &str = "NEVMES_JWP_SECRET_KEY";
pub const NEVMES_JWT_SECRET_KEY: &str = "NEVMES_JWT_SECRET_KEY";
pub const NEVEKO_JWP_SECRET_KEY: &str = "NEVEKO_JWP_SECRET_KEY";
pub const NEVEKO_JWT_SECRET_KEY: &str = "NEVEKO_JWT_SECRET_KEY";
// TODO(c2m): better handling of setting initial wallet password
/// Environment variable for injecting wallet password

View file

@ -148,7 +148,7 @@ fn parse_multisig_message(mid: String) -> MultisigMessageData {
///
/// ```rust
/// // lookup prepare info for vendor
/// use nevmes_core::db;
/// use neveko_core::db;
/// let s = db::Interface::open();
/// let key = "prepare-o123-test.b32.i2p";
/// db::Interface::read(&s.env, &s.handle, &key);

View file

@ -143,7 +143,7 @@ pub fn start_rpc() {
let daemon_address = get_rpc_daemon();
let rpc_login = format!("{}:{}", &login.username, &login.credential);
let mut wallet_dir = format!(
"/home/{}/.nevmes/stagenet/wallet/",
"/home/{}/.neveko/stagenet/wallet/",
std::env::var("USER").unwrap_or(String::from("user")),
);
let release_env = utils::get_release_env();
@ -166,7 +166,7 @@ pub fn start_rpc() {
debug!("{:?}", output.stdout);
} else {
wallet_dir = format!(
"/home/{}/.nevmes/wallet/",
"/home/{}/.neveko/wallet/",
std::env::var("USER").unwrap_or(String::from("user")),
);
let args = [

View file

@ -147,7 +147,7 @@ pub async fn prove_payment(contact: String, txp: &TxProof) -> Result<reqres::Jwp
///
/// is a JWP (JSON Web Proof) with the contents:
///
/// `subaddress`: a subaddress belonging to this nevmes instance
/// `subaddress`: a subaddress belonging to this neveko instance
///
/// `created`: UTC timestamp the proof was created.
/// <i>Future use</i> Potential offline payments.

View file

@ -120,7 +120,7 @@ pub fn start_core(conn: &Connections) {
"-r",
env,
];
let output = std::process::Command::new("./nevmes")
let output = std::process::Command::new("./neveko")
.args(args)
.spawn()
.expect("core module failed to start");
@ -248,7 +248,7 @@ pub const fn message_limit() -> usize {
async fn gen_app_gpg() {
let mut gpg_key = gpg::find_key().unwrap_or(utils::empty_string());
if gpg_key == utils::empty_string() {
info!("no gpg key found for nevmes, creating it...");
info!("no gpg key found for neveko, creating it...");
// wait for key gen
gpg::write_gen_batch().unwrap();
gpg::gen_key();
@ -261,7 +261,7 @@ async fn gen_app_gpg() {
/// Handles panic! for missing wallet directory
fn create_wallet_dir() {
let file_path = format!(
"/home/{}/.nevmes",
"/home/{}/.neveko",
std::env::var("USER").unwrap_or(String::from("user"))
);
let s_output = std::process::Command::new("mkdir")
@ -279,7 +279,7 @@ fn create_wallet_dir() {
/// Generate application wallet at startup if none exist
async fn gen_app_wallet(password: &String) {
info!("fetching application wallet");
let filename = "nevmes";
let filename = "neveko";
let mut m_wallet = monero::open_wallet(String::from(filename), password).await;
if !m_wallet {
m_wallet = monero::create_wallet(String::from(filename), password).await;
@ -304,11 +304,11 @@ fn gen_signing_keys() {
let s = db::Interface::open();
if jwp == utils::empty_string() {
let rnd_jwp = generate_rnd();
db::Interface::write(&s.env, &s.handle, crate::NEVMES_JWP_SECRET_KEY, &rnd_jwp);
db::Interface::write(&s.env, &s.handle, crate::NEVEKO_JWP_SECRET_KEY, &rnd_jwp);
}
if jwt == utils::empty_string() {
let rnd_jwt = generate_rnd();
db::Interface::write(&s.env, &s.handle, crate::NEVMES_JWT_SECRET_KEY, &rnd_jwt);
db::Interface::write(&s.env, &s.handle, crate::NEVEKO_JWT_SECRET_KEY, &rnd_jwt);
}
}
@ -317,13 +317,13 @@ fn gen_signing_keys() {
/// dont' forget to generate new keys as well
pub fn revoke_signing_keys() {
let s = db::Interface::open();
db::Interface::delete(&s.env, &s.handle, crate::NEVMES_JWT_SECRET_KEY);
db::Interface::delete(&s.env, &s.handle, crate::NEVMES_JWP_SECRET_KEY);
db::Interface::delete(&s.env, &s.handle, crate::NEVEKO_JWT_SECRET_KEY);
db::Interface::delete(&s.env, &s.handle, crate::NEVEKO_JWP_SECRET_KEY);
}
pub fn get_jwt_secret_key() -> String {
let s = db::Interface::open();
let r = db::Interface::read(&s.env, &s.handle, crate::NEVMES_JWT_SECRET_KEY);
let r = db::Interface::read(&s.env, &s.handle, crate::NEVEKO_JWT_SECRET_KEY);
if r == utils::empty_string() {
error!("JWT key not found");
return Default::default();
@ -333,7 +333,7 @@ pub fn get_jwt_secret_key() -> String {
pub fn get_jwp_secret_key() -> String {
let s = db::Interface::open();
let r = db::Interface::read(&s.env, &s.handle, crate::NEVMES_JWP_SECRET_KEY);
let r = db::Interface::read(&s.env, &s.handle, crate::NEVEKO_JWP_SECRET_KEY);
if r == utils::empty_string() {
error!("JWP key not found");
return Default::default();
@ -344,37 +344,37 @@ pub fn get_jwp_secret_key() -> String {
/// Start the remote access microservers `--remote-access` flag
fn start_micro_servers() {
info!("starting auth server");
let mut auth_path = "nevmes-auth/target/debug/nevmes_auth";
let mut auth_path = "neveko-auth/target/debug/neveko_auth";
let env = get_release_env();
if env == ReleaseEnvironment::Production {
auth_path = "nevmes_auth";
auth_path = "neveko_auth";
}
let a_output = std::process::Command::new(auth_path)
.spawn()
.expect("failed to start auth server");
debug!("{:?}", a_output.stdout);
info!("starting contact server");
let mut contact_path = "nevmes-contact/target/debug/nevmes_contact";
let mut contact_path = "neveko-contact/target/debug/neveko_contact";
if env == ReleaseEnvironment::Production {
contact_path = "nevmes_contact";
contact_path = "neveko_contact";
}
let c_output = std::process::Command::new(contact_path)
.spawn()
.expect("failed to start contact server");
debug!("{:?}", c_output.stdout);
info!("starting marketplace admin server");
let mut market_path = "nevmes-contact/target/debug/nevmes_market";
let mut market_path = "neveko-contact/target/debug/neveko_market";
if env == ReleaseEnvironment::Production {
market_path = "nevmes_market";
market_path = "neveko_market";
}
let market_output = std::process::Command::new(market_path)
.spawn()
.expect("failed to start marketplace server");
debug!("{:?}", market_output.stdout);
info!("starting message server");
let mut message_path = "nevmes-message/target/debug/nevmes_message";
let mut message_path = "neveko-message/target/debug/neveko_message";
if env == ReleaseEnvironment::Production {
message_path = "nevmes_message";
message_path = "neveko_message";
}
let m_output = std::process::Command::new(message_path)
.spawn()
@ -382,15 +382,15 @@ fn start_micro_servers() {
debug!("{:?}", m_output.stdout);
}
/// open gui from nevmes core launch
/// open gui from neveko core launch
fn start_gui() {
let args = args::Args::parse();
if args.gui {
info!("starting gui");
let mut gui_path = "nevmes-gui/target/debug/nevmes_gui";
let mut gui_path = "neveko-gui/target/debug/neveko_gui";
let env = get_release_env();
if env == ReleaseEnvironment::Production {
gui_path = "nevmes-gui";
gui_path = "neveko-gui";
}
let g_output = std::process::Command::new(gui_path)
.spawn()
@ -401,7 +401,7 @@ fn start_gui() {
/// Put all app pre-checks here
pub async fn start_up() {
info!("nevmes is starting up");
info!("neveko is starting up");
let args = args::Args::parse();
if args.remote_access {
start_micro_servers();
@ -432,12 +432,12 @@ pub async fn start_up() {
message::retry_fts().await;
});
}
info!("{} - nevmes is online", env);
info!("{} - neveko is online", env);
}
/// Called by gui for cleaning up monerod, rpc, etc.
///
/// pass true from gui connection manager so not to kill nevmes
/// pass true from gui connection manager so not to kill neveko
pub fn kill_child_processes(cm: bool) {
info!("stopping child processes");
// TODO(c2m): prompt on gui letting user determine what background
@ -450,11 +450,11 @@ pub fn kill_child_processes(cm: bool) {
debug!("{:?}", xmrd_output.stdout);
}
if !cm {
let nevmes_output = std::process::Command::new("pkill")
.arg("nevmes")
let neveko_output = std::process::Command::new("pkill")
.arg("neveko")
.spawn()
.expect("nevmes failed to stop");
debug!("{:?}", nevmes_output.stdout);
.expect("neveko failed to stop");
debug!("{:?}", neveko_output.stdout);
}
let rpc_output = std::process::Command::new("killall")
.arg("monero-wallet-rpc")
@ -507,7 +507,7 @@ pub async fn install_software(installations: Installations) -> bool {
let i2p_version = crate::I2P_ZERO_RELEASE_VERSION;
let i2p_zero_zip = format!("i2p-zero-linux.{}.zip", i2p_version);
let link = format!(
"https://github.com/creating2morrow/i2p-zero/releases/download/{}-nevmes/{}",
"https://github.com/creating2morrow/i2p-zero/releases/download/{}-neveko/{}",
i2p_version, i2p_zero_zip
);
let curl = std::process::Command::new("curl")

View file

@ -2,4 +2,4 @@
/core
notes.txt
.env
nevmes
neveko

View file

@ -2408,7 +2408,7 @@ dependencies = [
]
[[package]]
name = "nevmes_core"
name = "neveko_core"
version = "0.5.0-alpha"
dependencies = [
"chrono",
@ -2433,7 +2433,7 @@ dependencies = [
]
[[package]]
name = "nevmes_gui"
name = "neveko_gui"
version = "0.5.0-alpha"
dependencies = [
"bytemuck",
@ -2445,7 +2445,7 @@ dependencies = [
"hex",
"image",
"log 0.4.17",
"nevmes_core",
"neveko_core",
"poll-promise",
"qrcode",
"reqwest",

View file

@ -1,12 +1,12 @@
[package]
name = "nevmes_gui"
name = "neveko_gui"
version = "0.5.0-alpha"
authors = ["emilk", "creating2morrow"]
license = "MIT OR Apache-2.0"
edition = "2021"
rust-version = "1.65"
publish = false
default-run = "nevmes_gui"
default-run = "neveko_gui"
[package.metadata.docs.rs]
all-features = true
@ -32,7 +32,7 @@ egui = { version = "0.21.0", path = "./crates/egui", features = [
"extra_debug_asserts",
] }
hex = "0.4.3"
nevmes_core = { path = "../nevmes-core" }
neveko_core = { path = "../neveko-core" }
log = "0.4"
qrcode = "0.12"
image = "0.23.14"

7
neveko-gui/README.md Normal file
View file

@ -0,0 +1,7 @@
## Dev
Note: gui depends on the binary if starting core from gui
otherwise run neveko core on your own
`cd ../ && cargo build && cp target/debug/neveko neveko-gui/ && cd neveko-gui && RUST_LOG=debug cargo run`

View file

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View file

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View file

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View file

@ -2,6 +2,6 @@ There are no stand-alone egui examples, because egui is not stand-alone!
See the top-level [examples](https://github.com/emilk/egui/tree/master/examples/) folder instead.
There are also plenty of examples in [the online demo](https://www.egui.rs/#demo). You can find the source code for it at <https://github.com/emilk/egui/tree/master/crates/nevmes_gui_lib>.
There are also plenty of examples in [the online demo](https://www.egui.rs/#demo). You can find the source code for it at <https://github.com/emilk/egui/tree/master/crates/neveko_gui_lib>.
To learn how to set up `eframe` for web and native, go to <https://github.com/emilk/eframe_template/> and follow the instructions there!

Some files were not shown because too many files have changed in this diff Show more