fix: Only connections from localhost are allowed
Committed / committed (pull_request) Canceled after 19s
CI / prek (pull_request) Canceled after 38s
CI / cargo shear (pull_request) Canceled after 38s

This commit is contained in:
2026-10-04 05:39:28 +02:00
parent f9da1d907b
commit 0e1c2f20b3
+2 -2
View File
@@ -37,7 +37,7 @@ where
F: Fn(&str) -> Fut, F: Fn(&str) -> Fut,
Fut: Future<Output = Option<Vec<u8>>>, Fut: Future<Output = Option<Vec<u8>>>,
{ {
let socket = UdpSocket::bind("127.0.0.1:0").await?; let socket = UdpSocket::bind("0.0.0.0:0").await?;
println!( println!(
"{src}: Connecting from {}", "{src}: Connecting from {}",
socket.local_addr().expect("Socket is bound") socket.local_addr().expect("Socket is bound")
@@ -150,7 +150,7 @@ where
F: Fn(&str) -> Fut + Clone + Send + 'static, F: Fn(&str) -> Fut + Clone + Send + 'static,
Fut: Future<Output = Option<Vec<u8>>> + Send + 'static, Fut: Future<Output = Option<Vec<u8>>> + Send + 'static,
{ {
let socket = UdpSocket::bind("127.0.0.1:69").await?; let socket = UdpSocket::bind("0.0.0.0:69").await?;
println!("Server started"); println!("Server started");
loop { loop {