Compare commits
11
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0e1c2f20b3
|
||
|
|
f9da1d907b
|
||
|
|
4bea843e53
|
||
|
|
158de17328
|
||
|
|
c20835f087
|
||
|
|
101d690285
|
||
|
|
1dae62846b
|
||
|
|
231e61d4ad
|
||
|
|
63c014fd3f
|
||
|
|
bcf716038e
|
||
|
|
9440ede0ab
|
@@ -120,7 +120,6 @@ async fn main() -> Result<(), Error> {
|
||||
async move {
|
||||
const IPXE_PATTERN: &str = "ipxe/";
|
||||
if let Some(filename) = filename.strip_prefix(IPXE_PATTERN) {
|
||||
println!("Looking for iPXE binary: {filename}");
|
||||
Some(IPXE_DIR.get_file(filename)?.contents().to_owned())
|
||||
} else if let Some(caps) = re.captures(&filename) {
|
||||
let cluster = &caps["cluster"];
|
||||
|
||||
+3
-3
@@ -37,7 +37,7 @@ where
|
||||
F: Fn(&str) -> Fut,
|
||||
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!(
|
||||
"{src}: Connecting from {}",
|
||||
socket.local_addr().expect("Socket is bound")
|
||||
@@ -85,7 +85,7 @@ where
|
||||
let mut timeout = 0;
|
||||
|
||||
loop {
|
||||
// Send the first byte
|
||||
// Send the first chunk
|
||||
if let Some((index, chunk)) = chunk {
|
||||
Packet::data((index + 1) as u16, chunk)
|
||||
.send_to(&socket, &src)
|
||||
@@ -150,7 +150,7 @@ where
|
||||
F: Fn(&str) -> Fut + Clone + 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");
|
||||
loop {
|
||||
|
||||
Reference in New Issue
Block a user