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:
Thomas Eizinger
2025-10-23 15:25:37 +11:00
committed by GitHub
parent d23224cbce
commit ce297999c9
5 changed files with 30 additions and 0 deletions

View File

@@ -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

View File

@@ -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