Skip to content

Commit

Permalink
Add DHCP info to README
Browse files Browse the repository at this point in the history
Add GUI for DHCP server
  • Loading branch information
joaofl committed Dec 23, 2024
1 parent 4a8503a commit 3dd56d1
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
20 changes: 11 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,16 @@ Quick-serve
Usage: quick-serve [OPTIONS]

Options:
-b, --bind-ip=<IP> Bind IP [default: 127.0.0.1]
-p, --serve-dir=<DIR> Path to serve [default: /tmp/]
-v, --verbose... Verbose logging
-H, --http[=<PORT>] Start the HTTP server [default port: 8080]
-f, --ftp[=<PORT>] Start the FTP server [default port: 2121]
-t, --tftp[=<PORT>] Start the TFTP server [default port: 6969]
-h, --help Print help (see more with '--help')
-V, --version Print version
--headless Headless
-b, --bind-ip=<IP> Bind IP [default: 127.0.0.1]
-d, --serve-dir=<PATH> Directory to serve [default: /tmp/]
-v, --verbose... Verbose logging
--http[=<PORT>] Start the HTTP server [default port: 8080]
--ftp[=<PORT>] Start the FTP server [default port: 2121]
--tftp[=<PORT>] Start the TFTP server [default port: 6969]
--dhcp Start the DHCP server
-h, --help Print help (see more with '--help')
-V, --version Print version
```


Expand Down Expand Up @@ -115,7 +117,7 @@ cargo test
- [x] HTTP
- [x] TFTP
- [ ] HTTPS
- [ ] DHCP
- [x] DHCP
- [ ] SFTP
- [ ] NFS
- [ ] SAMBA
Expand Down
7 changes: 6 additions & 1 deletion src/ui/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,11 @@ impl eframe::App for UI {

egui::widgets::global_theme_preference_switch(ui);

ui.separator();
if ui.button("Exit").clicked() {
std::process::exit(0);
};
ui.separator();
});

// #######################################################################
Expand Down Expand Up @@ -96,7 +98,10 @@ impl eframe::App for UI {
for p in self.protocols.iter_mut() {
ui.group(|ui| {
ui.add(Label::new(format!("{}", p.protocol.to_string())));
ui.add(DragValue::new(&mut p.port).range(1..=50000));

if p.protocol != Protocol::Dhcp {
ui.add(DragValue::new(&mut p.port).range(1..=50000));
}

if ui.add(toggle(&mut p.start)).clicked() {

Expand Down

0 comments on commit 3dd56d1

Please sign in to comment.