mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-11-12 12:37:51 +08:00
🌴 Sync 2026-07-08 20:36:07
This commit is contained in:
1 parent
6dda8a8707
commit
7fafcddf49
28 files changed
+839
-198
No files matched your search
@@ -304,8 +304,6 @@ function gen_outbound(flag, node, tag, proxy_table)
|
||||
headers = node.user_agent and {
|
||||
["User-Agent"] = node.user_agent
|
||||
} or nil,
|
||||
idle_timeout = (node.http_h2_health_check == "1") and node.http_h2_read_idle_timeout or nil,
|
||||
ping_timeout = (node.http_h2_health_check == "1") and node.http_h2_health_check_timeout or nil,
|
||||
}
|
||||
--不强制执行 TLS。如果未配置 TLS,将使用纯 HTTP 1.1。
|
||||
end
|
||||
@@ -318,8 +316,8 @@ function gen_outbound(flag, node, tag, proxy_table)
|
||||
headers = node.user_agent and {
|
||||
["User-Agent"] = node.user_agent
|
||||
} or nil,
|
||||
idle_timeout = (node.http_h2_health_check == "1") and node.http_h2_read_idle_timeout or nil,
|
||||
ping_timeout = (node.http_h2_health_check == "1") and node.http_h2_health_check_timeout or nil,
|
||||
idle_timeout = (node.http_h2_health_check == "1") and api.format_go_time(node.http_h2_read_idle_timeout, "15s") or nil,
|
||||
ping_timeout = (node.http_h2_health_check == "1") and api.format_go_time(node.http_h2_health_check_timeout, "15s") or nil,
|
||||
}
|
||||
--不强制执行 TLS。如果未配置 TLS,将使用纯 HTTP 1.1。
|
||||
end
|
||||
@@ -359,8 +357,8 @@ function gen_outbound(flag, node, tag, proxy_table)
|
||||
v2ray_transport = {
|
||||
type = "grpc",
|
||||
service_name = node.grpc_serviceName,
|
||||
idle_timeout = tonumber(node.grpc_idle_timeout) or nil,
|
||||
ping_timeout = tonumber(node.grpc_health_check_timeout) or nil,
|
||||
idle_timeout = (node.grpc_health_check == "1") and api.format_go_time(node.grpc_idle_timeout, "15s") or nil,
|
||||
ping_timeout = (node.grpc_health_check == "1") and api.format_go_time(node.grpc_health_check_timeout, "15s") or nil,
|
||||
permit_without_stream = (node.grpc_permit_without_stream == "1") and true or nil,
|
||||
}
|
||||
end
|
||||
@@ -583,12 +581,12 @@ function gen_outbound(flag, node, tag, proxy_table)
|
||||
idle_timeout = (function(t)
|
||||
if not version_ge_1_14_0 then return nil end
|
||||
t = tonumber(tostring(t or "30"):match("^%d+"))
|
||||
return (t and t >= 4 and t <= 120) and t or 30
|
||||
return (t and t >= 4 and t <= 120) and t .. "s" or "30s"
|
||||
end)(node.hysteria2_idle_timeout),
|
||||
keep_alive_period = (function(t)
|
||||
if not version_ge_1_14_0 then return nil end
|
||||
t = tonumber(tostring(t or "0"):match("^%d+"))
|
||||
return (t and t >= 2 and t <= 60) and t or nil
|
||||
return (t and t >= 2 and t <= 60) and t .. "s" or nil
|
||||
end)(node.hysteria2_keep_alive_period),
|
||||
disable_path_mtu_discovery = version_ge_1_14_0 and (tonumber(node.hysteria2_disable_mtu_discovery) == 1) or nil,
|
||||
tls = tls,
|
||||
|
||||
Reference in new issue
Block a user