Repository navigation
Release v0.128.0: the web terminal listens on an IPv6 bind; stale comments corrected - #154
Merged
Merged
Conversation
…ments corrected console-web: server.py opened an AF_INET socket whatever CONSOLE_WEB_BIND said, so console_web_bind ::1 (or [::1]) died with gaierror before listening and s6 restarted it forever while the run script logged a start. bind_address() now picks AF_INET6 for an IPv6 literal (brackets stripped), logs it as [::1]:8100, and a failed bind logs one line naming the address and the reason. The run script writes an IPv6 bind in brackets beside its port. IPv4 binds, the 127.0.0.1 default included, are unchanged. Tests start the real server on ::1 and [::1] and fetch the login page over IPv6 (skipped where IPv6 loopback cannot be bound); 8/8 mutants killed. Comments the 0.127.0 docs pass left behind, each checked against the code: console footer order (message last, key bar above it), the resize-message effect (p opens the page-all confirmation, which swallows the rest), the trunk is not the emergency path, the cordless battery rule (low while DISCHARGING is degraded), announce vs wake-up delivery names, and whose numbers the call-quality ledger held. PERFORMANCE.md no longer calls the 2026-09-01 outage the only one; wp826.mjs login no longer prints part of the session id. Comment-only files proven by AST comparison. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rottle per /64 bind_address stripped brackets after the blank check, so "[]" became the empty host, which the socket layer binds as INADDR_ANY: every interface, where 0.127.0 never listened. Brackets are stripped first and a blank result means 127.0.0.1, the run script's own fail-closed default (server.py's module docstring already said so). A name the socket layer cannot encode raised TypeError past the OSError handler; it now gets the same one-line message. webauth.throttle_key: failed logins from an IPv6 client are counted by its /64 (a host can pick a new address in its /64 for every try), an IPv4-mapped address as its IPv4 address. Applied inside LoginThrottle, so the web terminal and the SSH console both get it; IPv4 keys are unchanged (SSH tests 35/35 with asyncssh). Comments and docs the review found still stating corrected-away claims: the resize effect is either/or (p opens the page-all confirmation, or t a transfer when the room is on a call), the announce join is to the audio-delivered row, operator-console.md and two test notes on the footer order, and the 0.81.0/0.99.0 archive entries on whose numbers were mirrored (10 callers, 2 dialled, 32 the household's own caller ID). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… in the log The /64-only throttle assumed one host per /64. On a home LAN the router advertises one /64 that every IPv6 device shares, so one device retrying a stale password locked all the others out (and one success reset everyone's count). Back to the per-address limit (5 per 300 s, unchanged for IPv4 and for any one address), plus a separate ceiling of 30 per /64 that only attempts their own address allowed count toward: a rotating host meets it, a neighbour locks out only itself. clear() drops only the address's entry. The run script now reads console_web_bind the way bind_address does (outer spaces trimmed, "[]" / "[ ]" blank -> 127.0.0.1), so it no longer logs "[]" as reachable from the LAN while the server listens on loopback; pure shell, no tr/sed. A port outside 0-65535 (OverflowError) gets the one-line message too. Transfer mode acts on the selection keys as well as Enter/Esc; the 0.81.0 archive sentence now accounts for all 45 rows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ry, one bind reading The /64 counts shared the address table, whose memory bound dropped the FIRST-inserted key: the /64 entry, created on an attacker's first try, was evicted after ~1024 fresh addresses and the ceiling started again (300 of 10000 got through; 1770/h at 200 tries/s). /64 counts now live in their own table (256 entries; a LAN has a handful), and both tables move a key to the end when it is charged, so the bound drops the entry used longest ago. A correct password takes back the /64 attempt it spent, so a client signing in every few seconds over IPv6 no longer locks out itself and its neighbours. IPv4 decisions are identical to 0.127.0 (0 mismatches in 1.14 million). The run script reads console_web_bind with consoleproto.bind_address (moved out of server.py; the server keeps an alias), the function the server binds with, instead of a second shell reading that disagreed for "[127.0.0.1]", "[ ::1 ]" and non-ASCII whitespace. If python3 cannot run, the value is treated as blank (127.0.0.1). test_documented_defaults points the real bind chain at the source tree. Transfer-mode docstring names the quit keys. The reviewers' own reproduction scripts, re-run on this tree: spray 30 of 10000 at any rate, successful logins never refused, run script and server agree on every value. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two follow-ups from the 0.127.0 documentation release: the console web terminal on an IPv6 bind, and comments that still repeated claims the docs pass corrected.
Web terminal on an IPv6
console_web_bindserver.pybuilt an AF_INETThreadingTCPServerwhateverCONSOLE_WEB_BINDsaid, so::1or[::1]died withgaierrorbefore listening, and s6 restarted the service forever while the run script logged a start.consoleproto.bind_address()(aliased inserver.py) reads the bind once.127.0.0.1(fail closed: an empty host would be INADDR_ANY).[::1]:8100.[],[127.0.0.1],[ ::1 ]and non-ASCII whitespace). Ifpython3cannot run, the value is treated as blank.0.0.0.0(IPv4), so nothing changes for it.Login throttle (
webauth.LoginThrottle, shared by the web terminal and SSH)/64in the same window, so one host rotating source addresses meets a limit. Two refinements keep the ceiling from punishing neighbours, because a home LAN is one /64 shared by every device:::ffff:a.b.c.dcounts as the IPv4 address.Comments and docs corrected against the code
console.pyfooter order; what the mistyped resize message would have done (console_bridge.pyand its test:popens the page-all confirmation, orta transfer, and neither acts on the rest of the string).rtpmon/poller.py).devhealth/poller.py: low while discharging).webui/app.py).switchboard-callqos; CHANGELOG-ARCHIVE 0.81.0/0.99.0).tools/wp826.mjs login(not in the image) no longer prints part of the session id.Tests and review
test_console_ssh.pywith asyncssh 2.18 in a venv: 35 passed.::1and[::1]and the login page is fetched over IPv6 (skipped where IPv6 loopback cannot bind);bind_address;[]bound every interface) and a throttle design error (the /64-only key let one LAN device lock out the rest). The reviewers' own reproduction scripts, re-run on this tree, pass.Deploy check
extensions.conf/pjsip.confmust hash as before. The web terminal must log its live bind (0.0.0.0here) in both the run script and the server, serve its login page, and show 10/10 services.🤖 Generated with Claude Code