Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,21 @@ jobs:
path: publish/ProDHCPServer.exe
if-no-files-found: error

# A test-signed MSIX (placeholder identity) proves the Store package builds, installs and starts.
- name: Build test-signed MSIX
shell: pwsh
run: tools/build-msix.ps1 -Exe publish/ProDHCPServer.exe -Version "0.1.${{ github.run_number }}" -OutFile msix/ProDHCPServer-test.msix -TestSign

- name: MSIX smoke test (install, start with settings open, uninstall)
shell: pwsh
run: tools/msix-smoke-test.ps1 -Package msix/ProDHCPServer-test.msix -OutDir screenshots

- uses: actions/upload-artifact@v4
with:
name: ProDHCPServer-msix-test
path: msix/
if-no-files-found: error

# Keep the latest screenshots on a throwaway branch so they can be viewed without downloading artifacts.
- name: Publish screenshots to the ci-screenshots branch
if: always() && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository)
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,21 @@ jobs:
Set-Content -NoNewline -Encoding ascii "dist/$name.sha256" "$hash $name`n"
Get-ChildItem dist

# The Store package to upload in Partner Center. It stays unsigned: the Store signs it. Its identity comes from
# the repository variables STORE_IDENTITY_NAME, STORE_PUBLISHER and STORE_PUBLISHER_DISPLAY_NAME
# (Settings > Secrets and variables > Actions > Variables), copied from Partner Center > Product identity.
- name: Build the Microsoft Store package
if: vars.STORE_IDENTITY_NAME != ''
shell: pwsh
env:
STORE_IDENTITY_NAME: ${{ vars.STORE_IDENTITY_NAME }}
STORE_PUBLISHER: ${{ vars.STORE_PUBLISHER }}
STORE_PUBLISHER_DISPLAY_NAME: ${{ vars.STORE_PUBLISHER_DISPLAY_NAME }}
run: >
tools/build-msix.ps1 -Exe publish/ProDHCPServer.exe -Version ${{ steps.version.outputs.version }}
-OutFile "store/ProDHCPServer-$($env:TAG)-x64.msix"
-IdentityName $env:STORE_IDENTITY_NAME -Publisher $env:STORE_PUBLISHER -PublisherDisplayName $env:STORE_PUBLISHER_DISPLAY_NAME

- name: Create or update the draft release
shell: pwsh
env:
Expand All @@ -89,5 +104,6 @@ jobs:
name: release-${{ env.TAG }}
path: |
dist/
store/
screenshots/
if-no-files-found: ignore
24 changes: 24 additions & 0 deletions PRIVACY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# ProDHCPServer privacy policy

Last updated: 27 October 2026

ProDHCPServer is a DHCP server and device finder that runs on your own Windows laptop. It has no account, no analytics, no advertising and no telemetry. It doesn't send anything about you or your devices to the developer or to anyone else.

## What it keeps on your laptop

- Your settings and saved profiles, in `%LOCALAPPDATA%\ProDHCPServer`.
- A backup of your network adapter's settings while a session runs (and after a crash, until they are put back), in `%ProgramData%\ProDHCPServer`.
- Crash reports, in `%ProgramData%\ProDHCPServer`. They stay on the laptop unless you send one yourself.
- The session log, in memory. It is only saved to a file if you press **Export log**.

These files and an exported log contain network details such as IP addresses, MAC addresses and device names from the network you plug into. None of it leaves the laptop unless you share an exported file yourself.

## What it sends over the network

