mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-10-29 08:25:13 +08:00
🦄 Sync 2026-05-02 20:20:38
This commit is contained in:
1 parent
7cd03aa918
commit
d5efb00b6d
12 files changed
+129
-70
No files matched your search
@@ -945,6 +945,28 @@ function parseURL(url_str)
|
||||
return res
|
||||
end
|
||||
|
||||
function parseDoH(doh_str)
|
||||
doh_str = trim(doh_str)
|
||||
if doh_str == "" then return nil end
|
||||
|
||||
local url_part, ip_part
|
||||
if doh_str:find(",", 1, true) then
|
||||
url_part, ip_part = doh_str:match("^([^,]+),(.+)$")
|
||||
else
|
||||
url_part = doh_str
|
||||
end
|
||||
|
||||
local res = parseURL(url_part)
|
||||
if not res then return nil end
|
||||
|
||||
res.url = url_part
|
||||
if ip_part and ip_part ~= "" and is_ip(ip_part) then
|
||||
res.hostip = ip_part
|
||||
end
|
||||
|
||||
return res
|
||||
end
|
||||
|
||||
local default_file_tree = {
|
||||
x86_64 = "amd64",
|
||||
x86 = "386",
|
||||
|
||||
Reference in new issue
Block a user