mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 10:18:54 +00:00
feat(gateway): capture domain name of flow (#10692)
Whenever we route a packet from the Client to a DNS resource, we now also capture the domain name. If this is the first packet and we are thus creating a new flow, we'll save that domain in it. Later packets for the same IP are rolled up under the same flow and thus don't need to re-set the domain. Resolves: #10691
This commit is contained in:
@@ -35,6 +35,7 @@ rx_bytes=0
|
||||
|
||||
for flow in "${flows[@]}"; do
|
||||
assert_eq "$(get_flow_field "$flow" "inner_dst_ip")" "172.21.0.101"
|
||||
assert_eq "$(get_flow_field "$flow" "inner_domain")" "download.httpbin"
|
||||
rx_bytes+="$(get_flow_field "$flow" "rx_bytes")"
|
||||
done
|
||||
|
||||
|
||||
@@ -26,4 +26,5 @@ assert_eq "${#flows[@]}" 1
|
||||
|
||||
flow="${flows[0]}"
|
||||
assert_eq "$(get_flow_field "$flow" "inner_dst_ip")" "172.21.0.101"
|
||||
assert_eq "$(get_flow_field "$flow" "inner_domain")" "download.httpbin"
|
||||
assert_gteq "$(get_flow_field "$flow" "rx_bytes")" 10000000
|
||||
|
||||
Reference in New Issue
Block a user