Browse Source

Collate more data from the redirect results.

A few too many bandaids, gonna have to rewrite some stuff soonish.
master
onefang 1 year ago
parent
commit
cc182c9f8a
2 changed files with 6 additions and 2 deletions
  1. +4
    -1
      apt-panopticommon.lua
  2. +2
    -1
      apt-panopticon.lua

+ 4
- 1
apt-panopticommon.lua View File

@@ -671,6 +671,7 @@ APT.collateAll = function(hosts, l, host, func)
results = loadfile(f)()
results = APT.padResults(results)
if nil ~= func then func(results) end
results = APT.collate(l, host, 'R', results)
local v = hosts[host]
if nil ~= v then
local IPs = results.IPs
@@ -679,16 +680,18 @@ APT.collateAll = function(hosts, l, host, func)
if "table" == type(u) then
for h, t in pairs(u) do
results = APT.collate(l, host, h, results)
results = APT.collate(l, host, h .. '_R', results)
if nil ~= func then func(results, h) end
end
else
results = APT.collate(l, host, i, results)
results = APT.collate(l, host, i .. '_R', results)
if nil ~= func then func(results, i) end
end
end
end
end
end
results = APT.padResults(results)
return results
end



+ 2
- 1
apt-panopticon.lua View File

@@ -1127,7 +1127,8 @@ os.execute('sleep 1') -- Wait for things to start up before checking for them.
local srvs = io.popen('ls -1 results/*.lua')
for l in srvs:lines() do
local hst = l:sub(9, -5)
if (l:find('_') == nil) and (nil == APT.mirrors[hst]) then
if nil ~= l:find('_R%.lua') then hst = hst:sub(1, -3) end
if (hst:find('_') == nil) and (nil == APT.mirrors[hst]) then
local ips = loadfile(l)().IPs
if nil ~= ips then
debians[hst] = {Country = '', FDQN = hst, Active = 'yes', Rate = '', BaseURL = hst, Protocols = {http = true, https = true}, Bandwidth = '', IPs = ips}


Loading…
Cancel
Save