mirror of
https://github.com/SunBK201/UA3F.git
synced 2025-12-16 16:57:08 +00:00
feat: add nfqueue existence check and update desync description
This commit is contained in:
parent
96d4917fae
commit
a73869283d
@ -11,6 +11,12 @@ local ListValue = cbi.ListValue
|
||||
local DummyValue = cbi.DummyValue
|
||||
local TextValue = cbi.TextValue
|
||||
|
||||
function nfqueue_exists()
|
||||
local opkg = sys.call("opkg list-installed kmod-nft-queue | grep -q kmod-nft-queue") == 0
|
||||
local apk = sys.call("apk info | grep -q kmod-nft-queue") == 0
|
||||
return opkg or apk
|
||||
end
|
||||
|
||||
-- Status Section Fields
|
||||
function M.add_status_fields(section)
|
||||
-- Enabled Flag
|
||||
@ -207,6 +213,10 @@ function M.add_desync_fields(section)
|
||||
-- Enable TCP Desync
|
||||
local desync_enabled = section:taboption("desync", Flag, "desync_enabled", translate("Enable TCP Desync"))
|
||||
desync_enabled.description = translate("Enable TCP Desynchronization to evade DPI")
|
||||
if not nfqueue_exists() then
|
||||
desync_enabled.description = translate(
|
||||
"Enable TCP Desynchronization to evade DPI. <strong style='color:red;'><%:Recommend install kmod-nft-queue package%></strong>")
|
||||
end
|
||||
|
||||
-- CT Byte Setting
|
||||
local ct_byte = section:taboption("desync", Value, "desync_ct_bytes", translate("Desync Bytes"))
|
||||
|
||||
@ -294,4 +294,7 @@ msgid "Number of packets for fragmented random emission"
|
||||
msgstr "乱序发射的数据包数,谨慎设置过大"
|
||||
|
||||
msgid "Enable TCP Desynchronization to evade DPI"
|
||||
msgstr "启用 TCP 分片乱序发射,可以用于规避 DPI 检测"
|
||||
msgstr "启用 TCP 分片乱序发射,可以用于规避 DPI 检测"
|
||||
|
||||
msgid "Enable TCP Desynchronization to evade DPI. <strong style='color:red;'><%:Recommend install kmod-nft-queue package%></strong>"
|
||||
msgstr "启用 TCP 分片乱序发射,可以用于规避 DPI 检测。<strong style='color:red;'>建议安装 kmod-nft-queue 软件包以增强兼容性</strong>"
|
||||
Loading…
Reference in New Issue
Block a user