mirror of
https://github.com/caiwx86/small-packages.git
synced 2026-11-12 10:47:51 +08:00
update 2026-06-26 15:45:01
This commit is contained in:
1 parent
5c9a2142b2
commit
555e431af2
14 files changed
+189
-18
No files matched your search
@@ -561,10 +561,24 @@ function gen_outbound(flag, node, tag, proxy_table)
|
||||
hop_interval_max = interval_max,
|
||||
up_mbps = (node.hysteria2_up_mbps and tonumber(node.hysteria2_up_mbps)) and tonumber(node.hysteria2_up_mbps) or nil,
|
||||
down_mbps = (node.hysteria2_down_mbps and tonumber(node.hysteria2_down_mbps)) and tonumber(node.hysteria2_down_mbps) or nil,
|
||||
obfs = node.hysteria2_obfs_type and {
|
||||
type = node.hysteria2_obfs_type,
|
||||
password = node.hysteria2_obfs_password
|
||||
} or nil,
|
||||
obfs = (function(t)
|
||||
if not t or t == "" then return nil end
|
||||
local o = {
|
||||
type = t,
|
||||
password = node.hysteria2_obfs_password
|
||||
}
|
||||
if t == "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.min_packet_size = min
|
||||
o.max_packet_size = max
|
||||
end
|
||||
return o
|
||||
end)(node.hysteria2_obfs_type),
|
||||
password = node.hysteria2_auth_password or nil,
|
||||
idle_timeout = (function(t)
|
||||
if not version_ge_1_14_0 then return nil end
|
||||
@@ -917,10 +931,24 @@ function gen_config_server(node)
|
||||
protocol_table = {
|
||||
up_mbps = (node.hysteria2_ignore_client_bandwidth ~= "1" and node.hysteria2_up_mbps and tonumber(node.hysteria2_up_mbps)) and tonumber(node.hysteria2_up_mbps) or nil,
|
||||
down_mbps = (node.hysteria2_ignore_client_bandwidth ~= "1" and node.hysteria2_down_mbps and tonumber(node.hysteria2_down_mbps)) and tonumber(node.hysteria2_down_mbps) or nil,
|
||||
obfs = node.hysteria2_obfs_type and {
|
||||
type = node.hysteria2_obfs_type,
|
||||
password = node.hysteria2_obfs_password
|
||||
} or nil,
|
||||
obfs = (function(t)
|
||||
if not t or t == "" then return nil end
|
||||
local o = {
|
||||
type = t,
|
||||
password = node.hysteria2_obfs_password
|
||||
}
|
||||
if t == "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.min_packet_size = min
|
||||
o.max_packet_size = max
|
||||
end
|
||||
return o
|
||||
end)(node.hysteria2_obfs_type),
|
||||
users = {
|
||||
{
|
||||
name = "user1",
|
||||
|
||||
Reference in new issue
Block a user