CLIC need a solution to redirect wifi user onto the homepage (and give access to the internet when the person is on this page).
Other usecase could exists where we want to create captive portal before giving access to the internet (for example accept terms or login with an account before to be able to connect). We could for example giving access to the internet only to yunohost user...
Solution
Integrate a captive portal mechanism using mac filtering.
Note that mac filtering can be coturn by sniffing packet and founding an allowed mac address.
This captive portal is able to work even with DoH activated.
To use this new feature a code like this need to be integrated into the home page of yeswiki CLIC (or in the POST action of a login form).
It's also possible to allowed specific mac address just by hand from the IP of the guest: /usr/local/bin/captiveportal_allow 10.0.242.10
IMPORTANT:
i tested it on my personal server, however i didn't test everything (like the install script or the iptables hook), so i guess it won't work for now.
currently it won't work completely with IPv6 perl captiveportal_fakedns script need to be adapted, and the conditionnal nginx redirection
PR Status
[ ] Code finished and ready to be reviewed/tested
[ ] The fix/enhancement were manually tested (if applicable)
Automatic tests
Automatic tests can be triggered on https://ci-apps-dev.yunohost.org/after creating the PR, by commenting "!testme", "!gogogadgetoci" or "By the power of systemd, I invoke The Great App CI to test this Pull Request!". (N.B. : for this to work you need to be a member of the Yunohost-Apps organization)
Problem
CLIC need a solution to redirect wifi user onto the homepage (and give access to the internet when the person is on this page).
Other usecase could exists where we want to create captive portal before giving access to the internet (for example accept terms or login with an account before to be able to connect). We could for example giving access to the internet only to yunohost user...
Solution
Integrate a captive portal mechanism using mac filtering. Note that mac filtering can be coturn by sniffing packet and founding an allowed mac address.
This captive portal is able to work even with DoH activated.
To use this new feature a code like this need to be integrated into the home page of yeswiki CLIC (or in the POST action of a login form).
It's also possible to allowed specific mac address just by hand from the IP of the guest:
/usr/local/bin/captiveportal_allow 10.0.242.10
IMPORTANT:
PR Status
Automatic tests
Automatic tests can be triggered on https://ci-apps-dev.yunohost.org/ after creating the PR, by commenting "!testme", "!gogogadgetoci" or "By the power of systemd, I invoke The Great App CI to test this Pull Request!". (N.B. : for this to work you need to be a member of the Yunohost-Apps organization)