Can you provide a simple bash control cmd without desktop ui, because on linux server,there is no desktop ,only ssh bash shell。
Can you provide a simple bash control cmd without desktop ui, because on linux server,there is no desktop ,only ssh bash shell。
We have started a minimal tool to view connections, rules, nodes, etc:

https://github.com/gustavo-iniguez-goya/opensnitch/issues/54#issuecomment-750871732
Allowing/Denying connections is disabled for now, and the configuration can not still be changed. Also you can't view details of a process/host/user/etc.. but I hope to keep improving it :)
Not that a TUI wouldn't be nice, but personally a CLI would be preferable. Something that would allow scripting and automation, and the ability to allow connections from the console, maybe something like:
opensnitch-cli nodes list
opensnitch-cli --json events --node=machine1 list | jq '.[] | select(...)'
opensnitch-cli --json rules list
opensnitch-cli rules add "100-my-rule" --action=allow --exe='.*/firefox' --port='^(80|443)$' ...
opensnitch-cli rule firefox enable false
opensnitch-cli rule --node=machine1 firefox action allow
...
Obviously just a small selection of possible commands and would require a lot more thought.
Also maybe being able to use a rule as a trigger, associating a script that fires when the rule is hit might also be useful.
Hi,
Is this issue still ongoing? I'd like to know if you're open to work on it, and maybe review things if I send something.
I love the OpenSnitch concept, but the GUI isn't really for me. I'd rather use my own UI on top of the daemon. So I'm going in the same direction as @chopper2000uk a simple, scriptable CLI.
Today the part that talks to the daemon lives inside the GUI, so it only exists while the GUI is running. The idea is to move that into a small service that runs on its own, in the background:
opensnitchd
│ connects to unix:///tmp/osui.sock, same as today (unchanged)
▼
service (runs on its own, holds osui.sock, receives Subscribe / Ping /
AskRule / PostAlert, keeps the Notifications stream open)
│
│ local control socket
▼
ctl (something like opensnitchctl)
│
│ (or straight to the service, not decided yet)
▼
gui / tui / your own wrapper / scripts / etc.
The goal stays the same as today: the daemon does the work, and a UI lets you see what's happening and answer it. The difference is that you would no longer have to depend on the GUI to do that. You can close the GUI and the service keeps running, and you can manage everything from the ctl or from any app.
When the daemon asks about a new connection, the service holds the request for a configurable time, like the GUI prompt does today. If nobody answers from the ctl or an app, it replies with its default answer.
The daemon stays as it is. The existing GUI would be slightly modified so it no longer holds the socket itself.
If you don't want it running, you just stop the service, and the daemon falls back to its own DefaultAction, same as when the GUI is closed today.
I've got a small prototype (fully vibecoded, lol) that already talks to the daemon and lets you go through a CLI instead of the GUI. It's still early.
Would you be open to a PR in this direction? lmk what do you think befor I go further ^^