From 162f3c7e7aeee72bd13f1b6d256a12e827c2b8e9 Mon Sep 17 00:00:00 2001 From: Valmo Trindade Date: Wed, 16 Apr 2025 05:34:27 -0300 Subject: [PATCH] handled RTSP video stream requests without authentication --- mod.cpp | 2 +- src/video_stream.rs | 13 +++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/mod.cpp b/mod.cpp index 7f7ea67..8ee9ff4 100644 --- a/mod.cpp +++ b/mod.cpp @@ -7,7 +7,7 @@ tooltipOwned = "ARMATAK"; picture = "picture.paa"; actionName = "GitHub"; action = "https://github.com/valmojr/armatak"; -overview = "ARMATAK Addons is Full Stack Project to handle Arma 3 Sessions as real loc entities on TAK Clients"; +overview = "ARMATAK Addons allows Arma 3 sessions to be parsed to TAK Clients"; hideName = 0; hidePicture = 0; dlcColor[] = { 0.23, 0.39, 0.30, 1 }; diff --git a/src/video_stream.rs b/src/video_stream.rs index ba5ffdf..bd5018b 100644 --- a/src/video_stream.rs +++ b/src/video_stream.rs @@ -34,10 +34,15 @@ pub fn start_stream( #[cfg(target_os = "windows")] { let (tx, rx): (Sender<()>, Receiver<()>) = mpsc::channel(); - let rtsp_url = format!( - "rtsp://{}:{}@{}:{}/{}", - username, password, address, port, stream_path - ); + let rtsp_url = if username.is_empty() || password.is_empty() { + format!("rtsp://{}:{}/{}", address, port, stream_path) + } else { + format!( + "rtsp://{}:{}@{}:{}/{}", + username, password, address, port, stream_path + ) + }; + let rtsp_url_clone = rtsp_url.clone(); thread::spawn(move || {