feat(fls): installed applications as Java loads them

readSystemSoftware lists a PC's or notebook's installed applications with
the settings the model needs: server applications switched on and their
port, the generic client's target, DNS recursion, web server virtual
hosts, Gnutella's peer limit and the personal firewall (on by default,
unlike a router's). Defaults the file leaves out are measured in Java.
All 23 corpus files match Java.

Two examples install an application of their own (Accumulator,
Broadcast), compiled into projekt/anwendungen; it is left out with a
warning, as this reader cannot run Java classes. It must survive a save.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-09-30 06:05:20 +00:00
co-authored by Claude Opus 5.5
parent be3b332655
commit c48d15def4
12 changed files with 1438 additions and 9 deletions
+4 -1
View File
@@ -30,7 +30,10 @@ virtuellen Bildschirm statt „headless".
NAT-Tabelle des Heimrouters, die Verbindung eines Modems und das
Dateisystem (Inhalte als Länge und SHA-256, damit die Referenz klein
bleibt; die Dateien von Router und Heimrouter erzeugt Javas Konstruktor aus
eigenen Vorlagen, sie stehen nicht in der Datei); Kabel (Enden als Gerät/Schnittstelle),
eigenen Vorlagen, sie stehen nicht in der Datei) und die installierten
Programme eines Rechners mit ihren Einstellungen (Klassen, die Filius
nicht mitbringt — eigene Anwendungen im Archiv unter `projekt/anwendungen`
— fehlen, weil das Werkzeug nur `konfiguration.xml` lädt); Kabel (Enden als Gerät/Schnittstelle),
Doku-Elemente.
Systemsoftware, Dateisysteme und Anwendungen folgen schrittweise.
+7
View File
@@ -50,6 +50,13 @@ HOME="$here/.build/home" xvfb-run -a java -cp "$classpath:$here/.build" GetterDe
filius.software.rip.RIPServer#port \
filius.software.www.WebServer#port \
javax.swing.SwingConstants::CENTER \
filius.software.clientserver.ServerBaustein#aktiv \
filius.software.clientserver.ClientBaustein#zielPort \
filius.software.clientserver.ClientBaustein#zielIPAdresse \
filius.software.dns.DNSServer#aktiv \
filius.software.www.WebServer#aktiv \
filius.software.www.WebServer#useVHost \
filius.software.dateiaustausch.PeerToPeerAnwendung#maxTeilnehmerZahl \
2>&1 | grep -v 'logback\|^$' || true
test -s "$defaults"
+44
View File
@@ -15,7 +15,13 @@ import filius.hardware.knoten.InternetKnoten;
import filius.hardware.knoten.Knoten;
import filius.hardware.knoten.LokalerKnoten;
import filius.rahmenprogramm.SzenarioVerwaltung;
import filius.software.Anwendung;
import filius.software.clientserver.ClientBaustein;
import filius.software.clientserver.ServerAnwendung;
import filius.software.dateiaustausch.PeerToPeerAnwendung;
import filius.software.dhcp.DHCPServer;
import filius.software.dns.DNSServer;
import filius.software.www.WebServer;
import filius.software.firewall.Firewall;
import filius.software.firewall.FirewallRule;
import filius.software.system.Betriebssystem;
@@ -239,6 +245,7 @@ public class FlsOracle {
}
json.put("manualRoutes", routes);
json.put("fileSystem", system.getDateisystem() == null ? null : fileTree(system.getDateisystem().getRoot()));
if (system instanceof Betriebssystem) json.put("applications", applications(system));
json.put("dhcpClient", system.isDHCPKonfiguration());
DHCPServer server = system.getDHCPServer();
if (server != null) {
@@ -287,6 +294,43 @@ public class FlsOracle {
return json;
}
/**
* The installed applications of a PC or notebook, by key: the class, and
* the settings the topology layer reads. E-mail accounts and messages are
* a later layer.
*/
static List<Object> applications(InternetKnotenBetriebssystem system) {
List<Object> result = new ArrayList<>();
Map<String, Anwendung> installed = new TreeMap<>(system.getInstallierteAnwendungen());
for (Map.Entry<String, Anwendung> entry : installed.entrySet()) {
Anwendung application = entry.getValue();
Map<String, Object> json = new LinkedHashMap<>();
json.put("key", entry.getKey());
json.put("class", application == null ? null : application.getClass().getName());
if (application instanceof ServerAnwendung server) {
json.put("aktiv", server.isAktiv());
json.put("port", server.getPort());
}
if (application instanceof ClientBaustein client) {
json.put("zielIPAdresse", client.getZielIPAdresse());
json.put("zielPort", client.getZielPort());
}
if (application instanceof DNSServer dns) json.put("recursiveResolutionEnabled", dns.isRecursiveResolutionEnabled());
if (application instanceof WebServer web) json.put("useVHost", web.isUseVHost());
if (application instanceof PeerToPeerAnwendung peer) json.put("maxTeilnehmerZahl", peer.getMaxTeilnehmerZahl());
if (application instanceof Firewall firewall) {
json.put("activated", firewall.isActivated());
json.put("defaultPolicy", (int) firewall.getDefaultPolicy());
json.put("dropICMP", firewall.getDropICMP());
json.put("filterSYNSegmentsOnly", firewall.getFilterSYNSegmentsOnly());
json.put("filterUdp", firewall.getFilterUdp());
json.put("rules", firewall.getRuleset().size());
}
result.add(json);
}
return result;
}
/**
* A file system tree: a directory is a node whose user object is its name,
* a file one whose user object is a Datei. Contents as SHA-256 and length