mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-10-29 03:55:13 +08:00
⛄ Sync 2026-05-24 08:42:36
This commit is contained in:
1 parent
ae18d3b149
commit
c1fdaee1e2
4 files changed
+42
-11
No files matched your search
@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-passwall
|
||||
PKG_VERSION:=26.5.20
|
||||
PKG_RELEASE:=134
|
||||
PKG_RELEASE:=135
|
||||
PKG_PO_VERSION:=$(PKG_VERSION)
|
||||
|
||||
PKG_CONFIG_DEPENDS:= \
|
||||
|
||||
@@ -318,15 +318,40 @@ local function encode_ss(node)
|
||||
if node["udp-over-tcp"] then table.insert(p, "uot=1") end
|
||||
|
||||
if node.plugin then
|
||||
local plugin = node.plugin
|
||||
if node["plugin-opts"] then
|
||||
local plugin = (node.plugin == "obfs") and "obfs-local" or node.plugin
|
||||
if plugin == "shadow-tls" then
|
||||
local shadow_tls = base64(json.stringify(node["plugin-opts"] or {}))
|
||||
table.insert(p, "shadow-tls=" .. urlencode(shadow_tls))
|
||||
else
|
||||
local opts = {}
|
||||
for k, v in pairs(node["plugin-opts"]) do
|
||||
table.insert(opts, k .. "=" .. v)
|
||||
for k, v in pairs(node["plugin-opts"] or {}) do
|
||||
if plugin == "obfs-local" then
|
||||
if k == "mode" then k = "obfs" end
|
||||
if k == "host" then k = "obfs-host" end
|
||||
elseif plugin == "v2ray-plugin" then
|
||||
if k == "mode" and v == "websocket" then
|
||||
v = nil
|
||||
elseif type(v) == "boolean" then
|
||||
if v == true then
|
||||
table.insert(opts, k)
|
||||
end
|
||||
v = nil
|
||||
end
|
||||
elseif plugin == "gost-plugin" then
|
||||
if k == "mode" and v == "websocket" then v = "ws" end
|
||||
if k == "host" then k = "serverName" end
|
||||
if k == "headers" then v = nil end
|
||||
end
|
||||
if v ~= nil then
|
||||
if type(v) == "boolean" then
|
||||
v = v and "1" or "0"
|
||||
end
|
||||
table.insert(opts, k .. "=" .. v)
|
||||
end
|
||||
end
|
||||
plugin = plugin .. ";" .. table.concat(opts, ";")
|
||||
if #opts > 0 then plugin = plugin .. ";" .. table.concat(opts, ";") end
|
||||
table.insert(p, "plugin=" .. urlencode(plugin))
|
||||
end
|
||||
table.insert(p, "plugin=" .. urlencode(plugin))
|
||||
end
|
||||
|
||||
if #p > 0 then
|
||||
|
||||
@@ -809,7 +809,7 @@ local function processData(szType, content, add_mode, group, sub_cfg)
|
||||
if result.type == 'Xray' then
|
||||
-- obfs-local插件转换成xray支持的格式
|
||||
if result.plugin ~= "obfs-local" then
|
||||
result.error_msg = "Xray 不支持 " .. result.plugin .. " 插件。"
|
||||
result.error_msg = "Xray 不支持 SS " .. result.plugin .. " 插件。"
|
||||
else
|
||||
local obfs = result.plugin_opts:match("obfs=([^;]+)") or ""
|
||||
local obfs_host = result.plugin_opts:match("obfs%-host=([^;]+)") or ""
|
||||
@@ -829,6 +829,12 @@ local function processData(szType, content, add_mode, group, sub_cfg)
|
||||
result.plugin = nil
|
||||
result.plugin_opts = nil
|
||||
end
|
||||
elseif result.type == 'sing-box' then
|
||||
if result.plugin ~= "obfs-local" and result.plugin ~= "v2ray-plugin" then
|
||||
result.error_msg = "Sing-Box 不支持 SS " .. result.plugin .. " 插件。"
|
||||
else
|
||||
result.plugin_enabled = "1"
|
||||
end
|
||||
else
|
||||
result.plugin_enabled = "1"
|
||||
end
|
||||
@@ -942,7 +948,7 @@ local function processData(szType, content, add_mode, group, sub_cfg)
|
||||
local insecure = params.allowinsecure or params.allowInsecure or params.insecure
|
||||
result.tls_allowInsecure = (insecure == "1" or insecure == "0") and insecure or (sub_allowinsecure and "1" or "0")
|
||||
result.uot = params.udp
|
||||
elseif (params.type ~= "tcp" and params.type ~= "raw") and (params.headerType and params.headerType ~= "none") then
|
||||
else
|
||||
result.error_msg = "请更换 Xray 或 Sing-Box 来支持 SS 更多的传输方式。"
|
||||
end
|
||||
end
|
||||
|
||||
+2
-2
@@ -5,8 +5,8 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=nps
|
||||
PKG_VERSION:=0.26.32
|
||||
PKG_RELEASE:=4
|
||||
PKG_VERSION:=0.26.33
|
||||
PKG_RELEASE:=5
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/yisier/nps/tar.gz/v$(PKG_VERSION)?
|
||||
|
||||
Reference in new issue
Block a user