Skip to content

Version 2.6-beta

Pre-release
Pre-release
Compare
Choose a tag to compare
@billz billz released this 26 Dec 10:54
· 1294 commits to master since this release
15e0b59

This pre-release marks a significant refactoring of RaspAP's internals. A feature request for extending DHCP to interfaces other than wlan0 led to a rethink of how this project manages configurations behind the scenes. A valid concern raised is that manual user configuration changes to services like dhcp and dnsmasq are squashed by RaspAP.

Without a facility to merge existing configurations with changes made via the UI, RaspAP is essentially the one and only source of truth whereby manual changes were always overwritten. Moreover, many default values were hardcoded with no means to easily redefine them.

Changes in this release are a first step toward addressing the above. Default values are stored in config/defaults.json and assigned in the absence of user-defined ones. DHCP configurations made in RaspAP are now safely written to /etc/dhcpcd.conf and merged with existing settings. This is done by matching a RaspAP configuration block, like so:

# RaspAP wlan0 configuration
interface wlan0
static ip_address=10.3.141.1/24
static routers=10.3.141.1
static domain_name_server=9.9.9.9 1.1.1.1

These are the only blocks manipulated by RaspAP, which means custom user entries in this file will remain untouched. This process is also idempotent, meaning that operations on this file can be safely run multiple times without anything being changed, unless needed.

Likewise with dnsmasq, this project now makes better use of the --conf-dir option by managing individual config files in /etc/dnsmasq.d/. Rather than a single, monolithic configuration file, RaspAP now manages these configs per-interface or feature, like so:

090_adblock.conf
090_wlan0.conf
090_eth0.conf

User configs may be created alongside these without concern for RaspAP overwriting them.

In parallel with these backend changes, the frontend has seen some important updates. Configuring DHCP for a given interface (for example, eth0) would require a user to first go to the Networking UI, select the eth0 interface tab, define a static IP address, Save and Apply settings, return to the DHCP server UI and finally enable DHCP.

This flow is significantly improved in two ways: 1) adapter IP address settings are now logically combined with the DHCP server options for each interface, and 2) the DHCP server settings page is now fully ajaxified, such that selecting a new interface automatically updates all the relevant fields.

Finally, a significant portion of the codebase has been modularized, meaning that difficult to follow (and maintain) procedural code is now properly broken up into discrete functions. It's far from perfect, but greatly improved and paves the way for future work. Likewise, there is still work to be done with applying these goals to hostapd configurations. However, the stage is set with the progress already made here.

Beta testers are welcome to dive in and evaluate this pre-release. You can do so by running the Quick Installer like so:

curl -sL https://install.raspap.com | bash -s -- --branch 2.6-beta

tl;dr — RaspAP plays nicer with manual config changes, extends DHCP support to more interfaces, with more modularized code, plus some nifty frontend updates.