mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-09-30 03:01:21 +02:00
SSDP multicast (239.255.255.250:2021) doesn't traverse routers, so a printer behind a router on a different L3 segment was invisible to "Discover Printers on Network". Docker mode had a CIDR text input but only as a fallback when zero interface subnets were detected; native mode had no subnet field at all. AddPrinterModal now surfaces an always-visible subnet picker. Detected interface subnets stay as dropdown options, plus a "Custom subnet..." sentinel reveals a CIDR text input. When custom is picked, discovery routes through POST /discovery/scan with the typed CIDR instead of SSDP (which would no-op against a foreign subnet anyway). Last custom CIDR persisted to localStorage so VLAN users don't retype every time. Scan button label and scanning / no-printers-found strings all key off (isDocker || useCustomSubnet) so wording stays "Scan Subnet..." / "Scanning subnet..." whether the user is on Docker or just picked Custom. Backend unchanged: SubnetScanner.scan_subnet() already accepts any CIDR, already caps at /22 (1024 hosts), POST /discovery/scan already takes user-supplied input.