diff --git a/warpgate-common/src/config.rs b/warpgate-common/src/config.rs index eb45670e..05ba4fc1 100644 --- a/warpgate-common/src/config.rs +++ b/warpgate-common/src/config.rs @@ -263,7 +263,7 @@ pub struct SSHConfig { impl Default for SSHConfig { fn default() -> Self { SSHConfig { - enable: true, + enable: false, listen: _default_ssh_listen(), keys: _default_ssh_keys_path(), client_key: _default_ssh_client_key(), @@ -274,7 +274,7 @@ impl Default for SSHConfig { #[derive(Debug, Deserialize, Serialize, Clone)] pub struct HTTPConfig { - #[serde(default = "_default_true")] + #[serde(default = "_default_false")] pub enable: bool, #[serde(default = "_default_http_listen")] @@ -290,7 +290,7 @@ pub struct HTTPConfig { impl Default for HTTPConfig { fn default() -> Self { HTTPConfig { - enable: true, + enable: false, listen: _default_http_listen(), certificate: "".to_owned(), key: "".to_owned(), @@ -316,7 +316,7 @@ pub struct MySQLConfig { impl Default for MySQLConfig { fn default() -> Self { MySQLConfig { - enable: true, + enable: false, listen: _default_http_listen(), certificate: "".to_owned(), key: "".to_owned(), diff --git a/warpgate-protocol-http/src/lib.rs b/warpgate-protocol-http/src/lib.rs index 9395fba7..71d1ef0e 100644 --- a/warpgate-protocol-http/src/lib.rs +++ b/warpgate-protocol-http/src/lib.rs @@ -173,6 +173,6 @@ impl ProtocolServer for HTTPProtocolServer { impl Debug for HTTPProtocolServer { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(f, "SSHProtocolServer") + write!(f, "HTTPProtocolServer") } } diff --git a/warpgate/src/commands/run.rs b/warpgate/src/commands/run.rs index ac7d64bd..7328338b 100644 --- a/warpgate/src/commands/run.rs +++ b/warpgate/src/commands/run.rs @@ -112,7 +112,7 @@ pub(crate) async fn command(cli: &crate::Cli) -> Result<()> { result = protocol_futures.next() => { match result { Some(Err(error)) => { - error!(?error, "SSH server error"); + error!(?error, "Server error"); std::process::exit(1); }, None => break, diff --git a/warpgate/src/commands/setup.rs b/warpgate/src/commands/setup.rs index 884cd952..4af8deac 100644 --- a/warpgate/src/commands/setup.rs +++ b/warpgate/src/commands/setup.rs @@ -74,6 +74,10 @@ pub(crate) async fn command(cli: &crate::Cli) -> Result<()> { roles: vec![Role { name: "warpgate:admin".to_owned(), }], + http: HTTPConfig { + enable: true, + ..Default::default() + }, ..Default::default() };