mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-11-01 00:15:13 +08:00
💋 Sync 2026-06-26 20:45:50
This commit is contained in:
1 parent
cdb20e8812
commit
253cc1d8e2
20 files changed
+369
-71
No files matched your search
@@ -284,10 +284,18 @@ function gen_outbound(flag, node, tag, proxy_table)
|
||||
local o = {
|
||||
type = "salamander",
|
||||
settings = node.hysteria2_obfs_password and {
|
||||
password = node.hysteria2_obfs_password,
|
||||
packetSize = node.hysteria2_obfs_type == "gecko" and "512-1200" or nil
|
||||
password = node.hysteria2_obfs_password
|
||||
} or nil
|
||||
}
|
||||
if node.hysteria2_obfs_type == "gecko" then
|
||||
local min = tonumber(node.hysteria2_obfs_MinPacketSize) or 512
|
||||
local max = tonumber(node.hysteria2_obfs_MaxPacketSize) or 1200
|
||||
if min <= 0 or min > max or max > 2048 then
|
||||
min = 512
|
||||
max = 1200
|
||||
end
|
||||
o.settings.packetSize = min .. "-" .. max
|
||||
end
|
||||
udp[#udp+1] = o
|
||||
end
|
||||
if node.hysteria2_realms then
|
||||
@@ -724,10 +732,18 @@ function gen_config_server(node)
|
||||
local o = {
|
||||
type = "salamander",
|
||||
settings = node.hysteria2_obfs_password and {
|
||||
password = node.hysteria2_obfs_password,
|
||||
packetSize = node.hysteria2_obfs_type == "gecko" and "512-1200" or nil
|
||||
password = node.hysteria2_obfs_password
|
||||
} or nil
|
||||
}
|
||||
if node.hysteria2_obfs_type == "gecko" then
|
||||
local min = tonumber(node.hysteria2_obfs_MinPacketSize) or 512
|
||||
local max = tonumber(node.hysteria2_obfs_MaxPacketSize) or 1200
|
||||
if min <= 0 or min > max or max > 2048 then
|
||||
min = 512
|
||||
max = 1200
|
||||
end
|
||||
o.settings.packetSize = min .. "-" .. max
|
||||
end
|
||||
udp[#udp+1] = o
|
||||
end
|
||||
if node.hysteria2_realms then
|
||||
|
||||
Reference in new issue
Block a user