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:
@@ -2,9 +2,10 @@
|
||||
// ServerMitarbeiter, TCPSocket's failures), and the generic client's as its
|
||||
// window writes them (ClientBaustein, Socket, TCPSocket), in the person's
|
||||
// language: one line each (a failed connection two), as Java appends them to
|
||||
// its window's text area.
|
||||
// its window's text area. And a computer's firewall's log as its window
|
||||
// writes it (Firewall.benachrichtigeBeobachter, GUIApplicationFirewallWindow).
|
||||
|
||||
import type { ServerLogEntry, SimpleClientLogEntry } from '@mdg-filius/core';
|
||||
import { firewallRuleText, PORT_RULE_PROTOCOL_NAMES, type FirewallLogEntry, type ServerLogEntry, type SimpleClientLogEntry } from '@mdg-filius/core';
|
||||
import type { Translate } from '../i18n/i18n.js';
|
||||
|
||||
export function serverLine(entry: ServerLogEntry, t: Translate): string {
|
||||
@@ -45,3 +46,20 @@ export function simpleClientLine(entry: SimpleClientLogEntry, t: Translate): str
|
||||
return t(`server.sendFailed.${entry.failure}`);
|
||||
}
|
||||
}
|
||||
|
||||
export function firewallLine(entry: FirewallLogEntry, t: Translate): string {
|
||||
switch (entry.kind) {
|
||||
case 'ruleMatched':
|
||||
return t('personalFirewall.ruleMatched', {
|
||||
number: entry.ruleNumber,
|
||||
rule: firewallRuleText(entry.rule, entry.firstInterface),
|
||||
action: t(entry.accepted ? 'firewall.accept' : 'firewall.drop'),
|
||||
});
|
||||
case 'icmpDropped':
|
||||
return t('personalFirewall.icmpDropped', { sender: entry.senderIPAddress, receiver: entry.receiverIPAddress, code: entry.code, type: entry.type });
|
||||
case 'portRuleAdded':
|
||||
return t('personalFirewall.portRuleAdded', { port: entry.port, protocol: PORT_RULE_PROTOCOL_NAMES[entry.protocol] });
|
||||
case 'portRuleRemoved':
|
||||
return t('personalFirewall.portRuleRemoved');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user