mirror of
https://github.com/evilsocket/opensnitch.git
synced 2025-03-04 08:34:40 +01:00
show domain name when establishing a new connection
When a new connection is about to be established and the system performs a dns resolution, we displayed it like this: 9.9.9.9 (www.opensnitch.io) It added visibility of what was going on, but if you created a rule to filter by destination host, you were prompted twice to allow firstly the DNS query, and secondly the TCP connection, which was a bit annoying. Some users (#5) also asked to display just the domain, so now we only display the domain name.
This commit is contained in:
parent
bc70423997
commit
d6cf18ef27
1 changed files with 1 additions and 3 deletions
|
@ -210,11 +210,9 @@ func (c *Connection) parseDirection() bool {
|
|||
func (c *Connection) getDomains(nfp *netfilter.Packet, con *Connection) {
|
||||
domains := dns.GetQuestions(nfp)
|
||||
if len(domains) > 0 {
|
||||
con.DstHost = fmt.Sprint(con.DstHost, " (")
|
||||
for _, dns := range domains {
|
||||
con.DstHost = fmt.Sprint(con.DstHost, dns)
|
||||
con.DstHost = dns
|
||||
}
|
||||
con.DstHost = fmt.Sprint(con.DstHost, ")")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue