From 4697d008346a64c600c01ab3cba9ca162f58fd88 Mon Sep 17 00:00:00 2001 From: action Date: Wed, 20 May 2026 15:39:36 +0800 Subject: [PATCH] update 2026-05-20 15:39:36 --- luci-app-passwall/Makefile | 2 +- .../luasrc/model/cbi/passwall/client/type/ray.lua | 8 +++++--- .../luasrc/model/cbi/passwall/client/type/sing-box.lua | 8 +++++--- .../luasrc/model/cbi/passwall/server/type/ray.lua | 5 ++++- .../luasrc/model/cbi/passwall/server/type/sing-box.lua | 5 ++++- 5 files changed, 19 insertions(+), 9 deletions(-) diff --git a/luci-app-passwall/Makefile b/luci-app-passwall/Makefile index 35d2a9e3..96938fab 100644 --- a/luci-app-passwall/Makefile +++ b/luci-app-passwall/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-passwall -PKG_VERSION:=26.5.11 +PKG_VERSION:=26.5.20 PKG_RELEASE:=1 PKG_PO_VERSION:=$(PKG_VERSION) diff --git a/luci-app-passwall/luasrc/model/cbi/passwall/client/type/ray.lua b/luci-app-passwall/luasrc/model/cbi/passwall/client/type/ray.lua index 363866c1..4730c274 100644 --- a/luci-app-passwall/luasrc/model/cbi/passwall/client/type/ray.lua +++ b/luci-app-passwall/luasrc/model/cbi/passwall/client/type/ray.lua @@ -78,6 +78,7 @@ if not arg_select_proto:find("_") then load_normal_options = true end +local netdev_list = api.get_network_devices() local node_list = api.get_node_list() local fallback_list = {} local is_balancer = nil @@ -273,8 +274,10 @@ end -- [[ 负载均衡 End ]] if load_iface_options then -- [[ 自定义接口 Start ]] o = s:option(Value, _n("iface"), translate("Interface")) - o.default = "eth1" o:depends({ [_n("protocol")] = "_iface" }) + for _, d in ipairs(netdev_list) do + o:value(d.name, d.label) + end end -- [[ 自定义接口 End ]] @@ -818,8 +821,7 @@ if not load_shunt_options then o3 = s:option(Value, _n("outbound_iface"), translate("Outbound Interface")) o3:depends({ [_n("chain_proxy")] = "3" }) o3:value("", translate("All")) - local iface = api.get_network_devices() - for _, d in ipairs(iface) do + for _, d in ipairs(netdev_list) do o3:value(d.name, d.label) end diff --git a/luci-app-passwall/luasrc/model/cbi/passwall/client/type/sing-box.lua b/luci-app-passwall/luasrc/model/cbi/passwall/client/type/sing-box.lua index ada8094f..c232b3c4 100644 --- a/luci-app-passwall/luasrc/model/cbi/passwall/client/type/sing-box.lua +++ b/luci-app-passwall/luasrc/model/cbi/passwall/client/type/sing-box.lua @@ -91,6 +91,7 @@ if not arg_select_proto:find("_") then load_normal_options = true end +local netdev_list = api.get_network_devices() local node_list = api.get_node_list() if load_urltest_options then -- [[ URLTest Start ]] @@ -196,8 +197,10 @@ end -- [[ URLTest End ]] if load_iface_options then -- [[ 自定义接口 Start ]] o = s:option(Value, _n("iface"), translate("Interface")) - o.default = "eth1" o:depends({ [_n("protocol")] = "_iface" }) + for _, d in ipairs(netdev_list) do + o:value(d.name, d.label) + end end @@ -836,8 +839,7 @@ if not load_shunt_options then o3 = s:option(Value, _n("outbound_iface"), translate("Outbound Interface")) o3:depends({ [_n("chain_proxy")] = "3" }) o3:value("", translate("All")) - local iface = api.get_network_devices() - for _, d in ipairs(iface) do + for _, d in ipairs(netdev_list) do o3:value(d.name, d.label) end diff --git a/luci-app-passwall/luasrc/model/cbi/passwall/server/type/ray.lua b/luci-app-passwall/luasrc/model/cbi/passwall/server/type/ray.lua index ec45fac0..f2545104 100644 --- a/luci-app-passwall/luasrc/model/cbi/passwall/server/type/ray.lua +++ b/luci-app-passwall/luasrc/model/cbi/passwall/server/type/ray.lua @@ -483,8 +483,11 @@ o:depends({ [_n("outbound_node")] = "_socks"}) o:depends({ [_n("outbound_node")] = "_http"}) o = s:option(Value, _n("outbound_node_iface"), translate("Interface")) -o.default = "eth1" o:depends({ [_n("outbound_node")] = "_iface"}) +local netdev_list = api.get_network_devices() +for _, d in ipairs(netdev_list) do + o:value(d.name, d.label) +end o = s:option(TextValue, _n("custom_config"), translate("Custom Config")) o.rows = 10 diff --git a/luci-app-passwall/luasrc/model/cbi/passwall/server/type/sing-box.lua b/luci-app-passwall/luasrc/model/cbi/passwall/server/type/sing-box.lua index 5fafd25b..ce5766fc 100644 --- a/luci-app-passwall/luasrc/model/cbi/passwall/server/type/sing-box.lua +++ b/luci-app-passwall/luasrc/model/cbi/passwall/server/type/sing-box.lua @@ -461,8 +461,11 @@ o:depends({ [_n("outbound_node")] = "_socks" }) o:depends({ [_n("outbound_node")] = "_http" }) o = s:option(Value, _n("outbound_node_iface"), translate("Interface")) -o.default = "eth1" o:depends({ [_n("outbound_node")] = "_iface" }) +local netdev_list = api.get_network_devices() +for _, d in ipairs(netdev_list) do + o:value(d.name, d.label) +end o = s:option(TextValue, _n("custom_config"), translate("Custom Config")) o.rows = 10