- On the network you plug the laptop into: DHCP replies, pings, ARP and the discovery requests that find AV devices (for example mDNS, and UPnP requests that read a device's description from the device itself). This traffic stays on that local network.
- The copy downloaded from GitHub checks GitHub's public API for a newer release when it starts, if you leave that turned on in Settings > Updates. GitHub sees your IP address, as with any website. The Microsoft Store copy doesn't do this; the Store handles its updates.
- Links in the app (for example to the Npcap download or a release page) open in your web browser.

## Contact

Questions about this policy: open an issue at https://github.com/cookingwithsimon/ProDHCPServer/issues.
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ Most AV kit ships set to DHCP, and on a bench or a fresh site there's usually no
2. Double-click it. Windows asks for administrator rights, because changing adapter settings and serving DHCP require them.
3. The exe isn't code-signed yet, so the first time Windows SmartScreen says "Windows protected your PC". Click **More info**, then **Run anyway**.

### Updates

When the laptop has internet, ProDHCPServer checks GitHub for a newer release a few seconds after it starts. If there is one, a green banner offers **Install and restart**: it downloads the new exe, checks it against the SHA-256 published with the release, swaps it in place of the old one and restarts. The server has to be stopped first. Nothing is changed if any step fails, and the previous exe is deleted the next time the app starts.

On an isolated AV network the check simply doesn't happen. Turn the start-up check off, or check by hand, under Settings > Updates. On a work laptop that only runs approved programs, Windows may block the new version from starting; the app then puts the old one back and says so.

## Using it

1. Connect the device to your laptop's Ethernet port (directly or through a small switch) and power it on.
Expand Down Expand Up @@ -104,9 +110,10 @@ Each phase ends with a hardware test pass on real AV equipment before the next o

| What | Where |
|---|---|
| Your settings (last adapter, profile in use, look and theme) | `%LOCALAPPDATA%\ProDHCPServer\settings.json` |
| Your settings (last adapter, profile in use, look and theme, update check) | `%LOCALAPPDATA%\ProDHCPServer\settings.json` |
| Your profiles | `%LOCALAPPDATA%\ProDHCPServer\profiles.json` |
| Adapter backup (only while a session runs, or after a crash) | `%ProgramData%\ProDHCPServer\adapter-backup.json` |
| The previous version, for a moment after an update | `ProDHCPServer.exe.old` next to the exe, deleted on the next start |

While serving, the app also adds two Windows Firewall rules for this exe only: one so it can receive DHCP traffic (UDP 67 and 68), and one on wired adapters so it can hear devices announcing themselves (mDNS, UPnP, vendor discovery). Both are removed on Stop.

Expand All @@ -131,9 +138,10 @@ dotnet publish src/ProDHCPServer.App -c Release -r win-x64 -o publish
| `src/ProDHCPServer.App` | The WPF app: UI, elevation prompt, crash handling. |
| `tests/` | Core unit tests (run anywhere) and Windows integration tests (run on the Windows CI runner and never change adapter settings). |
| `docs/` | Hardware test checklists for each phase, the sources for the discovery protocols (`vendor-discovery.md`), and the screenshots used in this README (taken by the CI smoke test). |
| `tools/` | CI smoke test (launches the app and takes screenshots) and the manufacturer list updater (`python3 tools/update-oui.py`). |
| `tools/` | CI smoke tests (launch the exe and the MSIX package and take screenshots), the MSIX packager (`build-msix.ps1`) and the manufacturer list updater (`python3 tools/update-oui.py`). |
| `packaging/msix/` | The Microsoft Store package manifest and tile images. See [docs/microsoft-store.md](docs/microsoft-store.md). |

**CI.** Every push and pull request runs the **Build and test** workflow on Windows: build, Core and Windows tests, publish the exe, and a smoke test that screenshots the app in light and dark mode. The exe and screenshots are uploaded as run artifacts, so you can try a build from any branch before it's released.
**CI.** Every push and pull request runs the **Build and test** workflow on Windows: build, Core and Windows tests, publish the exe, and a smoke test that screenshots the app in light and dark mode. It also builds a test-signed MSIX, installs it on the runner and starts it. The exe, the test MSIX and the screenshots are uploaded as run artifacts, so you can try a build from any branch before it's released.

**Contributing.** Work happens on branches with pull requests into `main`. See [CLAUDE.md](CLAUDE.md) for the project rules (they apply to people too), and use the PR template's checklist. Formatting follows `.editorconfig`; check it with `dotnet format whitespace ProDHCPServer.sln --verify-no-changes`.

Expand Down
45 changes: 45 additions & 0 deletions docs/hardware-test-msix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Microsoft Store package (MSIX) test

About 30 minutes on the **unmanaged** laptop (not the work laptop), with one AV device or any DHCP client and a switch or cable. Run this before the first Store submission.

It tests the Store package with a throwaway test certificate, because only the Store can sign the real one. The point is to check that the packaged app behaves like the exe: the admin prompt, the firewall rule and putting the adapter back.

## Setup

1. Download the `ProDHCPServer-msix-test` artifact from this PR's latest **Build and test** run (Actions tab > run > Artifacts) and unzip it. It has `ProDHCPServer-test.msix` and `ProDHCPServer-test.cer`.
2. If the GitHub exe is running, close it.
3. Trust the test certificate: open **PowerShell as administrator** in the unzipped folder and run
`Import-Certificate -FilePath .\ProDHCPServer-test.cer -CertStoreLocation Cert:\LocalMachine\TrustedPeople`

Tick each box. If something fails, export the log (**Export…** above the log) and send me the file, or a photo of the message.

## 1. Install and start

- [ ] Double-click `ProDHCPServer-test.msix`. The App Installer window shows ProDHCPServer with **Install**. Install it.
- [ ] Start **ProDHCPServer** from the Start menu. The app's own "Administrator rights needed" window appears first.
- [ ] Press **Restart as administrator**. The Windows UAC prompt appears; choose **Yes**. The main window opens.
- [ ] Open Settings (gear, or Ctrl+,) and scroll to **Updates**. It says "The Microsoft Store installs updates for this copy", with no Check now button and no tick box.
- [ ] Close the app and start it again from Start. Your look and dark/light choice are remembered.

## 2. Serve DHCP

- [ ] Choose the wired adapter and press **Start**. It starts serving with no firewall or port 67 error.
- [ ] Plug in the device (or power-cycle it). It gets an address and shows in the list with its manufacturer and ping.
- [ ] Open **Windows Defender Firewall with Advanced Security** > Inbound Rules. The two "ProDHCPServer" rules are there and their program is under `C:\Program Files\WindowsApps\`.
- [ ] Press **Stop**. The adapter goes back to how it was (check `ipconfig`), and the two firewall rules are gone.

## 3. Find devices

- [ ] Run the device finder on a device with a static IP. It appears, and **Reach it** works.
- [ ] If Npcap is installed, the switch port shows. If not, the app says Npcap is missing.

## 4. Crash recovery

- [ ] Press **Start**, then end ProDHCPServer in Task Manager (Details tab > ProDHCPServer.exe > End task).
- [ ] Start it again from Start. It offers **Restore adapter**; press it, and check `ipconfig`.

## 5. Uninstall

- [ ] Settings > Apps > Installed apps > ProDHCPServer > Uninstall.
- [ ] In the administrator PowerShell, remove the test certificate:
`Get-ChildItem Cert:\LocalMachine\TrustedPeople | Where-Object Subject -eq 'CN=ProDHCPServer Test' | Remove-Item`
47 changes: 47 additions & 0 deletions docs/hardware-test-updates.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Update checker test

About 15 minutes on the unmanaged laptop, with internet. No AV devices needed.

The updater can only update to a release that's already published on GitHub, so this test updates a test build to the newest published release (v1.1.0). v1.1.0 doesn't have the updater itself, so after the update it leaves `ProDHCPServer.exe.old` behind; delete it by hand at the end.

Download `ProDHCPServer.exe` from this PR's latest **Build and test** run (Actions tab → run → Artifacts → `ProDHCPServer-win-x64`) and put it in a folder of its own, for example `C:\Tools\ProDHCPServer\`. Click **More info → Run anyway** on the SmartScreen warning.

Tick each box. If something fails, use **Export log…** and send me the file.

## 1. Test builds don't nag

- [ ] Start the app with internet. After 10 seconds there is **no** green update banner (test builds only check when asked).
- [ ] Open Settings (gear, or Ctrl+,) and scroll to **Updates**. It says "This is test build 0.1.… It doesn't check for updates by itself; use Check now."

## 2. Offline

- [ ] Unplug or turn off the internet connection (Wi-Fi off, no network cable to the internet).
- [ ] Press **Check now**. Within about 10 seconds it says "Couldn't reach GitHub to check for updates. That's normal on an isolated AV network…". No error banner, no popup.
- [ ] The app otherwise works as normal: **Start** and **Stop** a session on a device or an empty port.

## 3. Check and skip

- [ ] Reconnect the internet. Press **Check now**. It says "Version 1.1.0 is available. You have test build 0.1.…", and the green banner appears at the top of the main window with **Install and restart**, **What's new**, **Not now** and **Skip this version**.
- [ ] **What's new** opens the release page in your normal browser.
- [ ] **Not now** hides the banner.

## 4. Can't install while serving

- [ ] Press **Check now** again so the banner is back, then **Start** the server.
- [ ] **Install and restart** is greyed out and the banner says "Stop the server first: installing restarts ProDHCPServer."
- [ ] Press **Stop**. **Install and restart** becomes clickable.

## 5. Install

- [ ] Press **Install and restart**. The banner shows "Downloading 1.1.0… nn%" with a progress bar, then the window closes and ProDHCPServer opens again by itself within a few seconds, with **no** UAC prompt.
- [ ] The log's first line says "ProDHCPServer 1.1.0 started (administrator)."
- [ ] In the folder, `ProDHCPServer.exe` is the new version (right-click → Properties → Details → Product version 1.1.0) and `ProDHCPServer.exe.old` is the test build. Close the app and delete the `.old` file.

## Later, once a release with the updater is out

When the release after this one is published, run the earlier release with the updater and check:

- [ ] A few seconds after start, the green banner appears without pressing anything.
- [ ] **Skip this version**, then restart the app: no banner. **Check now** in Settings still offers it.
- [ ] Untick **Check for a new version when ProDHCPServer starts**, restart: no check in the log.
- [ ] After **Install and restart**, the log says "started (administrator) after updating." and `ProDHCPServer.exe.old` is gone within a few seconds.
Loading
Loading