diff --git a/README-DEV.txt b/README-DEV.txt new file mode 100644 index 0000000..68fff21 --- /dev/null +++ b/README-DEV.txt @@ -0,0 +1,10 @@ +Before running fw-daemon, make sure to export: GODEBUG=cgocheck=0 + +Also, here's a default fw-daemon-socks.json config file: + +root@subgraph:/# cat /etc/fw-daemon-socks.json +{ + "SocksListener": "tcp|127.0.0.1:9998", + "TorSocks": "tcp|127.0.0.1:9050" +} + diff --git a/gnome-shell/firewall@subgraph.com/dialog.js b/gnome-shell/firewall@subgraph.com/dialog.js index f12d735..c2c48c9 100644 --- a/gnome-shell/firewall@subgraph.com/dialog.js +++ b/gnome-shell/firewall@subgraph.com/dialog.js @@ -28,6 +28,7 @@ const DetailSection = new Lang.Class({ this.ipAddr = this._addDetails("IP Address:"); this.path = this._addDetails("Path:"); this.pid = this._addDetails("Process ID:"); + this.origin = this._addDetails("Origin:"); this.user = this._addDetails("User:"); }, @@ -39,10 +40,11 @@ const DetailSection = new Lang.Class({ return msg; }, - setDetails: function(ip, path, pid, user) { + setDetails: function(ip, path, pid, user, origin) { this.ipAddr.text = ip; this.path.text = path; this.pid.text = pid.toString(); + this.origin.text = origin; this.user.text = user; } }); @@ -449,7 +451,7 @@ const PromptDialog = new Lang.Class({ } }, - update: function(application, icon, path, address, port, ip, user, pid, proto, expanded, expert, action) { + update: function(application, icon, path, address, port, ip, origin, user, pid, proto, expanded, expert, action) { this._address = address; this._port = port; @@ -478,6 +480,6 @@ const PromptDialog = new Lang.Class({ } this.optionList.buttonGroup._setChecked(this.optionList.scopeToIdx(action)) - this.info.setDetails(ip, path, pid, user); + this.info.setDetails(ip, path, pid, user, origin); }, }); diff --git a/gnome-shell/firewall@subgraph.com/extension.js b/gnome-shell/firewall@subgraph.com/extension.js index cadba36..f93b935 100644 --- a/gnome-shell/firewall@subgraph.com/extension.js +++ b/gnome-shell/firewall@subgraph.com/extension.js @@ -50,6 +50,7 @@ const FirewallPromptInterface = ' \ \ \ \ + \ \ \ \ @@ -86,11 +87,11 @@ const FirewallPromptHandler = new Lang.Class({ }, RequestPromptAsync: function(params, invocation) { - let [app, icon, path, address, port, ip, user, pid, expanded, expert, action] = params; + let [app, icon, path, address, port, ip, origin, user, pid, expanded, expert, action] = params; this._closeDialog(); this._dialog = new Dialog.PromptDialog(invocation); this._invocation = invocation; - this._dialog.update(app, icon, path, address, port, ip, user, pid, "TCP", expanded, expert, action); + this._dialog.update(app, icon, path, address, port, ip, origin, user, pid, "TCP", expanded, expert, action); this._dialog.open(); }, diff --git a/nfqueue/nfqueue.c b/nfqueue/nfqueue.c index 5c3b0f2..bc09c13 100644 --- a/nfqueue/nfqueue.c +++ b/nfqueue/nfqueue.c @@ -5,6 +5,8 @@ int nfqueue_cb_new(struct nfq_q_handle *qh, struct nfgenmsg *nfmsg, struct nfq_data *nfa, void *data) { struct nfqnl_msg_packet_hdr *ph = nfq_get_msg_packet_hdr(nfa); +// struct nfqnl_msg_packet_hw *hwph = nfq_get_packet_hw(nfa); + if(ph == NULL) { return 1; diff --git a/nfqueue/nfqueue.go b/nfqueue/nfqueue.go index 0795930..230c098 100644 --- a/nfqueue/nfqueue.go +++ b/nfqueue/nfqueue.go @@ -42,7 +42,7 @@ func NewNFQueue(qid uint16) (nfq *nfQueue) { } /* -This returns a channel that will recieve packets, +This returns a channel that will receive packets, the user then must call pkt.Accept() or pkt.Drop() */ func (this *nfQueue) Process() <-chan *Packet { diff --git a/sgfw/prompt.go b/sgfw/prompt.go index 709c1c2..4c71c88 100644 --- a/sgfw/prompt.go +++ b/sgfw/prompt.go @@ -75,6 +75,7 @@ func (p *prompter) processConnection(pc pendingConnection) { addr, int32(pc.dstPort()), pc.dst().String(), + "---", uidToUser(pc.procInfo().UID), int32(pc.procInfo().Pid), FirewallConfig.PromptExpanded,