Separation of backend and frontend #1317
Replies: 1 comment
-
|
Yeah, right now the systray icon / GUI is integrated with the gRPC server. We could split it, but maybe it'd be better to rewrite it in Go (which I already did sometime ago, several times, but I'll do it one more time https://github.com/gustavo-iniguez-goya/opensnitch/tree/cli/server). Basically the binary opensnitch-ui creates a gRPC server and exposes several methods: Ping(), AskRule(), Subscribe(), Notifications(), PostAlert() . When the daemon connects to the server (the GUI), it connects via unix socket or network socket, and calls Subscribe() (ui/client.go). If the connection is sucessful, it sends the configurations + rules, and inititates a bidirectional channel for notifications (ui/notifications.go). The interepted connections are collected in a circular buffer, and sent to the GUI every second using the Ping() method (ui/client.go , stats/statistics.go). |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I was looking at the code for inspiration to make a different UI frontend someday. But it seems that the frontend does some heavy lifting too. What I understand so far:
Is there some design document I could look into?
Beta Was this translation helpful? Give feedback.
All reactions