Skip to content

SimpleDeFence 0.1.7 beta

Pre-release
Pre-release

Choose a tag to compare

@fcoltro fcoltro released this 30 Aug 00:46
· 51 commits to main since this release

Fixes the Blocked list. This is the one that actually gets the blocked apps on screen.

What was wrong

The control pipe wrote each reply and then disconnected without waiting for the client to take it. Disconnect() discards whatever has not been read yet, and Flush() does not stand in for waiting — it pushes bytes as far as the kernel buffer, 20 KB here, and returns. Everything past that was thrown away in flight.

Small replies fit and got through, which is why the app looked healthy: it connected to the service, showed no error, and listed connections normally. The firewall log does not fit — it is sent as one message, around 176 KB — so it lost that race every time. It is also the only thing the Blocked list is built from.

That is why the list appeared to flicker: just after the service started, while the log was still nearly empty, the reply was small enough to arrive. Once the log had content, it never arrived again.

Fixed

The server now waits for the client to drain the reply before disconnecting, which is what the disconnect contract asks for. Covered by a test that sends a 500-entry reply through a real pipe and checks the end of it, since a truncated message loses its tail first.

Also in recent betas

  • A log that cannot be read is no longer reported as a firewall with nothing to report (0.1.6).
  • Blocked events are recorded in every mode, not only while learning (0.1.4).
  • A failure in one section of the Connections screen no longer empties the other two.
  • The Blocked list reaches back an hour by default, and that is now a setting.

If you are installing for the first time

SimpleDeFence is a whitelist firewall: in Normal mode it blocks all outbound traffic except what you have allowed, so a fresh install will cut apps off until you allow them. Switch to Allow outgoing from the tray icon first if you would rather not lose connectivity while setting up, then allow apps from Rules → Add exception, which has process, window and file pickers.