From bc711b591d1ccf0fa7271dfd5663489cac49fac6 Mon Sep 17 00:00:00 2001 From: zxlhhyccc <45259624+zxlhhyccc@users.noreply.github.com> Date: Fri, 5 Apr 2024 22:45:12 +0800 Subject: [PATCH] luci-app-ssr-plus: Add WireGuard `kernelMode` `reserved` `keepalive` ` allowedips` argument MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit whether to use the virtual NIC TUN of the Linux kernel!Virtual NIC TUN of Linux kernel can be used only when system supports and have root permission. Some routes cannot be connected if they are used. --- .../model/cbi/shadowsocksr/client-config.lua | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua b/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua index d2b87a7fa..3831ce642 100644 --- a/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua +++ b/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua @@ -831,11 +831,22 @@ o:depends("transport", "kcp") o.rmempty = true -- [[ WireGuard 部分 ]]-- +o = s:option(Flag, "kernelmode", translate("Enabled Kernel virtual NIC TUN(optional)")) +o.description = translate("Virtual NIC TUN of Linux kernel can be used only when system supports and have root permission. If used, IPv6 routing table 1023 is occupied.") +o:depends({type = "v2ray", v2ray_protocol = "wireguard"}) +o.default = "0" +o.rmempty = true + o = s:option(DynamicList, "local_addresses", translate("Local addresses")) o.datatype = "cidr" o:depends({type = "v2ray", v2ray_protocol = "wireguard"}) o.rmempty = true +o = s:option(DynamicList, "reserved", translate("Reserved bytes(optional)")) +o.description = translate("Wireguard reserved bytes.") +o:depends({type = "v2ray", v2ray_protocol = "wireguard"}) +o.rmempty = true + o = s:option(Value, "private_key", translate("Private key")) o:depends({type = "v2ray", v2ray_protocol = "wireguard"}) o.password = true @@ -850,6 +861,19 @@ o:depends({type = "v2ray", v2ray_protocol = "wireguard"}) o.password = true o.rmempty = true +o = s:option(Value, "keepalive", translate("Heartbeat interval(second)")) +o.description = translate("Default value 0 indicatesno heartbeat.") +o:depends({type = "v2ray", v2ray_protocol = "wireguard"}) +o.default = "0" +o.rmempty = true + +o = s:option(DynamicList, "allowedips", translate("allowedIPs(optional)")) +o.description = translate("Wireguard allows only traffic from specific source IP.") +o.datatype = "cidr" +o:depends({type = "v2ray", v2ray_protocol = "wireguard"}) +o.default = "0.0.0.0/0" +o.rmempty = true + -- [[ TLS ]]-- o = s:option(Flag, "tls", translate("TLS")) o.rmempty = true