From 71a617b7b7fe0b6c354e5e23e1b91f51e7816ec9 Mon Sep 17 00:00:00 2001 From: action Date: Tue, 19 May 2026 18:58:26 +0800 Subject: [PATCH] update 2026-05-19 18:58:26 --- .../luasrc/model/cbi/passwall/client/type/ray.lua | 5 +++++ luci-app-passwall/luasrc/passwall/util_xray.lua | 5 +++++ 2 files changed, 10 insertions(+) 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 e1afc603..169ca8a3 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 @@ -806,6 +806,7 @@ if not load_shunt_options then if not (load_iface_options or load_balancing_options) then -- Special node cannot be use pre-proxy. o:value("1", translate("Preproxy Node")) + o:value("3", translate("Outbound Interface")) end o:value("2", translate("Landing Node")) @@ -814,6 +815,10 @@ if not load_shunt_options then o1.template = appname .. "/cbi/nodes_listvalue" o1.group = {} + o3 = s:option(Value, _n("outbound_iface"), translate("Outbound Interface")) + o3.default = "eth1" + o3:depends({ [_n("chain_proxy")] = "3" }) + o2 = s:option(ListValue, _n("to_node"), translate("Landing Node"), translate("Only support a layer of proxy.")) o2:depends({ [_n("chain_proxy")] = "2" }) o2.template = appname .. "/cbi/nodes_listvalue" diff --git a/luci-app-passwall/luasrc/passwall/util_xray.lua b/luci-app-passwall/luasrc/passwall/util_xray.lua index 7e04f06c..edbe252c 100644 --- a/luci-app-passwall/luasrc/passwall/util_xray.lua +++ b/luci-app-passwall/luasrc/passwall/util_xray.lua @@ -1206,6 +1206,11 @@ function gen_config(var) end end end + if node.chain_proxy == "3" and node.outbound_iface then + if outbound.streamSettings and outbound.streamSettings.sockopt then + outbound.streamSettings.sockopt.interface = node.outbound_iface + end + end return default_outTag, last_insert_outbound end