mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-11-16 21:43:33 +08:00
🎉 Sync 2026-09-15 12:29:06
This commit is contained in:
1 parent
6b5437a0b4
commit
daebab083f
13 files changed
+638
-90
No files matched your search
@@ -292,12 +292,15 @@ end
|
||||
|
||||
function curl_proxy(url, file, args)
|
||||
-- Use the proxy
|
||||
local socks_server = get_cache_var("GLOBAL_SOCKS_server")
|
||||
if socks_server and socks_server ~= "" then
|
||||
if not args then args = {} end
|
||||
local tmp_args = clone(args)
|
||||
tmp_args[#tmp_args + 1] = "-x socks5h://" .. socks_server
|
||||
return curl_base(url, file, tmp_args)
|
||||
local socks_port = get_cache_var(("ACL_${flag}_node_socks_port"):gsub("${flag}", "acl_default"))
|
||||
if socks_port then
|
||||
local socks_server = "127.0.0.1:%s" % socks_port
|
||||
if socks_server and socks_server ~= "" then
|
||||
if not args then args = {} end
|
||||
local tmp_args = clone(args)
|
||||
tmp_args[#tmp_args + 1] = "-x socks5h://" .. socks_server
|
||||
return curl_base(url, file, tmp_args)
|
||||
end
|
||||
end
|
||||
return nil, nil
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user