lakinduakash / linux-wifi-hotspot

Feature-rich wifi hotspot creator for Linux which provides both GUI and command-line interface. It is also able to create a hotspot using the same wifi card which is connected to an AP already ( Similar to Windows 10).
BSD 2-Clause "Simplified" License
3.01k stars 278 forks source link

Add option to create dhcp-host values into dnsmasq.conf #407

Open dopplerreflect opened 3 weeks ago

dopplerreflect commented 3 weeks ago

Added --dhcp-hosts option to add dhcp-host= lines do dnsmasq.conf.

This allows us to set specified ip addresses for hosts connecting to the ap.

Sample result from my pi running NixOS:

# head -1 /nix/store/vdhr1snnzdjvdc04gn64jsqp6rqycf6a-create_ap.conf
DHCP_HOSTS=thinkpad,192.168.12.10 GW2000X,192.168.12.11
# cat /tmp/create_ap.wlan0.conf.ooKP4z5Q/dnsmasq.conf
listen-address=192.168.12.1
bind-dynamic
dhcp-range=192.168.12.1,192.168.12.254,255.255.255.0,24h
dhcp-option-force=option:router,192.168.12.1
dhcp-option-force=option:dns-server,192.168.12.1
dhcp-option-force=option:mtu,1500
dhcp-host=thinkpad,192.168.12.10
dhcp-host=GW2000X,192.168.12.11