pub fn resolve_server_mode( env_mode: Option<&str>, config: &BhtuneConfig, ) -> Result<ServerMode, String>