On Entware routers (Keenetic and others), a proxy started by hand no longer dies when the terminal
session that started it closes.
Fixed
The Entware service survives SIGHUP (#164)
The Entware init script started the proxy as a plain background job of the shell that ran it. Run
from boot, that shell has no terminal, and nothing happens. But a start or restart typed over SSH
or telnet leaves the proxy inside that login session, and when the session closes (logging out, a
dropped connection, the client device rebooting), the kernel sends every process in it SIGHUP. The
proxy does not handle SIGHUP, so it exited, and stayed down until the next manual start or reboot.
- The init script now starts the proxy with SIGHUP ignored. An ignored signal stays ignored across
exec, so the proxy itself never sees the hangup. - This uses the shell's own
trap.nohupandsetsidare not guaranteed in the firmware's
BusyBox. - OpenWrt is unaffected: procd starts the service in its own session.
The fix lands when the init script is rewritten, which the installer does on every install and
upgrade. Running the installer again (or updating as usual) is enough. The sed workaround from
#164 is no longer needed and is overwritten.
Thanks to @Kor-Phaeron for the report and the workaround it is based on.
Also
- rustls 0.23.45 → 0.23.46, a patch release: TLS 1.3 traffic keys are now updated within fragmented
writes too, a session secret is no longer printed by itsDebugoutput, and buffering received
plaintext applies backpressure (#165).
What it costs
Nothing. stop still works: it sends SIGTERM and, if that is not enough, SIGKILL, neither of which
is affected.