From 5242caf8cb467563701c0fe5d5d84320a1a0fbe4 Mon Sep 17 00:00:00 2001 From: onefang Date: Sat, 23 Nov 2019 21:51:44 +1000 Subject: Use --connect-to properly. --- apt-panopticon.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'apt-panopticon.lua') diff --git a/apt-panopticon.lua b/apt-panopticon.lua index 71d3629..a7d67d2 100755 --- a/apt-panopticon.lua +++ b/apt-panopticon.lua @@ -327,7 +327,7 @@ checkHEAD = function (host, URL, r, retry) --[[ Using curl command line - -I - HEAD - --connect-to IP - connect to IP, but use SNI from URL. + --connect-to domain:port:IP:port - connect to IP, but use SNI from URL. -header "" - add extra headers. -L - DO follow redirects. --max-redirs n - set maximum redirects, default is 50, -1 = unlimited. @@ -346,7 +346,7 @@ checkHEAD = function (host, URL, r, retry) if "http" == PU.scheme then hdr = '-H "Host: ' .. host .. '"' end - IP = '--connect-to ' .. PU.host + IP = '--connect-to "' .. pu.host .. '::' .. PU.host .. ':"' end local cmd = 'curl -I --retry 0 -s --path-as-is --connect-timeout 15 --max-redirs 0 ' .. IP .. ' ' .. '-o /dev/null -D results/"HEADERS_' .. fname .. '" ' .. hdr .. ' -w "#%{http_code} %{ssl_verify_result} %{url_effective}\\n" ' .. PU.scheme .. '://' .. host .. PU.path .. ' >>results/"STATUS_' .. fname .. '"' -- cgit v1.1