mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-22 07:56:18 -05:00
captive portal: never forward any record type for probe hosts
`address=` only synthesizes A/AAAA answers. iOS also asks for the HTTPS record type; dnsmasq forwarded that upstream, Apple's answer aliased to captive.g.aaplimg.com, and the phone fetched the genuine "Success" from Apple instead of the portal. Each probe host now also gets `local=`, so dnsmasq answers every type itself, and the CDN alias is a probe host too. Observed with dnsmasq query logging on a hotspot with an eth0 uplink. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
parent
85c27b91df
commit
66151df6c6
2 changed files with 15 additions and 2 deletions
|
|
@ -41,6 +41,15 @@ class TestRenderDnsmasqConfig:
|
|||
assert f'address=/{host}/10.42.0.1' in config
|
||||
assert f'address=/{FRIENDLY_NAME}/10.42.0.1' in config
|
||||
|
||||
def test_probe_hosts_are_never_forwarded(self):
|
||||
"""iOS asks for the HTTPS record type too; a forwarded answer leads it to the real Apple."""
|
||||
config = render_dnsmasq_config('10.42.0.1')
|
||||
for host in (*PROBE_HOSTS, FRIENDLY_NAME):
|
||||
assert f'local=/{host}/' in config
|
||||
|
||||
def test_apple_cdn_alias_is_a_probe_host(self):
|
||||
assert 'captive.g.aaplimg.com' in PROBE_HOSTS
|
||||
|
||||
def test_no_wildcard(self):
|
||||
"""A wildcard would break the hotspot's Internet passthrough."""
|
||||
assert '/#/' not in render_dnsmasq_config('10.42.0.1')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue