mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-22 07:56:18 -05:00
captive portal: let acknowledged clients finish so the OS offers "Done"
A phone's sign-in sheet only shows "Done" once the OS re-probes and gets the genuine success reply. The Controller now remembers each client (by hotspot IP) that has loaded the portal page and answers its later probes with the reply each OS expects (Apple "Success" HTML, Android 204, Windows "Microsoft Connect Test", ...). The set is cleared when the hotspot starts so a new session shows the page again. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
parent
66151df6c6
commit
f182e64e17
7 changed files with 108 additions and 15 deletions
|
|
@ -1089,6 +1089,13 @@ class TestStartHotspot:
|
|||
assert 'address=/captive.apple.com/10.42.1.1' in captive_portal.INCLUDE_FILE.read_text()
|
||||
assert run.call_args_list[-1][0][0] == ["nmcli", "connection", "up", "Hotspot"]
|
||||
|
||||
def test_start_forgets_acknowledged_clients(self, reset_runtime_config):
|
||||
"""A new hotspot session shows every device the portal page again."""
|
||||
captive_portal.acknowledge_client('10.42.0.210')
|
||||
result, _ = self._start_with_nmcli()
|
||||
assert result["success"] is True
|
||||
assert not captive_portal.is_client_acknowledged('10.42.0.210')
|
||||
|
||||
def test_no_reactivation_when_ip_matches(self, reset_runtime_config):
|
||||
result, run = self._start_with_nmcli()
|
||||
ups = [c for c in run.call_args_list if c[0][0][:3] == ['nmcli', 'connection', 'up']]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue