mirror of
https://github.com/Cyrix126/gupaxx.git
synced 2025-03-29 18:49:02 +00:00
feat: upgrade deps and fix breaking change
This commit is contained in:
parent
ce021ca63b
commit
92ac5f2d3e
5 changed files with 290 additions and 224 deletions
472
Cargo.lock
generated
472
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
16
Cargo.toml
16
Cargo.toml
|
@ -30,7 +30,7 @@ clap = {version="4.5", features=["cargo", "derive"]}
|
|||
anyhow = "1.0.95"
|
||||
benri = "0.1.12"
|
||||
bytes = "1.9.0"
|
||||
dirs = "5.0.1"
|
||||
dirs = "6.0.0"
|
||||
#--------------------------------------------------------------------------------
|
||||
egui = "0.30"
|
||||
# egui = {git="https://github.com/emilk/egui"}
|
||||
|
@ -54,25 +54,25 @@ reqwest = {version = "0.12.12", default-features=false, features=["json", "rustl
|
|||
reqwest-middleware = "0.4"
|
||||
reqwest-retry = "0.7"
|
||||
image = { version = "0.25.5", features = ["png"] }
|
||||
log = "0.4.22"
|
||||
log = "0.4.25"
|
||||
num-format = { version = "0.4.4", default-features = false }
|
||||
once_cell = "1.20.2"
|
||||
portable-pty = "0.8.1"
|
||||
rand = "0.8.5"
|
||||
rand = "0.9.0"
|
||||
regex = { version = "1.11.1", default-features = false, features = ["perf"] }
|
||||
rfd = "0.15.2"
|
||||
serde = { version = "1.0.217", features = ["rc", "derive"] }
|
||||
serde_json = "1.0.134"
|
||||
serde_json = "1.0.137"
|
||||
sysinfo = { version = "0.33.1", default-features = false, features=["system"] }
|
||||
# tls-api = "0.9.0"
|
||||
tokio = { version = "1.42.0", features = ["rt", "time", "macros", "process", "rt-multi-thread"] }
|
||||
tokio = { version = "1.43.0", features = ["rt", "time", "macros", "process", "rt-multi-thread"] }
|
||||
toml = { version = "0.8.19", features = ["preserve_order"] }
|
||||
walkdir = "2.5.0"
|
||||
zeroize = "1.8.1"
|
||||
strsim = "0.11.1"
|
||||
strip-ansi-escapes = "0.2.0"
|
||||
strip-ansi-escapes = "0.2.1"
|
||||
derive_more = {version="1.0.0", default-features=false, features=["display", "deref", "deref_mut"]}
|
||||
serde-this-or-that = "0.4.2"
|
||||
serde-this-or-that = "0.5.0"
|
||||
readable = "0.16"
|
||||
chrono = {version="0.4.39", default-features=false, features=["clock", "std"]}
|
||||
enclose = "1.2.0"
|
||||
|
@ -115,7 +115,7 @@ egui = {version="0.30", features=["callstack"]}
|
|||
# glow start on windows but not wgpu
|
||||
# need the same version that eframe is using with egui_wgpu
|
||||
# feature angle to enable support for old cpu on Windows
|
||||
wgpu = {version = "23.0", features=["angle"]}
|
||||
wgpu = {version = "23.0.1", features=["angle"]}
|
||||
zip = "2.2.2"
|
||||
is_elevated = "0.1.2"
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ use crate::components::update::get_user_agent;
|
|||
use crate::{constants::*, macros::*};
|
||||
use egui::Color32;
|
||||
use log::*;
|
||||
use rand::{Rng, thread_rng};
|
||||
use rand::{Rng, rng};
|
||||
use reqwest::{Client, RequestBuilder};
|
||||
use std::sync::{Arc, Mutex};
|
||||
use std::time::{Duration, Instant};
|
||||
|
@ -103,18 +103,18 @@ impl RemoteNode {
|
|||
|
||||
// Return a random node (that isn't the one already selected).
|
||||
pub fn get_random(current_ip: &str) -> String {
|
||||
let mut rng = thread_rng().gen_range(0..REMOTE_NODE_LENGTH);
|
||||
let mut node = REMOTE_NODES[rng].0;
|
||||
let mut random_rng = rng().random_range(0..REMOTE_NODE_LENGTH);
|
||||
let mut node = REMOTE_NODES[random_rng].0;
|
||||
while current_ip == node {
|
||||
rng = thread_rng().gen_range(0..REMOTE_NODE_LENGTH);
|
||||
node = REMOTE_NODES[rng].0;
|
||||
random_rng = rng().random_range(0..REMOTE_NODE_LENGTH);
|
||||
node = REMOTE_NODES[random_rng].0;
|
||||
}
|
||||
node.to_string()
|
||||
}
|
||||
|
||||
// Return a random valid node (no input str).
|
||||
pub fn get_random_same_ok() -> Self {
|
||||
let rng = thread_rng().gen_range(0..REMOTE_NODE_LENGTH);
|
||||
let rng = rng().random_range(0..REMOTE_NODE_LENGTH);
|
||||
Self::from_index(rng)
|
||||
}
|
||||
|
||||
|
|
|
@ -35,8 +35,8 @@ use crate::{
|
|||
};
|
||||
use anyhow::{Error, anyhow};
|
||||
use log::*;
|
||||
use rand::distributions::Alphanumeric;
|
||||
use rand::{Rng, thread_rng};
|
||||
use rand::distr::Alphanumeric;
|
||||
use rand::{Rng, rng};
|
||||
use reqwest::header::{LOCATION, USER_AGENT};
|
||||
use reqwest::{Client, RequestBuilder};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
@ -204,7 +204,7 @@ impl Update {
|
|||
// using [std::fs::rename()] on tmpfs -> disk (Invalid cross-device link (os error 18)).
|
||||
// So, uses the [Gupax] binary directory as a base, something like [/home/hinto/gupax/gupax_update_SG4xsDdVmr]
|
||||
pub fn get_tmp_dir() -> Result<String, anyhow::Error> {
|
||||
let rand_string: String = thread_rng()
|
||||
let rand_string: String = rng()
|
||||
.sample_iter(&Alphanumeric)
|
||||
.take(10)
|
||||
.map(char::from)
|
||||
|
@ -622,7 +622,7 @@ impl Update {
|
|||
pub fn get_user_agent() -> &'static str {
|
||||
let index = FAKE_USER_AGENT.len() - 1;
|
||||
|
||||
let rand = thread_rng().gen_range(0..index);
|
||||
let rand = rng().random_range(0..index);
|
||||
let user_agent = FAKE_USER_AGENT[rand];
|
||||
info!("Randomly selected User-Agent ({rand}/{index}) ... {user_agent}");
|
||||
user_agent
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use anyhow::Result;
|
||||
use rand::{Rng, distributions::Alphanumeric, thread_rng};
|
||||
use rand::{Rng, distr::Alphanumeric, rng};
|
||||
use strum::{EnumCount, EnumIter};
|
||||
|
||||
use super::*;
|
||||
|
@ -444,7 +444,7 @@ impl Default for XmrigProxy {
|
|||
XmrigProxy {
|
||||
simple: true,
|
||||
arguments: Default::default(),
|
||||
token: thread_rng()
|
||||
token: rng()
|
||||
.sample_iter(Alphanumeric)
|
||||
.take(16)
|
||||
.map(char::from)
|
||||
|
@ -685,7 +685,7 @@ impl Default for Xmrig {
|
|||
rpc: "18081".to_string(),
|
||||
zmq_rig: "18083".to_string(),
|
||||
},
|
||||
token: thread_rng()
|
||||
token: rng()
|
||||
.sample_iter(Alphanumeric)
|
||||
.take(16)
|
||||
.map(char::from)
|
||||
|
|
Loading…
Reference in a new issue