From 97ddb0b4c7887db58fe82a5e5cbccbbd3c46676d Mon Sep 17 00:00:00 2001 From: PDTeamX <8293321+ehsandeep@users.noreply.github.com> Date: Sat, 6 Dec 2025 22:19:14 +0530 Subject: [PATCH] fix: host JSON field now returns hostname instead of IP - Changed 'host' field to return actual hostname (e.g., example.com) - Added new 'host_ip' field for the resolved/dialed IP address - Fixes semantic issue where 'host' was incorrectly returning IP --- runner/runner.go | 3 ++- runner/types.go | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/runner/runner.go b/runner/runner.go index 2035199a..8c2a19dc 100644 --- a/runner/runner.go +++ b/runner/runner.go @@ -2326,7 +2326,8 @@ retry: Pipeline: pipeline, HTTP2: http2, Method: method, - Host: ip, + Host: parsed.Hostname(), + HostIP: ip, A: ips4, AAAA: ips6, CNAMEs: cnames, diff --git a/runner/types.go b/runner/types.go index eb845612..ab013a70 100644 --- a/runner/types.go +++ b/runner/types.go @@ -59,6 +59,7 @@ type Result struct { ContentType string `json:"content_type,omitempty" csv:"content_type" mapstructure:"content_type"` Method string `json:"method,omitempty" csv:"method" mapstructure:"method"` Host string `json:"host,omitempty" csv:"host" mapstructure:"host"` + HostIP string `json:"host_ip,omitempty" csv:"host_ip" mapstructure:"host_ip"` Path string `json:"path,omitempty" csv:"path" mapstructure:"path"` FavIconMMH3 string `json:"favicon,omitempty" csv:"favicon" mapstructure:"favicon"` FavIconMD5 string `json:"favicon_md5,omitempty" csv:"favicon_md5" mapstructure:"favicon_md5"`