mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Merge branch 'xMAC94x/update-deps' into 'master'
updating dependencies, See merge request veloren/veloren!3021
This commit is contained in:
commit
ecbe58eaab
1095
Cargo.lock
generated
1095
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@ -21,8 +21,8 @@ common-net = { package = "veloren-common-net", path = "../common/net" }
|
||||
network = { package = "veloren-network", path = "../network", features = ["compression","quic"], default-features = false }
|
||||
|
||||
byteorder = "1.3.2"
|
||||
tokio = { version = "1.11", default-features = false, features = ["rt-multi-thread"] }
|
||||
quinn = "0.7.2"
|
||||
tokio = { version = "1.14", default-features = false, features = ["rt-multi-thread"] }
|
||||
quinn = "0.8"
|
||||
image = { version = "0.23.12", default-features = false, features = ["png"] }
|
||||
num = "0.4"
|
||||
tracing = { version = "0.1", default-features = false }
|
||||
@ -37,7 +37,7 @@ authc = { git = "https://gitlab.com/veloren/auth.git", rev = "fb3dcbc4962b367253
|
||||
async-channel = { version = "1.6", optional = true }
|
||||
common-ecs = { package = "veloren-common-ecs", path = "../common/ecs", optional = true }
|
||||
serde = { version = "1.0", features = [ "rc", "derive" ], optional = true }
|
||||
ron = { version = "0.6", default-features = false, optional = true }
|
||||
ron = { version = "0.7", default-features = false, optional = true }
|
||||
clap = { version = "2.33", optional = true }
|
||||
rustyline = { version = "9.0.0", optional = true }
|
||||
## logging
|
||||
|
@ -235,7 +235,7 @@ impl Client {
|
||||
"QUIC is enabled. This is experimental and you won't be able to connect to \
|
||||
TCP servers unless deactivated"
|
||||
);
|
||||
let config = quinn::ClientConfigBuilder::default().build();
|
||||
let config = quinn::ClientConfig::with_native_roots();
|
||||
addr::try_connect(&network, &hostname, prefer_ipv6, |a| {
|
||||
ConnectAddr::Quic(a, config.clone(), hostname.clone())
|
||||
})
|
||||
|
@ -28,9 +28,9 @@ enum-iterator = "0.7"
|
||||
vek = { version = "=0.14.1", features = ["serde"] }
|
||||
|
||||
# Strum
|
||||
strum = { version = "0.21", features = ["derive"] }
|
||||
strum = { version = "0.23", features = ["derive"] }
|
||||
# TODO: remove this and rewrite every use of strum_macros to strum
|
||||
strum_macros = "0.21"
|
||||
strum_macros = "0.23"
|
||||
|
||||
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
||||
approx = "0.4.0"
|
||||
@ -82,7 +82,7 @@ specs-idvs = { git = "https://gitlab.com/veloren/specs-idvs.git", rev = "8be2abc
|
||||
criterion = "0.3"
|
||||
|
||||
#test
|
||||
tracing-subscriber = { version = "0.2.15", default-features = false, features = ["fmt", "chrono", "ansi", "smallvec", "env-filter"] }
|
||||
tracing-subscriber = { version = "0.2.25", default-features = false, features = ["fmt", "chrono", "ansi", "smallvec", "env-filter"] }
|
||||
|
||||
[[bench]]
|
||||
name = "chonk_benchmark"
|
||||
|
@ -8,7 +8,7 @@ version = "0.10.0"
|
||||
[dependencies]
|
||||
lazy_static = "1.4.0"
|
||||
assets_manager = {version = "0.6.0", features = ["bincode", "ron", "json"]}
|
||||
ron = { version = "0.6", default-features = false }
|
||||
ron = { version = "0.7", default-features = false }
|
||||
dot_vox = "4.0"
|
||||
image = { version = "0.23.12", default-features = false, features = ["png"] }
|
||||
tracing = "0.1"
|
||||
|
@ -14,9 +14,9 @@ common-base = { package = "veloren-common-base", path = "../base" }
|
||||
# Logging
|
||||
termcolor = "1.1"
|
||||
tracing = { version = "0.1", default-features = false }
|
||||
tracing-appender = "0.1"
|
||||
tracing-appender = "0.1.2"
|
||||
tracing-log = "0.1.1"
|
||||
tracing-subscriber = { version = "0.2.3", default-features = false, features = ["env-filter", "fmt", "chrono", "ansi", "smallvec", "tracing-log"]}
|
||||
tracing-subscriber = { version = "0.2.25", default-features = false, features = ["env-filter", "fmt", "chrono", "ansi", "smallvec", "tracing-log"]}
|
||||
|
||||
# Tracy
|
||||
tracing-tracy = { version = "0.6.0", optional = true }
|
||||
tracing-tracy = { version = "0.8.0", optional = true }
|
||||
|
@ -7,7 +7,7 @@ use num_derive::FromPrimitive;
|
||||
use num_traits::FromPrimitive;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::ops::Deref;
|
||||
use strum_macros::{EnumIter, EnumString, ToString};
|
||||
use strum_macros::{Display, EnumIter, EnumString};
|
||||
use vek::*;
|
||||
|
||||
make_case_elim!(
|
||||
@ -24,7 +24,7 @@ make_case_elim!(
|
||||
FromPrimitive,
|
||||
EnumString,
|
||||
EnumIter,
|
||||
ToString,
|
||||
Display,
|
||||
)]
|
||||
#[repr(u8)]
|
||||
pub enum BlockKind {
|
||||
|
@ -22,7 +22,7 @@ bincode = "1.3.2"
|
||||
serde = { version = "1.0" }
|
||||
#sending
|
||||
crossbeam-channel = "0.5"
|
||||
tokio = { version = "1.11", default-features = false, features = ["io-util", "macros", "rt", "net", "time"] }
|
||||
tokio = { version = "1.14", default-features = false, features = ["io-util", "macros", "rt", "net", "time"] }
|
||||
tokio-stream = { version = "0.1.2", default-features = false }
|
||||
#tracing and metrics
|
||||
tracing = { version = "0.1", default-features = false, features = ["attributes"]}
|
||||
@ -35,7 +35,8 @@ async-channel = "1.5.1" #use for .close() channels
|
||||
lazy_static = { version = "1.4", default-features = false }
|
||||
rand = { version = "0.8" }
|
||||
#quic support
|
||||
quinn = { version = "0.7.2", optional = true }
|
||||
quinn = { version = "0.8", optional = true }
|
||||
rustls = "0.20.1"
|
||||
#stream flags
|
||||
bitflags = "1.2.1"
|
||||
lz-fear = { version = "0.1.1", optional = true }
|
||||
@ -46,8 +47,8 @@ bytes = "^1"
|
||||
hashbrown = { version = ">=0.9, <0.12" }
|
||||
|
||||
[dev-dependencies]
|
||||
tracing-subscriber = { version = "0.2.3", default-features = false, features = ["env-filter", "fmt", "chrono", "ansi", "smallvec"] }
|
||||
tokio = { version = "1.11", default-features = false, features = ["io-std", "fs", "rt-multi-thread"] }
|
||||
tracing-subscriber = { version = "0.2.25", default-features = false, features = ["env-filter", "fmt", "chrono", "ansi", "smallvec"] }
|
||||
tokio = { version = "1.14", default-features = false, features = ["io-std", "fs", "rt-multi-thread"] }
|
||||
futures-util = { version = "0.3.7", default-features = false, features = ["sink", "std"] }
|
||||
clap = { version = "2.33", default-features = false }
|
||||
shellexpand = "2.0.0"
|
||||
|
@ -28,7 +28,7 @@ hashbrown = { version = ">=0.9, <0.12" }
|
||||
|
||||
[dev-dependencies]
|
||||
async-channel = "1.5.1"
|
||||
tokio = { version = "1.11", default-features = false, features = ["rt", "macros"] }
|
||||
tokio = { version = "1.14", default-features = false, features = ["rt", "macros"] }
|
||||
criterion = { version = "0.3.4", features = ["default", "async_tokio"] }
|
||||
|
||||
[[bench]]
|
||||
|
@ -226,23 +226,20 @@ impl Protocols {
|
||||
metrics: ProtocolMetricCache,
|
||||
) -> Result<Self, NetworkConnectError> {
|
||||
let config = config.clone();
|
||||
let endpoint = quinn::Endpoint::builder();
|
||||
|
||||
use std::net::{IpAddr, Ipv4Addr, Ipv6Addr};
|
||||
|
||||
let bindsock = match addr {
|
||||
SocketAddr::V4(_) => SocketAddr::new(IpAddr::V4(Ipv4Addr::new(0, 0, 0, 0)), 0),
|
||||
SocketAddr::V6(_) => {
|
||||
SocketAddr::new(IpAddr::V6(Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 0)), 0)
|
||||
},
|
||||
SocketAddr::V4(_) => SocketAddr::new(IpAddr::V4(Ipv4Addr::UNSPECIFIED), 0),
|
||||
SocketAddr::V6(_) => SocketAddr::new(IpAddr::V6(Ipv6Addr::UNSPECIFIED), 0),
|
||||
};
|
||||
let (endpoint, _) = match endpoint.bind(&bindsock) {
|
||||
let endpoint = match quinn::Endpoint::client(bindsock) {
|
||||
Ok(e) => e,
|
||||
Err(quinn::EndpointError::Socket(e)) => return Err(NetworkConnectError::Io(e)),
|
||||
Err(e) => return Err(NetworkConnectError::Io(e)),
|
||||
};
|
||||
|
||||
info!("Connecting Quic to: {}", &addr);
|
||||
let connecting = endpoint.connect_with(config, &addr, &name).map_err(|e| {
|
||||
let connecting = endpoint.connect_with(config, addr, &name).map_err(|e| {
|
||||
trace!(?e, "error setting up quic");
|
||||
NetworkConnectError::Io(std::io::Error::new(
|
||||
std::io::ErrorKind::ConnectionAborted,
|
||||
@ -276,11 +273,9 @@ impl Protocols {
|
||||
s2s_stop_listening_r: oneshot::Receiver<()>,
|
||||
c2s_protocol_s: mpsc::UnboundedSender<(Self, Cid)>,
|
||||
) -> std::io::Result<()> {
|
||||
let mut endpoint = quinn::Endpoint::builder();
|
||||
endpoint.listen(server_config);
|
||||
let (_endpoint, mut listener) = match endpoint.bind(&addr) {
|
||||
let (_endpoint, mut listener) = match quinn::Endpoint::server(server_config, addr) {
|
||||
Ok(v) => v,
|
||||
Err(quinn::EndpointError::Socket(e)) => return Err(e),
|
||||
Err(e) => return Err(e),
|
||||
};
|
||||
trace!(?addr, "Quic Listener bound");
|
||||
let mut end_receiver = s2s_stop_listening_r.fuse();
|
||||
|
@ -103,34 +103,28 @@ pub fn quic() -> (ListenAddr, ConnectAddr) {
|
||||
const LOCALHOST: &str = "localhost";
|
||||
let port = UDP_PORTS.fetch_add(1, Ordering::Relaxed);
|
||||
|
||||
let transport_config = quinn::TransportConfig::default();
|
||||
let mut server_config = quinn::ServerConfig::default();
|
||||
server_config.transport = Arc::new(transport_config);
|
||||
let mut server_config = quinn::ServerConfigBuilder::new(server_config);
|
||||
|
||||
trace!("generating self-signed certificate");
|
||||
let cert = rcgen::generate_simple_self_signed(vec![LOCALHOST.into()]).unwrap();
|
||||
let key = cert.serialize_private_key_der();
|
||||
let cert = cert.serialize_der().unwrap();
|
||||
|
||||
let key = quinn::PrivateKey::from_der(&key).expect("private key failed");
|
||||
let cert = quinn::Certificate::from_der(&cert).expect("cert failed");
|
||||
server_config
|
||||
.certificate(quinn::CertificateChain::from_certs(vec![cert.clone()]), key)
|
||||
.expect("set cert failed");
|
||||
let key = rustls::PrivateKey(key);
|
||||
let cert = rustls::Certificate(cert);
|
||||
|
||||
let server_config = server_config.build();
|
||||
let mut root_store = rustls::RootCertStore::empty();
|
||||
root_store.add(&cert).expect("cannot add cert to rootstore");
|
||||
|
||||
let mut client_config = quinn::ClientConfigBuilder::default();
|
||||
client_config
|
||||
.add_certificate_authority(cert)
|
||||
.expect("adding certificate failed");
|
||||
|
||||
let client_config = client_config.build();
|
||||
let server_config = quinn::ServerConfig::with_single_cert(vec![cert], key)
|
||||
.expect("Server Config Cert/Key failed");
|
||||
let client_config = quinn::ClientConfig::with_root_certificates(root_store);
|
||||
use std::net::{IpAddr, Ipv4Addr};
|
||||
(
|
||||
ListenAddr::Quic(SocketAddr::from(([127, 0, 0, 1], port)), server_config),
|
||||
ListenAddr::Quic(
|
||||
SocketAddr::new(IpAddr::V4(Ipv4Addr::LOCALHOST), port),
|
||||
server_config,
|
||||
),
|
||||
ConnectAddr::Quic(
|
||||
SocketAddr::from(([127, 0, 0, 1], port)),
|
||||
SocketAddr::new(IpAddr::V4(Ipv4Addr::LOCALHOST), port),
|
||||
client_config,
|
||||
LOCALHOST.to_owned(),
|
||||
),
|
||||
|
@ -31,17 +31,17 @@ common-base = { package = "veloren-common-base", path = "../common/base" }
|
||||
common-net = { package = "veloren-common-net", path = "../common/net" }
|
||||
common-frontend = { package = "veloren-common-frontend", path = "../common/frontend" }
|
||||
|
||||
tokio = { version = "1.11", default-features = false, features = ["rt-multi-thread"] }
|
||||
tokio = { version = "1.14", default-features = false, features = ["rt-multi-thread"] }
|
||||
num_cpus = "1.0"
|
||||
ansi-parser = "0.8"
|
||||
clap = "2.33"
|
||||
structopt = "0.3.13"
|
||||
crossterm = "0.21"
|
||||
crossterm = "0.22"
|
||||
lazy_static = "1"
|
||||
signal-hook = "0.3.6"
|
||||
shell-words = "1.0.0"
|
||||
tracing = { version = "0.1", default-features = false }
|
||||
ron = {version = "0.6", default-features = false}
|
||||
ron = {version = "0.7", default-features = false}
|
||||
serde = {version = "1.0", features = [ "rc", "derive" ]}
|
||||
|
||||
[dependencies.tui]
|
||||
|
@ -28,21 +28,23 @@ network = { package = "veloren-network", path = "../network", features = ["metri
|
||||
specs = { git = "https://github.com/amethyst/specs.git", features = ["shred-derive"], rev = "f985bec5d456f7b0dd8aae99848f9473c2cd9d46" }
|
||||
specs-idvs = { git = "https://gitlab.com/veloren/specs-idvs.git", rev = "8be2abcddf8f524cb5876e8dd20a7e47cfaf7573" }
|
||||
|
||||
strum = { version = "0.21", features = ["derive"] }
|
||||
strum = { version = "0.23", features = ["derive"] }
|
||||
bincode = "1.3.2"
|
||||
num_cpus = "1.0"
|
||||
tracing = "0.1"
|
||||
vek = { version = "0.14.1", features = ["serde"] }
|
||||
futures-util = "0.3.7"
|
||||
tokio = { version = "1.11", default-features = false, features = ["rt"] }
|
||||
tokio = { version = "1.14", default-features = false, features = ["rt"] }
|
||||
prometheus-hyper = "0.1.2"
|
||||
quinn = "0.7.2"
|
||||
quinn = "0.8"
|
||||
rustls = { version = "0.20", default-features = false }
|
||||
rustls-pemfile = { version = "0.2.1", default-features = false }
|
||||
atomicwrites = "0.3.0"
|
||||
chrono = { version = "0.4.9", features = ["serde"] }
|
||||
chrono = { version = "0.4.19", features = ["serde"] }
|
||||
humantime = "2.1.0"
|
||||
itertools = "0.10"
|
||||
lazy_static = "1.4.0"
|
||||
ron = { version = "0.6", default-features = false }
|
||||
ron = { version = "0.7", default-features = false }
|
||||
serde = { version = "1.0.110", features = ["derive"] }
|
||||
serde_json = "1.0.50"
|
||||
rand = { version = "0.8", features = ["small_rng"] }
|
||||
|
@ -464,26 +464,33 @@ impl Server {
|
||||
runtime.block_on(network.listen(ListenAddr::Tcp(settings.gameserver_address)))?;
|
||||
runtime.block_on(network.listen(ListenAddr::Mpsc(14004)))?;
|
||||
if let Some(quic) = &settings.quic_files {
|
||||
use rustls_pemfile::Item;
|
||||
use std::fs;
|
||||
match || -> Result<_, Box<dyn std::error::Error>> {
|
||||
let mut server_config =
|
||||
quinn::ServerConfigBuilder::new(quinn::ServerConfig::default());
|
||||
let key = fs::read(&quic.key)?;
|
||||
let key = if quic.key.extension().map_or(false, |x| x == "der") {
|
||||
quinn::PrivateKey::from_der(&key)?
|
||||
rustls::PrivateKey(key)
|
||||
} else {
|
||||
quinn::PrivateKey::from_pem(&key)?
|
||||
debug!("convert pem key to der");
|
||||
let key = rustls_pemfile::read_all(&mut key.as_slice())?
|
||||
.into_iter()
|
||||
.find_map(|item| match item {
|
||||
Item::RSAKey(v) | Item::PKCS8Key(v) => Some(v),
|
||||
Item::X509Certificate(_) => None,
|
||||
})
|
||||
.ok_or("No valid pem key in file")?;
|
||||
rustls::PrivateKey(key)
|
||||
};
|
||||
let cert_chain = fs::read(&quic.cert)?;
|
||||
let cert_chain = if quic.cert.extension().map_or(false, |x| x == "der") {
|
||||
quinn::CertificateChain::from_certs(Some(
|
||||
quinn::Certificate::from_der(&cert_chain).unwrap(),
|
||||
))
|
||||
vec![rustls::Certificate(cert_chain)]
|
||||
} else {
|
||||
quinn::CertificateChain::from_pem(&cert_chain)?
|
||||
debug!("convert pem cert to der");
|
||||
let certs = rustls_pemfile::certs(&mut cert_chain.as_slice())?;
|
||||
certs.into_iter().map(rustls::Certificate).collect()
|
||||
};
|
||||
server_config.certificate(cert_chain, key)?;
|
||||
Ok(server_config.build())
|
||||
let server_config = quinn::ServerConfig::with_single_cert(cert_chain, key)?;
|
||||
Ok(server_config)
|
||||
}() {
|
||||
Ok(server_config) => {
|
||||
warn!(
|
||||
|
@ -88,7 +88,7 @@ server = { package = "veloren-server", path = "../server", optional = true, defa
|
||||
# Utility
|
||||
backtrace = "0.3.40"
|
||||
bincode = "1.3.1"
|
||||
chrono = { version = "0.4.9", features = ["serde"] }
|
||||
chrono = { version = "0.4.19", features = ["serde"] }
|
||||
chumsky = "0.3.2"
|
||||
cpal = "0.13"
|
||||
copy_dir = "0.1.2"
|
||||
@ -109,13 +109,13 @@ rand = "0.8"
|
||||
rand_chacha = "0.3"
|
||||
rayon = "1.5"
|
||||
rodio = {version = "0.14", default-features = false, features = ["vorbis"]}
|
||||
ron = {version = "0.6", default-features = false}
|
||||
ron = {version = "0.7", default-features = false}
|
||||
serde = {version = "1.0", features = [ "rc", "derive" ]}
|
||||
slab = "0.4.2"
|
||||
strum = { version = "0.21", features = ["derive"] }
|
||||
strum_macros = "0.21"
|
||||
strum = { version = "0.23", features = ["derive"] }
|
||||
strum_macros = "0.23"
|
||||
treeculler = "0.2"
|
||||
tokio = { version = "1.11", default-features = false, features = ["rt-multi-thread"] }
|
||||
tokio = { version = "1.14", default-features = false, features = ["rt-multi-thread"] }
|
||||
num_cpus = "1.0"
|
||||
# vec_map = { version = "0.8.2" }
|
||||
# inline_tweak = "1.0.2"
|
||||
|
@ -17,7 +17,7 @@ deunicode = "1.0"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
tracing = "0.1"
|
||||
# Diagnostic
|
||||
ron = "0.6"
|
||||
ron = "0.7"
|
||||
git2 = { version = "0.13", default-features = false, optional = true }
|
||||
|
||||
# Binary
|
||||
|
@ -34,16 +34,16 @@ arr_macro = "0.1.2"
|
||||
packed_simd = { package = "packed_simd_2", version = "0.3.5", optional = true }
|
||||
rayon = "1.5"
|
||||
serde = { version = "1.0.110", features = ["derive"] }
|
||||
ron = { version = "0.6", default-features = false }
|
||||
ron = { version = "0.7", default-features = false }
|
||||
# inline_tweak = "1.0.2"
|
||||
|
||||
# compression benchmarks
|
||||
lz-fear = { version = "0.1.1", optional = true }
|
||||
deflate = { version = "0.9.1", optional = true }
|
||||
deflate = { version = "1.0.0", optional = true }
|
||||
flate2 = { version = "1.0.20", optional = true }
|
||||
num-traits = { version = "0.2", optional = true }
|
||||
fallible-iterator = { version = "0.2.0", optional = true }
|
||||
kiddo = { version = "0.1.5", optional = true }
|
||||
kiddo = { version = "0.2.1", optional = true }
|
||||
rstar = { version = "0.9", optional = true }
|
||||
clap = { version = "2.33.3", optional = true }
|
||||
|
||||
@ -52,12 +52,12 @@ clap = { version = "2.33.3", optional = true }
|
||||
common-frontend = { package = "veloren-common-frontend", path = "../common/frontend" }
|
||||
criterion = "0.3"
|
||||
csv = "1.1.3"
|
||||
tracing-subscriber = { version = "0.2.15", default-features = false, features = ["fmt", "chrono", "ansi", "smallvec", "env-filter"] }
|
||||
tracing-subscriber = { version = "0.2.25", default-features = false, features = ["fmt", "chrono", "ansi", "smallvec", "env-filter"] }
|
||||
minifb = "0.19.1"
|
||||
rusqlite = { version = "0.24.2", features = ["array", "vtab", "bundled", "trace"] }
|
||||
svg_fmt = "0.4"
|
||||
structopt = "0.3"
|
||||
strum = "0.21"
|
||||
strum = "0.23"
|
||||
|
||||
[[bench]]
|
||||
harness = false
|
||||
|
@ -236,7 +236,7 @@ fn palette(conn: Connection) -> Result<(), Box<dyn Error>> {
|
||||
}
|
||||
}
|
||||
let mut f = File::create("palettes.ron")?;
|
||||
let pretty = ron::ser::PrettyConfig::default().with_depth_limit(2);
|
||||
let pretty = ron::ser::PrettyConfig::default().depth_limit(2);
|
||||
write!(f, "{}", ron::ser::to_string_pretty(&palettes, pretty)?)?;
|
||||
Ok(())
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user