luci-app-passwall2: sync upstream

last commit: 6ba43389f6
This commit is contained in:
actions 2024-04-28 17:00:07 +08:00
parent 6f7a9722e4
commit 58326c8770
4 changed files with 17 additions and 2 deletions

View File

@ -477,6 +477,13 @@ if singbox_tags:find("with_wireguard") then
o.default = "1420" o.default = "1420"
o:depends({ [option_name("protocol")] = "wireguard" }) o:depends({ [option_name("protocol")] = "wireguard" })
o = s:option(Flag, option_name("wireguard_system_interface"), translate("System interface"))
o.default = 0
o:depends({ [option_name("protocol")] = "wireguard" })
o = s:option(Value, option_name("wireguard_interface_name"), translate("System interface name"))
o:depends({ [option_name("protocol")] = "wireguard" })
o = s:option(Value, option_name("wireguard_reserved"), translate("Reserved"), translate("Decimal numbers separated by \",\" or Base64-encoded strings.")) o = s:option(Value, option_name("wireguard_reserved"), translate("Reserved"), translate("Decimal numbers separated by \",\" or Base64-encoded strings."))
o:depends({ [option_name("protocol")] = "wireguard" }) o:depends({ [option_name("protocol")] = "wireguard" })
end end

View File

@ -277,8 +277,8 @@ function gen_outbound(flag, node, tag, proxy_table)
node.wireguard_reserved = #bytes > 0 and bytes or nil node.wireguard_reserved = #bytes > 0 and bytes or nil
end end
protocol_table = { protocol_table = {
system_interface = nil, system_interface = (node.wireguard_system_interface == "1") and true or false,
interface_name = nil, interface_name = node.wireguard_interface_name,
local_address = node.wireguard_local_address, local_address = node.wireguard_local_address,
private_key = node.wireguard_secret_key, private_key = node.wireguard_secret_key,
peer_public_key = node.wireguard_public_key, peer_public_key = node.wireguard_public_key,

View File

@ -1084,6 +1084,12 @@ msgstr "额外的对称加密密钥"
msgid "Local Address" msgid "Local Address"
msgstr "本地地址" msgstr "本地地址"
msgid "System interface"
msgstr "系统接口"
msgid "System interface name"
msgstr "系统接口名称"
msgid "Decimal numbers separated by \",\" or Base64-encoded strings." msgid "Decimal numbers separated by \",\" or Base64-encoded strings."
msgstr "用“,”隔开的十进制数字或 Base64 编码字符串。" msgstr "用“,”隔开的十进制数字或 Base64 编码字符串。"

View File

@ -710,10 +710,12 @@ add_firewall_rule() {
nft "flush chain inet fw4 PSW2_ICMP_REDIRECT" nft "flush chain inet fw4 PSW2_ICMP_REDIRECT"
nft "add rule inet fw4 PSW2_ICMP_REDIRECT ip daddr @$NFTSET_LANLIST counter return" nft "add rule inet fw4 PSW2_ICMP_REDIRECT ip daddr @$NFTSET_LANLIST counter return"
nft "add rule inet fw4 PSW2_ICMP_REDIRECT ip daddr @$NFTSET_VPSLIST counter return" nft "add rule inet fw4 PSW2_ICMP_REDIRECT ip daddr @$NFTSET_VPSLIST counter return"
[ "${WRITE_IPSET_DIRECT}" = "1" ] && nft "add rule inet fw4 PSW2_ICMP_REDIRECT ip daddr @$nftset_global_whitelist counter return"
[ "$accept_icmpv6" = "1" ] && { [ "$accept_icmpv6" = "1" ] && {
nft "add rule inet fw4 PSW2_ICMP_REDIRECT ip6 daddr @$NFTSET_LANLIST6 counter return" nft "add rule inet fw4 PSW2_ICMP_REDIRECT ip6 daddr @$NFTSET_LANLIST6 counter return"
nft "add rule inet fw4 PSW2_ICMP_REDIRECT ip6 daddr @$NFTSET_VPSLIST6 counter return" nft "add rule inet fw4 PSW2_ICMP_REDIRECT ip6 daddr @$NFTSET_VPSLIST6 counter return"
[ "${WRITE_IPSET_DIRECT}" = "1" ] && nft "add rule inet fw4 PSW2_ICMP_REDIRECT ip6 daddr @$nftset_global_whitelist6 counter return"
} }
nft "add rule inet fw4 dstnat meta l4proto {icmp,icmpv6} counter jump PSW2_ICMP_REDIRECT" nft "add rule inet fw4 dstnat meta l4proto {icmp,icmpv6} counter jump PSW2_ICMP_REDIRECT"