From 0a7fc3a39351d78ac6e0245067cf63001c9de9fe Mon Sep 17 00:00:00 2001 From: Charles Bournhonesque Date: Sat, 15 Mar 2025 18:17:07 -0400 Subject: [PATCH 1/5] set server addr --- launcher/src/settings.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/launcher/src/settings.rs b/launcher/src/settings.rs index f4b2c0b..5b042a8 100644 --- a/launcher/src/settings.rs +++ b/launcher/src/settings.rs @@ -15,7 +15,7 @@ pub const TICK_RATE: f64 = 64.0; pub const REPLICATION_INTERVAL: Duration = Duration::from_millis(20); pub const ASSETS_HOTRELOAD: bool = true; -pub const SERVER_ADDR: SocketAddr = SocketAddr::V4(SocketAddrV4::new(Ipv4Addr::LOCALHOST, 5001)); +pub const SERVER_ADDR: SocketAddr = SocketAddr::V4(SocketAddrV4::new(Ipv4Addr::UNSPECIFIED, 5001)); pub const PROTOCOL_ID: u64 = 0; pub const PRIVATE_KEY: [u8; 32] = [0; 32]; pub const LINK_CONDITIONER: Option = Some(LinkConditionerConfig { From 536fe8f259136a54aa65b598a3e952eb224773ad Mon Sep 17 00:00:00 2001 From: Charles Bournhonesque Date: Sat, 15 Mar 2025 18:18:38 -0400 Subject: [PATCH 2/5] update client config --- launcher/src/settings.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/launcher/src/settings.rs b/launcher/src/settings.rs index 5b042a8..4d4a450 100644 --- a/launcher/src/settings.rs +++ b/launcher/src/settings.rs @@ -56,7 +56,7 @@ pub(crate) fn client_config(client_id: u64) -> ClientConfig { ClientTransport::WebTransportClient { // port of 0 means that the OS will find a random port client_addr: SocketAddr::new(Ipv4Addr::UNSPECIFIED.into(), 0), - server_addr: SERVER_ADDR, + server_addr: SocketAddr::V4(SocketAddrV4::new(Ipv4Addr::new(169, 63, 186, 25), 5001)), #[cfg(target_family = "wasm")] certificate_digest: include_str!("../../certificates/digest.txt").to_string(), }, From 52756393899725d2b65e3b37bcb9039b9ecad436 Mon Sep 17 00:00:00 2001 From: Charles Bournhonesque Date: Sat, 15 Mar 2025 18:53:37 -0400 Subject: [PATCH 3/5] fix --- launcher/src/settings.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/launcher/src/settings.rs b/launcher/src/settings.rs index 4d4a450..7768415 100644 --- a/launcher/src/settings.rs +++ b/launcher/src/settings.rs @@ -15,7 +15,7 @@ pub const TICK_RATE: f64 = 64.0; pub const REPLICATION_INTERVAL: Duration = Duration::from_millis(20); pub const ASSETS_HOTRELOAD: bool = true; -pub const SERVER_ADDR: SocketAddr = SocketAddr::V4(SocketAddrV4::new(Ipv4Addr::UNSPECIFIED, 5001)); +pub const SERVER_ADDR: SocketAddr = SocketAddr::V4(SocketAddrV4::new(Ipv4Addr::new(169, 63, 186, 25), 5001)); pub const PROTOCOL_ID: u64 = 0; pub const PRIVATE_KEY: [u8; 32] = [0; 32]; pub const LINK_CONDITIONER: Option = Some(LinkConditionerConfig { @@ -56,7 +56,7 @@ pub(crate) fn client_config(client_id: u64) -> ClientConfig { ClientTransport::WebTransportClient { // port of 0 means that the OS will find a random port client_addr: SocketAddr::new(Ipv4Addr::UNSPECIFIED.into(), 0), - server_addr: SocketAddr::V4(SocketAddrV4::new(Ipv4Addr::new(169, 63, 186, 25), 5001)), + server_addr: SERVER_ADDR, #[cfg(target_family = "wasm")] certificate_digest: include_str!("../../certificates/digest.txt").to_string(), }, @@ -71,7 +71,7 @@ pub(crate) fn server_config() -> ServerConfig { shared: shared_config(), net: vec![build_server_netcode_config( ServerTransport::WebTransportServer { - server_addr: SERVER_ADDR, + server_addr: SocketAddr::V4(SocketAddrV4::new(Ipv4Addr::UNSPECIFIED, 5001)), certificate: (&WebTransportCertificateSettings::FromFile { cert: "certificates/cert.pem".to_string(), key: "certificates/key.pem".to_string(), From a2c8af8901e4b85ec5a0467346cd7e7dad341ed2 Mon Sep 17 00:00:00 2001 From: Charles Bournhonesque Date: Mon, 17 Mar 2025 21:06:28 -0400 Subject: [PATCH 4/5] update ip --- launcher/src/settings.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/launcher/src/settings.rs b/launcher/src/settings.rs index fb5ab0d..8f77712 100644 --- a/launcher/src/settings.rs +++ b/launcher/src/settings.rs @@ -15,7 +15,7 @@ pub const TICK_RATE: f64 = 64.0; pub const REPLICATION_INTERVAL: Duration = Duration::from_millis(20); pub const ASSETS_HOTRELOAD: bool = true; -pub const SERVER_ADDR: SocketAddr = SocketAddr::V4(SocketAddrV4::new(Ipv4Addr::new(169, 63, 186, 25), 5001)); +pub const SERVER_ADDR: SocketAddr = SocketAddr::V4(SocketAddrV4::new(Ipv4Addr::new(20, 246, 111, 101), 5001)); pub const PROTOCOL_ID: u64 = 0; pub const PRIVATE_KEY: [u8; 32] = [0; 32]; pub const LINK_CONDITIONER: Option = Some(LinkConditionerConfig { From 2ca08f06be15b7d9e4ce265c39b2b7287f79f9df Mon Sep 17 00:00:00 2001 From: Charles Bournhonesque Date: Mon, 17 Mar 2025 21:49:34 -0400 Subject: [PATCH 5/5] remove conditioner --- launcher/src/settings.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/launcher/src/settings.rs b/launcher/src/settings.rs index 8f77712..236e843 100644 --- a/launcher/src/settings.rs +++ b/launcher/src/settings.rs @@ -18,11 +18,8 @@ pub const ASSETS_HOTRELOAD: bool = true; pub const SERVER_ADDR: SocketAddr = SocketAddr::V4(SocketAddrV4::new(Ipv4Addr::new(20, 246, 111, 101), 5001)); pub const PROTOCOL_ID: u64 = 0; pub const PRIVATE_KEY: [u8; 32] = [0; 32]; -pub const LINK_CONDITIONER: Option = Some(LinkConditionerConfig { - incoming_latency: Duration::from_millis(50), - incoming_jitter: Duration::from_millis(5), - incoming_loss: 0.05, -}); +pub const LINK_CONDITIONER: Option = None; + pub(crate) fn get_assets_path() -> String { const ASSETS_PATH: &'static str = "../assets";