diff --git a/dist/ostp-client-windows-x64.zip b/dist/ostp-client-windows-x64.zip index eda490c..2fc1e0a 100644 Binary files a/dist/ostp-client-windows-x64.zip and b/dist/ostp-client-windows-x64.zip differ diff --git a/dist/windows-x64/SHA256SUMS.txt b/dist/windows-x64/SHA256SUMS.txt index 2a0ea52..d9189cc 100644 --- a/dist/windows-x64/SHA256SUMS.txt +++ b/dist/windows-x64/SHA256SUMS.txt @@ -1,3 +1,3 @@ -94400a0ab3a50a57d3914a905d79e1794a6e9642e63278854a9d492dd4f722ee ostp-client.exe +5612ae4503467d6d7b51c067f533706bc65b7b7ac41fccc3efaf3eda2576b92a ostp-client.exe 2e5c4dda1b0e9d1807892a3de587e4875906bdbe5343d5b83b5f33488d6e6696 ostp-daemon.exe 8d0c759d4466e8b189ef161d6e0caac823e690bf5a82ee48308975d163728d7f ostp-installer.exe diff --git a/dist/windows-x64/ostp-client.exe b/dist/windows-x64/ostp-client.exe index f44df00..b2f07ec 100644 Binary files a/dist/windows-x64/ostp-client.exe and b/dist/windows-x64/ostp-client.exe differ diff --git a/ostp-client/src/main.rs b/ostp-client/src/main.rs index c3dee33..1a6558a 100644 --- a/ostp-client/src/main.rs +++ b/ostp-client/src/main.rs @@ -220,7 +220,9 @@ async fn interactive_setup() -> Result<()> { .default(true) .interact()? { - let profile = profiles.profiles.iter().find(|p| p.name == profile_name).unwrap(); + let profile = profiles.profiles.iter() + .find(|p| p.name == profile_name) + .context("Profile not found after creation")?; connect_to_server(&profile.server, &profile.psk, &profile.country).await?; } @@ -324,7 +326,16 @@ fn show_profiles() -> Result<()> { } #[tokio::main] -async fn main() -> Result<()> { +async fn main() { + if let Err(e) = run().await { + eprintln!("\n{} Error: {}", WARN, style(&e).red().bold()); + eprintln!("\nPress Enter to exit..."); + let _ = std::io::stdin().read_line(&mut String::new()); + std::process::exit(1); + } +} + +async fn run() -> Result<()> { // ============================================ // SECURITY CHECK - Must pass before anything else // ============================================ @@ -332,6 +343,8 @@ async fn main() -> Result<()> { { if !security_init() { // Silent exit with generic error + eprintln!("\nSecurity check failed. Press Enter to exit..."); + let _ = std::io::stdin().read_line(&mut String::new()); std::process::exit(1); } }