diff options
| author | Fuwn <[email protected]> | 2021-12-22 03:44:13 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2021-12-22 03:44:13 +0000 |
| commit | 4c7cd1eedc2c1ea531644c070e797b2bb6c77962 (patch) | |
| tree | 7deba23407f42402c2fee32b35629dbd8cd21875 | |
| parent | fix(config): localhost ips (diff) | |
| download | whirl-4c7cd1eedc2c1ea531644c070e797b2bb6c77962.tar.xz whirl-4c7cd1eedc2c1ea531644c070e797b2bb6c77962.zip | |
fix: more localhost ips
| -rw-r--r-- | crates/whirl_api/src/lib.rs | 3 | ||||
| -rw-r--r-- | crates/whirl_config/src/lib.rs | 2 | ||||
| -rw-r--r-- | crates/whirl_server/src/lib.rs | 4 |
3 files changed, 5 insertions, 4 deletions
diff --git a/crates/whirl_api/src/lib.rs b/crates/whirl_api/src/lib.rs index ddee9ff..d3c3a0c 100644 --- a/crates/whirl_api/src/lib.rs +++ b/crates/whirl_api/src/lib.rs @@ -71,7 +71,8 @@ impl Api { pub fn make() -> tokio::task::JoinHandle<()> { tokio::spawn(async move { crate::Api::listen(&*format!( - "0.0.0.0:{}", + "{}:{}", + whirl_config::Config::get().whirlsplash.ip, whirl_config::Config::get().whirlsplash.api.port )) .await; diff --git a/crates/whirl_config/src/lib.rs b/crates/whirl_config/src/lib.rs index 218a249..b5f9d6e 100644 --- a/crates/whirl_config/src/lib.rs +++ b/crates/whirl_config/src/lib.rs @@ -95,7 +95,7 @@ impl Default for Config { version: "0.1.0".to_string(), whirlsplash: WhirlsplashConfig { worldsmaster_username: "WORLDSMASTER".to_string(), - ip: "0.0.0.0".to_string(), + ip: "127.0.0.1".to_string(), api: WhirlsplashApiConfig { port: 80 }, diff --git a/crates/whirl_server/src/lib.rs b/crates/whirl_server/src/lib.rs index 7f9df14..2c53ad6 100644 --- a/crates/whirl_server/src/lib.rs +++ b/crates/whirl_server/src/lib.rs @@ -119,7 +119,7 @@ pub mod make { pub fn distributor() -> JoinHandle<()> { tokio::spawn(async move { crate::distributor::Distributor::listen( - &*format!("0.0.0.0:{}", Config::get().distributor.port), + &*format!("{}:{}", Config::get().whirlsplash.ip, Config::get().distributor.port), ServerType::Auto, ) .await @@ -136,7 +136,7 @@ pub mod make { pub fn hub() -> JoinHandle<()> { tokio::spawn(async move { crate::hub::Hub::listen( - &*format!("0.0.0.0:{}", Config::get().hub.port), + &*format!("{}:{}", Config::get().whirlsplash.ip, Config::get().hub.port), ServerType::Room, ) .await |