From e154119d456251a85955c514e2eb1ac9f4e96054 Mon Sep 17 00:00:00 2001 From: dvs1 Date: Fri, 15 Nov 2024 15:40:27 +1000 Subject: Wrap IPv6 in [], part two. --- apt-panopticon.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'apt-panopticon.lua') diff --git a/apt-panopticon.lua b/apt-panopticon.lua index 8e758c6..30bff59 100755 --- a/apt-panopticon.lua +++ b/apt-panopticon.lua @@ -277,7 +277,11 @@ checkHEAD = function (host, URL, r, retry, sanity) if "http" == PU.scheme then hdr = '-H "Host: ' .. host .. '"' end - IP = '--connect-to "' .. pu.host .. '::' .. PU.host .. ':"' + if '-6' == APT.IPv46 then + IP = '--connect-to "' .. pu.host .. '::[' .. PU.host .. ']:"' + else + IP = '--connect-to "' .. pu.host .. '::' .. PU.host .. ':"' + end fname = host .. "_" .. pu.host .. '_' .. PU.host .. "_" .. PU.path:gsub("/", "_") .. ".txt" end os.execute('rm -f results/HEADERS_' .. fname .. ' 2>/dev/null; rm -f results/STATUS_' .. fname .. ' 2>/dev/null; touch results/STATUS_' .. fname) -- cgit v1.1