fix: Only connections from localhost are allowed
This commit is contained in:
+2
-2
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user