Wifi-ap: custom dnsmasq.conf, is there a way?

I am trying to modify the dnsmasq.conf file located in $SNAP_DATA which contains the dnsmasq configuration used to run the hotspot. is there a way to modify it or to add:


in case i wan to redirect the hot-spot user to a web page?

You cannot do that by changing wifi-ap configuration, but nothing prevents you from changing manually the configuration file and re-starting the service. But you would need to be careful that those changes are not overwritten if you change some other option by using wifi-ap commands.

i’ve tried several times the snaps recovers his own configuration every time it is restarted i think i have to modify the snap manually in this case :/. My objective is to create a snaps like your wifi-connects that shows by default node-red or my own webpage at login.

The fastest way should be to modify wifi-ap to redirect the network traffic to a certain address right? that is why my idea was to add address=/#/x.x.x.x.

Do you suggest any other method?

I think that would be the right way of configuring dnsmasq; that is what wifi-connect does to create its captive portal. In fact, it looks like in your use case you might be better off using wifi-connect as base instead of wifi-ap. The main difference is that the former needs the network-manager snap, while the later includes hostapd.