mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-10-30 05:05:13 +08:00
🔥 Sync 2026-04-14 01:23:04
This commit is contained in:
1 parent
010610b1e5
commit
b9b070f39f
25 files changed
+261
-178
No files matched your search
+7
-2
@@ -31,6 +31,7 @@ local Module = {
|
||||
curlParams = "-s -g --no-keepalive",
|
||||
proxyAuthString = "",
|
||||
proxyString = "",
|
||||
ifaceString = "",
|
||||
status = nil,
|
||||
_enabled = false,
|
||||
_deadCounter = 0,
|
||||
@@ -85,6 +86,9 @@ function Module:init(t)
|
||||
t.proxy_port,
|
||||
self.proxyAuthString)
|
||||
end
|
||||
if t.iface then
|
||||
self.ifaceString = " --interface " .. t.iface
|
||||
end
|
||||
if tonumber(t.message_at_startup) == 1 then
|
||||
self._msgSentDisconnect = false
|
||||
self._disconnected = false
|
||||
@@ -138,9 +142,10 @@ function Module:httpRequest(url)
|
||||
|
||||
self.debugOutput(string.format("--- %s ---", self.name))
|
||||
|
||||
local curl = string.format(
|
||||
'%s%s --connect-timeout %s %s "%s"; printf "\n$?";',
|
||||
local curl = string.format(
|
||||
'%s%s%s --connect-timeout %s %s "%s"; printf "\n$?";',
|
||||
self.curlExec,
|
||||
self.ifaceString,
|
||||
self.proxyString,
|
||||
self.connectTimeout,
|
||||
self.curlParams,
|
||||
|
||||
Reference in new issue
Block a user