mirror of
https://github.com/caiwx86/small-packages.git
synced 2026-10-31 02:45:13 +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
@@ -76,6 +76,20 @@ o.rewrite_option = o.option
|
|||||||
o:depends({ [_n("obfs_type")] = "salamander" })
|
o:depends({ [_n("obfs_type")] = "salamander" })
|
||||||
o:depends({ [_n("obfs_type")] = "gecko" })
|
o:depends({ [_n("obfs_type")] = "gecko" })
|
||||||
|
|
||||||
|
o = s:option(Value, _n("obfs_MinPacketSize"), translate("Gecko Packet Size (min)"))
|
||||||
|
o.datatype = "uinteger"
|
||||||
|
o.placeholder = "512"
|
||||||
|
o.default = "512"
|
||||||
|
o:depends({ [_n("obfs_type")] = "gecko" })
|
||||||
|
o.rewrite_option = o.option
|
||||||
|
|
||||||
|
o = s:option(Value, _n("obfs_MaxPacketSize"), translate("Gecko Packet Size (max)"))
|
||||||
|
o.datatype = "uinteger"
|
||||||
|
o.placeholder = "1200"
|
||||||
|
o.default = "1200"
|
||||||
|
o:depends({ [_n("obfs_type")] = "gecko" })
|
||||||
|
o.rewrite_option = o.option
|
||||||
|
|
||||||
o = s:option(Flag, _n("fast_open"), translate("Fast Open"))
|
o = s:option(Flag, _n("fast_open"), translate("Fast Open"))
|
||||||
o.default = "0"
|
o.default = "0"
|
||||||
|
|
||||||
|
|||||||
@@ -376,6 +376,18 @@ o = s:option(Value, _n("hysteria2_obfs_password"), translate("Obfs Password"))
|
|||||||
o:depends({ [_n("hysteria2_obfs_type")] = "salamander" })
|
o:depends({ [_n("hysteria2_obfs_type")] = "salamander" })
|
||||||
o:depends({ [_n("hysteria2_obfs_type")] = "gecko" })
|
o:depends({ [_n("hysteria2_obfs_type")] = "gecko" })
|
||||||
|
|
||||||
|
o = s:option(Value, _n("hysteria2_obfs_MinPacketSize"), translate("Gecko Packet Size (min)"))
|
||||||
|
o.datatype = "uinteger"
|
||||||
|
o.placeholder = "512"
|
||||||
|
o.default = "512"
|
||||||
|
o:depends({ [_n("hysteria2_obfs_type")] = "gecko" })
|
||||||
|
|
||||||
|
o = s:option(Value, _n("hysteria2_obfs_MaxPacketSize"), translate("Gecko Packet Size (max)"))
|
||||||
|
o.datatype = "uinteger"
|
||||||
|
o.placeholder = "1200"
|
||||||
|
o.default = "1200"
|
||||||
|
o:depends({ [_n("hysteria2_obfs_type")] = "gecko" })
|
||||||
|
|
||||||
o = s:option(Value, _n("hysteria2_up_mbps"), translate("Max upload Mbps"))
|
o = s:option(Value, _n("hysteria2_up_mbps"), translate("Max upload Mbps"))
|
||||||
o:depends({ [_n("protocol")] = "hysteria2" })
|
o:depends({ [_n("protocol")] = "hysteria2" })
|
||||||
|
|
||||||
|
|||||||
@@ -400,6 +400,18 @@ if singbox_tags:find("with_quic") then
|
|||||||
o:depends({ [_n("hysteria2_obfs_type")] = "salamander" })
|
o:depends({ [_n("hysteria2_obfs_type")] = "salamander" })
|
||||||
o:depends({ [_n("hysteria2_obfs_type")] = "gecko" })
|
o:depends({ [_n("hysteria2_obfs_type")] = "gecko" })
|
||||||
|
|
||||||
|
o = s:option(Value, _n("hysteria2_obfs_MinPacketSize"), translate("Gecko Packet Size (min)"))
|
||||||
|
o.datatype = "uinteger"
|
||||||
|
o.placeholder = "512"
|
||||||
|
o.default = "512"
|
||||||
|
o:depends({ [_n("hysteria2_obfs_type")] = "gecko" })
|
||||||
|
|
||||||
|
o = s:option(Value, _n("hysteria2_obfs_MaxPacketSize"), translate("Gecko Packet Size (max)"))
|
||||||
|
o.datatype = "uinteger"
|
||||||
|
o.placeholder = "1200"
|
||||||
|
o.default = "1200"
|
||||||
|
o:depends({ [_n("hysteria2_obfs_type")] = "gecko" })
|
||||||
|
|
||||||
o = s:option(Value, _n("hysteria2_up_mbps"), translate("Max upload Mbps"))
|
o = s:option(Value, _n("hysteria2_up_mbps"), translate("Max upload Mbps"))
|
||||||
o:depends({ [_n("protocol")] = "hysteria2" })
|
o:depends({ [_n("protocol")] = "hysteria2" })
|
||||||
|
|
||||||
|
|||||||
@@ -65,6 +65,20 @@ o.rewrite_option = o.option
|
|||||||
o:depends({ [_n("obfs_type")] = "salamander" })
|
o:depends({ [_n("obfs_type")] = "salamander" })
|
||||||
o:depends({ [_n("obfs_type")] = "gecko" })
|
o:depends({ [_n("obfs_type")] = "gecko" })
|
||||||
|
|
||||||
|
o = s:option(Value, _n("obfs_MinPacketSize"), translate("Gecko Packet Size (min)"))
|
||||||
|
o.datatype = "uinteger"
|
||||||
|
o.placeholder = "512"
|
||||||
|
o.default = "512"
|
||||||
|
o:depends({ [_n("obfs_type")] = "gecko" })
|
||||||
|
o.rewrite_option = o.option
|
||||||
|
|
||||||
|
o = s:option(Value, _n("obfs_MaxPacketSize"), translate("Gecko Packet Size (max)"))
|
||||||
|
o.datatype = "uinteger"
|
||||||
|
o.placeholder = "1200"
|
||||||
|
o.default = "1200"
|
||||||
|
o:depends({ [_n("obfs_type")] = "gecko" })
|
||||||
|
o.rewrite_option = o.option
|
||||||
|
|
||||||
o = s:option(Flag, _n("udp"), translate("UDP"))
|
o = s:option(Flag, _n("udp"), translate("UDP"))
|
||||||
o.default = "1"
|
o.default = "1"
|
||||||
o.rewrite_option = o.option
|
o.rewrite_option = o.option
|
||||||
|
|||||||
@@ -155,6 +155,18 @@ o = s:option(Value, _n("hysteria2_obfs_password"), translate("Obfs Password"))
|
|||||||
o:depends({ [_n("hysteria2_obfs_type")] = "salamander" })
|
o:depends({ [_n("hysteria2_obfs_type")] = "salamander" })
|
||||||
o:depends({ [_n("hysteria2_obfs_type")] = "gecko" })
|
o:depends({ [_n("hysteria2_obfs_type")] = "gecko" })
|
||||||
|
|
||||||
|
o = s:option(Value, _n("hysteria2_obfs_MinPacketSize"), translate("Gecko Packet Size (min)"))
|
||||||
|
o.datatype = "uinteger"
|
||||||
|
o.placeholder = "512"
|
||||||
|
o.default = "512"
|
||||||
|
o:depends({ [_n("hysteria2_obfs_type")] = "gecko" })
|
||||||
|
|
||||||
|
o = s:option(Value, _n("hysteria2_obfs_MaxPacketSize"), translate("Gecko Packet Size (max)"))
|
||||||
|
o.datatype = "uinteger"
|
||||||
|
o.placeholder = "1200"
|
||||||
|
o.default = "1200"
|
||||||
|
o:depends({ [_n("hysteria2_obfs_type")] = "gecko" })
|
||||||
|
|
||||||
o = s:option(Flag, _n("hysteria2_ignore_client_bandwidth"), translate("Client BBR Flow Control"))
|
o = s:option(Flag, _n("hysteria2_ignore_client_bandwidth"), translate("Client BBR Flow Control"))
|
||||||
o.default = 0
|
o.default = 0
|
||||||
o:depends({ [_n("protocol")] = "hysteria2" })
|
o:depends({ [_n("protocol")] = "hysteria2" })
|
||||||
|
|||||||
@@ -188,6 +188,18 @@ if singbox_tags:find("with_quic") then
|
|||||||
o:depends({ [_n("hysteria2_obfs_type")] = "salamander" })
|
o:depends({ [_n("hysteria2_obfs_type")] = "salamander" })
|
||||||
o:depends({ [_n("hysteria2_obfs_type")] = "gecko" })
|
o:depends({ [_n("hysteria2_obfs_type")] = "gecko" })
|
||||||
|
|
||||||
|
o = s:option(Value, _n("hysteria2_obfs_MinPacketSize"), translate("Gecko Packet Size (min)"))
|
||||||
|
o.datatype = "uinteger"
|
||||||
|
o.placeholder = "512"
|
||||||
|
o.default = "512"
|
||||||
|
o:depends({ [_n("hysteria2_obfs_type")] = "gecko" })
|
||||||
|
|
||||||
|
o = s:option(Value, _n("hysteria2_obfs_MaxPacketSize"), translate("Gecko Packet Size (max)"))
|
||||||
|
o.datatype = "uinteger"
|
||||||
|
o.placeholder = "1200"
|
||||||
|
o.default = "1200"
|
||||||
|
o:depends({ [_n("hysteria2_obfs_type")] = "gecko" })
|
||||||
|
|
||||||
o = s:option(Flag, _n("hysteria2_ignore_client_bandwidth"), translate("Client BBR Flow Control"), translate("Commands the client to use the BBR flow control algorithm"))
|
o = s:option(Flag, _n("hysteria2_ignore_client_bandwidth"), translate("Client BBR Flow Control"), translate("Commands the client to use the BBR flow control algorithm"))
|
||||||
o.default = 0
|
o.default = 0
|
||||||
o:depends({ [_n("protocol")] = "hysteria2" })
|
o:depends({ [_n("protocol")] = "hysteria2" })
|
||||||
|
|||||||
@@ -39,6 +39,18 @@ function gen_config_server(node)
|
|||||||
stunServers = node.hysteria2_realm_stun
|
stunServers = node.hysteria2_realm_stun
|
||||||
} or nil
|
} or nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if config.obfs and config.obfs.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
|
||||||
|
config.obfs.gecko.minPacketSize = min
|
||||||
|
config.obfs.gecko.maxPacketSize = max
|
||||||
|
end
|
||||||
|
|
||||||
return config
|
return config
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -157,6 +169,17 @@ function gen_config(var)
|
|||||||
} or nil
|
} or nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if config.obfs and config.obfs.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
|
||||||
|
config.obfs.gecko.minPacketSize = min
|
||||||
|
config.obfs.gecko.maxPacketSize = max
|
||||||
|
end
|
||||||
|
|
||||||
return jsonc.stringify(config, 1)
|
return jsonc.stringify(config, 1)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -561,10 +561,24 @@ function gen_outbound(flag, node, tag, proxy_table)
|
|||||||
hop_interval_max = interval_max,
|
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,
|
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,
|
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 {
|
obfs = (function(t)
|
||||||
type = node.hysteria2_obfs_type,
|
if not t or t == "" then return nil end
|
||||||
password = node.hysteria2_obfs_password
|
local o = {
|
||||||
} or nil,
|
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,
|
password = node.hysteria2_auth_password or nil,
|
||||||
idle_timeout = (function(t)
|
idle_timeout = (function(t)
|
||||||
if not version_ge_1_14_0 then return nil end
|
if not version_ge_1_14_0 then return nil end
|
||||||
@@ -917,10 +931,24 @@ function gen_config_server(node)
|
|||||||
protocol_table = {
|
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,
|
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,
|
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 {
|
obfs = (function(t)
|
||||||
type = node.hysteria2_obfs_type,
|
if not t or t == "" then return nil end
|
||||||
password = node.hysteria2_obfs_password
|
local o = {
|
||||||
} or nil,
|
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 = {
|
users = {
|
||||||
{
|
{
|
||||||
name = "user1",
|
name = "user1",
|
||||||
|
|||||||
@@ -284,10 +284,18 @@ function gen_outbound(flag, node, tag, proxy_table)
|
|||||||
local o = {
|
local o = {
|
||||||
type = "salamander",
|
type = "salamander",
|
||||||
settings = node.hysteria2_obfs_password and {
|
settings = node.hysteria2_obfs_password and {
|
||||||
password = node.hysteria2_obfs_password,
|
password = node.hysteria2_obfs_password
|
||||||
packetSize = node.hysteria2_obfs_type == "gecko" and "512-1200" or nil
|
|
||||||
} or nil
|
} 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
|
udp[#udp+1] = o
|
||||||
end
|
end
|
||||||
if node.hysteria2_realms then
|
if node.hysteria2_realms then
|
||||||
@@ -724,10 +732,18 @@ function gen_config_server(node)
|
|||||||
local o = {
|
local o = {
|
||||||
type = "salamander",
|
type = "salamander",
|
||||||
settings = node.hysteria2_obfs_password and {
|
settings = node.hysteria2_obfs_password and {
|
||||||
password = node.hysteria2_obfs_password,
|
password = node.hysteria2_obfs_password
|
||||||
packetSize = node.hysteria2_obfs_type == "gecko" and "512-1200" or nil
|
|
||||||
} or nil
|
} 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
|
udp[#udp+1] = o
|
||||||
end
|
end
|
||||||
if node.hysteria2_realms then
|
if node.hysteria2_realms then
|
||||||
|
|||||||
@@ -598,10 +598,14 @@ local current_node = map:get(section)
|
|||||||
|
|
||||||
if (v_type === "Hysteria2") {
|
if (v_type === "Hysteria2") {
|
||||||
v_password = opt.get("hysteria2_auth_password");
|
v_password = opt.get("hysteria2_auth_password");
|
||||||
var dom_obfs = opt.get("hysteria2_obfs_password");
|
var dom_obfs_type = opt.get("hysteria2_obfs_type");
|
||||||
if (dom_obfs && dom_obfs.value != "") {
|
if (dom_obfs_type && dom_obfs_type.value != "") {
|
||||||
params += opt.query("obfs", "hysteria2_obfs_type");
|
params += opt.query("obfs", "hysteria2_obfs_type");
|
||||||
params += opt.query("obfs-password", "hysteria2_obfs_password");
|
params += opt.query("obfs-password", "hysteria2_obfs_password");
|
||||||
|
if (dom_obfs_type.value === "gecko") {
|
||||||
|
params += opt.query("minPacketSize", "hysteria2_obfs_MinPacketSize");
|
||||||
|
params += opt.query("maxPacketSize", "hysteria2_obfs_MaxPacketSize");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
params += opt.query("mport", "hysteria2_hop");
|
params += opt.query("mport", "hysteria2_hop");
|
||||||
} else {
|
} else {
|
||||||
@@ -610,6 +614,10 @@ local current_node = map:get(section)
|
|||||||
if (dom_obfs_type && dom_obfs_type.value != "") {
|
if (dom_obfs_type && dom_obfs_type.value != "") {
|
||||||
params += opt.query("obfs", dom_prefix + "hysteria2_obfs_type");
|
params += opt.query("obfs", dom_prefix + "hysteria2_obfs_type");
|
||||||
params += opt.query("obfs-password", dom_prefix + "hysteria2_obfs_password");
|
params += opt.query("obfs-password", dom_prefix + "hysteria2_obfs_password");
|
||||||
|
if (dom_obfs_type.value === "gecko") {
|
||||||
|
params += opt.query("minPacketSize", dom_prefix + "hysteria2_obfs_MinPacketSize");
|
||||||
|
params += opt.query("maxPacketSize", dom_prefix + "hysteria2_obfs_MaxPacketSize");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
params += opt.query("mport", dom_prefix + "hysteria2_hop");
|
params += opt.query("mport", dom_prefix + "hysteria2_hop");
|
||||||
if (opt.get(dom_prefix + "use_finalmask")?.checked) {
|
if (opt.get(dom_prefix + "use_finalmask")?.checked) {
|
||||||
@@ -1600,6 +1608,10 @@ local current_node = map:get(section)
|
|||||||
opt.set(dom_prefix + 'hysteria2_obfs_type', queryParam.obfs || "salamander");
|
opt.set(dom_prefix + 'hysteria2_obfs_type', queryParam.obfs || "salamander");
|
||||||
opt.set(dom_prefix + 'hysteria2_obfs_password', queryParam["obfs-password"] || queryParam["obfs_password"]);
|
opt.set(dom_prefix + 'hysteria2_obfs_password', queryParam["obfs-password"] || queryParam["obfs_password"]);
|
||||||
}
|
}
|
||||||
|
if (queryParam.obfs === "gecko") {
|
||||||
|
opt.set(dom_prefix + 'hysteria2_obfs_MinPacketSize', queryParam.minPacketSize || "512");
|
||||||
|
opt.set(dom_prefix + 'hysteria2_obfs_MaxPacketSize', queryParam.maxPacketSize || "1200");
|
||||||
|
}
|
||||||
opt.set(dom_prefix + 'hysteria2_hop', queryParam.mport || "");
|
opt.set(dom_prefix + 'hysteria2_hop', queryParam.mport || "");
|
||||||
opt.set(dom_prefix + 'use_finalmask', !!queryParam.fm);
|
opt.set(dom_prefix + 'use_finalmask', !!queryParam.fm);
|
||||||
opt.set(dom_prefix + 'finalmask', queryParam.fm || "");
|
opt.set(dom_prefix + 'finalmask', queryParam.fm || "");
|
||||||
@@ -1611,6 +1623,10 @@ local current_node = map:get(section)
|
|||||||
opt.set(dom_prefix + 'obfs_type', queryParam.obfs || "salamander");
|
opt.set(dom_prefix + 'obfs_type', queryParam.obfs || "salamander");
|
||||||
opt.set(dom_prefix + 'obfs_password', queryParam["obfs-password"] || queryParam["obfs_password"]);
|
opt.set(dom_prefix + 'obfs_password', queryParam["obfs-password"] || queryParam["obfs_password"]);
|
||||||
}
|
}
|
||||||
|
if (queryParam.obfs === "gecko") {
|
||||||
|
opt.set(dom_prefix + 'obfs_MinPacketSize', queryParam.minPacketSize || "512");
|
||||||
|
opt.set(dom_prefix + 'obfs_MaxPacketSize', queryParam.maxPacketSize || "1200");
|
||||||
|
}
|
||||||
opt.set(dom_prefix + 'hop', queryParam.mport || "");
|
opt.set(dom_prefix + 'hop', queryParam.mport || "");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -698,10 +698,10 @@ msgid "Certificate fingerprint"
|
|||||||
msgstr "证书指纹"
|
msgstr "证书指纹"
|
||||||
|
|
||||||
msgid "Max upload Mbps"
|
msgid "Max upload Mbps"
|
||||||
msgstr "最大上行(Mbps)"
|
msgstr "最大上行(Mbps)"
|
||||||
|
|
||||||
msgid "Max download Mbps"
|
msgid "Max download Mbps"
|
||||||
msgstr "最大下行(Mbps)"
|
msgstr "最大下行(Mbps)"
|
||||||
|
|
||||||
msgid "QUIC stream receive window"
|
msgid "QUIC stream receive window"
|
||||||
msgstr "QUIC 流接收窗口"
|
msgstr "QUIC 流接收窗口"
|
||||||
@@ -2128,3 +2128,9 @@ msgstr "正在处理,请稍候…"
|
|||||||
|
|
||||||
msgid "Invalid Realm URL."
|
msgid "Invalid Realm URL."
|
||||||
msgstr "Realm URL 不正确。"
|
msgstr "Realm URL 不正确。"
|
||||||
|
|
||||||
|
msgid "Gecko Packet Size (min)"
|
||||||
|
msgstr "Gecko 包大小(最小)"
|
||||||
|
|
||||||
|
msgid "Gecko Packet Size (max)"
|
||||||
|
msgstr "Gecko 包大小(最大)"
|
||||||
@@ -398,6 +398,8 @@ local function encode_hysteria2(node)
|
|||||||
if node["ports"] then table.insert(p, "mport=" .. urlencode(node["ports"])) end
|
if node["ports"] then table.insert(p, "mport=" .. urlencode(node["ports"])) end
|
||||||
if node.obfs then table.insert(p, "obfs=" .. node.obfs) end
|
if node.obfs then table.insert(p, "obfs=" .. node.obfs) end
|
||||||
if node["obfs-password"] then table.insert(p, "obfs-password=" .. node["obfs-password"]) end
|
if node["obfs-password"] then table.insert(p, "obfs-password=" .. node["obfs-password"]) end
|
||||||
|
if node["obfs-min-packet-size"] then table.insert(p, "minPacketSize=" .. node["obfs-min-packet-size"]) end
|
||||||
|
if node["obfs-max-packet-size"] then table.insert(p, "maxPacketSize=" .. node["obfs-max-packet-size"]) end
|
||||||
if node.up then table.insert(p, "upmbps=" .. node.up) end
|
if node.up then table.insert(p, "upmbps=" .. node.up) end
|
||||||
if node.down then table.insert(p, "downmbps=" .. node.down) end
|
if node.down then table.insert(p, "downmbps=" .. node.down) end
|
||||||
|
|
||||||
|
|||||||
@@ -1419,6 +1419,10 @@ local function processData(szType, content, add_mode, group, sub_cfg)
|
|||||||
result.hysteria2_obfs_type = params.obfs or "salamander"
|
result.hysteria2_obfs_type = params.obfs or "salamander"
|
||||||
result.hysteria2_obfs_password = params["obfs-password"] or params["obfs_password"]
|
result.hysteria2_obfs_password = params["obfs-password"] or params["obfs_password"]
|
||||||
end
|
end
|
||||||
|
if params.obfs == "gecko" then
|
||||||
|
result.hysteria2_obfs_MinPacketSize = params.minpacketsize or "512"
|
||||||
|
result.hysteria2_obfs_MaxPacketSize = params.maxpacketsize or "1200"
|
||||||
|
end
|
||||||
|
|
||||||
if (sub_hysteria2_type == "sing-box" and has_singbox) or (sub_hysteria2_type == "xray" and has_xray) then
|
if (sub_hysteria2_type == "sing-box" and has_singbox) or (sub_hysteria2_type == "xray" and has_xray) then
|
||||||
local is_singbox = sub_hysteria2_type == "sing-box" and has_singbox
|
local is_singbox = sub_hysteria2_type == "sing-box" and has_singbox
|
||||||
|
|||||||
+2
-2
@@ -6,12 +6,12 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=redsocks2
|
PKG_NAME:=redsocks2
|
||||||
PKG_VERSION:=0.73
|
PKG_VERSION:=0.73.1
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_SOURCE:=redsocks-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=redsocks-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=https://codeload.github.com/kenzok8/redsocks/tar.gz/release-$(PKG_VERSION)?
|
PKG_SOURCE_URL:=https://codeload.github.com/kenzok8/redsocks/tar.gz/release-$(PKG_VERSION)?
|
||||||
PKG_HASH:=0c9a50b6039cd9fe078a3da5fb5317e38fe52ec59fba7fa9abdf3b002471ebfd
|
PKG_HASH:=b8049f747f5b77dacc93d322bf870f458d37423361aeb6a078c0c8dcbc75c05d
|
||||||
PKG_BUILD_DIR:=$(BUILD_DIR)/redsocks-release-$(PKG_VERSION)
|
PKG_BUILD_DIR:=$(BUILD_DIR)/redsocks-release-$(PKG_VERSION)
|
||||||
|
|
||||||
PKG_MAINTAINER:=semigodking <semigodking@gmail.com>
|
PKG_MAINTAINER:=semigodking <semigodking@gmail.com>
|
||||||
|
|||||||
Reference in new issue
Block a user