feat: F4.6g3 a computer's firewall window, measured against Java's with traffic from two networks

The firewall-pc scenario and FirewallWindowRun use Java's window as a person
does and send a ping, a TCP connection and a DNS question from the server's
network and from behind the router after each step. The core adds and
removes port rules (personalFirewall.ts) and writes both into the firewall's
log, which now carries each line's time; the room takes the window's
actions and sends its view and the log as lines; the editor shows Java's
window with its two tabs. Not adopted from Java: any integer as a port,
a port after a space refused without a word, a log one can type into.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-03 21:18:05 +00:00
co-authored by Claude Opus 5.5
parent 065b42430d
commit 2b85e7432c
25 changed files with 2092 additions and 19 deletions
+24
View File
@@ -0,0 +1,24 @@
// What a computer's firewall window shows besides its log, as the room keeps
// it and every client shows it (plan §7.3), after
// GUIApplicationFirewallWindow (measured with tools/java-oracle's
// FirewallWindowRun): its three boxes and the rules of its table. Its log
// comes as the window's lines: the firewall's log entries.
/** A rule as the window's table shows it. */
export interface FirewallViewRule {
readonly protocol: 'all' | 'tcp' | 'udp' | 'icmp';
/** The port, or -1 for every port. */
readonly port: number;
/** Java's sender column; null for a rule the window cannot make (one from a file that drops, or names an address). */
readonly sender: 'all' | 'sameNetwork' | null;
/** The rule whole, as the log names it (FirewallRule.toString). */
readonly text: string;
}
export interface FirewallView {
readonly active: boolean;
/** "Internet Control Message Protocol (Ping etc.) erlauben": the firewall does not drop ICMP. */
readonly icmpAllowed: boolean;
readonly filterUdp: boolean;
readonly rules: readonly FirewallViewRule[];
}
+1
View File
@@ -4,5 +4,6 @@ export * from './sim.js';
export * from './terminal.js';
export * from './dns.js';
export * from './echo.js';
export * from './firewall.js';
export * from './mail.js';
export * from './web.js';
+1 -1
View File
@@ -9,7 +9,7 @@ import type { CaptureRow, PageLanguage } from '@mdg-filius/core';
export const SIM_PROTOCOL_VERSION = 1;
/** The programs whose windows a client can watch and act in. */
export const APP_KINDS = ['terminal', 'webBrowser', 'webServer', 'emailClient', 'emailServer', 'echoServer', 'simpleClient', 'gnutella', 'dnsServer'] as const;
export const APP_KINDS = ['terminal', 'webBrowser', 'webServer', 'emailClient', 'emailServer', 'echoServer', 'simpleClient', 'gnutella', 'dnsServer', 'firewall'] as const;
export type AppKind = (typeof APP_KINDS)[number];
/**