luci-app-passwall2: sync upstream
This commit is contained in:
parent
c61bcce23d
commit
80b78b4035
@ -5,7 +5,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-passwall2
|
||||
PKG_VERSION:=1.20-11
|
||||
PKG_VERSION:=1.20-12
|
||||
PKG_RELEASE:=
|
||||
|
||||
PKG_CONFIG_DEPENDS:= \
|
||||
|
@ -433,6 +433,7 @@ if singbox_tags:find("with_quic") then
|
||||
end
|
||||
if singbox_tags:find("with_grpc") then
|
||||
o:value("grpc", "gRPC")
|
||||
else o:value("grpc", "gRPC-lite")
|
||||
end
|
||||
o:depends({ [option_name("protocol")] = "vmess" })
|
||||
o:depends({ [option_name("protocol")] = "vless" })
|
||||
@ -499,25 +500,23 @@ o = s:option(Value, option_name("ws_earlyDataHeaderName"), translate("Early data
|
||||
o:depends({ [option_name("ws_enableEarlyData")] = true })
|
||||
|
||||
-- [[ gRPC部分 ]]--
|
||||
if singbox_tags:find("with_grpc") then
|
||||
o = s:option(Value, option_name("grpc_serviceName"), "ServiceName")
|
||||
o:depends({ [option_name("transport")] = "grpc" })
|
||||
o = s:option(Value, option_name("grpc_serviceName"), "ServiceName")
|
||||
o:depends({ [option_name("transport")] = "grpc" })
|
||||
|
||||
o = s:option(Flag, option_name("grpc_health_check"), translate("Health check"))
|
||||
o:depends({ [option_name("transport")] = "grpc" })
|
||||
o = s:option(Flag, option_name("grpc_health_check"), translate("Health check"))
|
||||
o:depends({ [option_name("transport")] = "grpc" })
|
||||
|
||||
o = s:option(Value, option_name("grpc_idle_timeout"), translate("Idle timeout"))
|
||||
o.default = "10"
|
||||
o:depends({ [option_name("grpc_health_check")] = true })
|
||||
o = s:option(Value, option_name("grpc_idle_timeout"), translate("Idle timeout"))
|
||||
o.default = "10"
|
||||
o:depends({ [option_name("grpc_health_check")] = true })
|
||||
|
||||
o = s:option(Value, option_name("grpc_health_check_timeout"), translate("Health check timeout"))
|
||||
o.default = "20"
|
||||
o:depends({ [option_name("grpc_health_check")] = true })
|
||||
o = s:option(Value, option_name("grpc_health_check_timeout"), translate("Health check timeout"))
|
||||
o.default = "20"
|
||||
o:depends({ [option_name("grpc_health_check")] = true })
|
||||
|
||||
o = s:option(Flag, option_name("grpc_permit_without_stream"), translate("Permit without stream"))
|
||||
o.default = "0"
|
||||
o:depends({ [option_name("grpc_health_check")] = true })
|
||||
end
|
||||
o = s:option(Flag, option_name("grpc_permit_without_stream"), translate("Permit without stream"))
|
||||
o.default = "0"
|
||||
o:depends({ [option_name("grpc_health_check")] = true })
|
||||
|
||||
-- [[ Mux ]]--
|
||||
o = s:option(Flag, option_name("mux"), translate("Mux"))
|
||||
|
@ -10,12 +10,12 @@ function gen_config_server(node)
|
||||
cert = node.tls_certificateFile,
|
||||
key = node.tls_keyFile,
|
||||
},
|
||||
obfs = {
|
||||
obfs = (node.hysteria2_obfs) and {
|
||||
type = "salamander",
|
||||
salamander = {
|
||||
password = node.hysteria2_obfs
|
||||
}
|
||||
},
|
||||
} or nil,
|
||||
auth = {
|
||||
type = "password",
|
||||
password = node.hysteria2_auth_password
|
||||
@ -25,7 +25,7 @@ function gen_config_server(node)
|
||||
down = node.hysteria2_down_mbps and node.hysteria2_down_mbps .. " mbps" or "1 gbps",
|
||||
},
|
||||
ignoreClientBandwidth = (node.hysteria2_ignoreClientBandwidth == "1") and true or false,
|
||||
disable_udp = (node.hysteria2_udp == "0") and true or false,
|
||||
disableUDP = (node.hysteria2_udp == "0") and true or false,
|
||||
}
|
||||
return config
|
||||
end
|
||||
@ -65,12 +65,12 @@ function gen_config(var)
|
||||
hopInterval = node.hysteria2_hop_interval and node.hysteria2_hop_interval .. "s" or "30s"
|
||||
}
|
||||
},
|
||||
obfs = {
|
||||
obfs = (node.hysteria2_obfs) and {
|
||||
type = "salamander",
|
||||
salamander = {
|
||||
password = node.hysteria2_obfs
|
||||
}
|
||||
},
|
||||
} or nil,
|
||||
auth = node.hysteria2_auth_password,
|
||||
tls = {
|
||||
sni = node.tls_serverName,
|
||||
@ -92,13 +92,12 @@ function gen_config(var)
|
||||
listen = local_socks_address .. ":" .. local_socks_port,
|
||||
username = (local_socks_username and local_socks_password) and local_socks_username or nil,
|
||||
password = (local_socks_username and local_socks_password) and local_socks_password or nil,
|
||||
disable_udp = false,
|
||||
disableUDP = false,
|
||||
} or nil,
|
||||
http = (local_http_address and local_http_port) and {
|
||||
listen = local_http_address .. ":" .. local_http_port,
|
||||
username = (local_http_username and local_http_password) and local_http_username or nil,
|
||||
password = (local_http_username and local_http_password) and local_http_password or nil,
|
||||
disable_udp = false,
|
||||
} or nil
|
||||
}
|
||||
|
||||
|
@ -398,7 +398,7 @@ function gen_config_server(node)
|
||||
if node.transport == "grpc" then
|
||||
v2ray_transport = {
|
||||
type = "grpc",
|
||||
serviceName = node.grpc_serviceName,
|
||||
service_name = node.grpc_serviceName,
|
||||
}
|
||||
end
|
||||
|
||||
|
@ -32,10 +32,10 @@ local api = require "luci.passwall2.api"
|
||||
<div id="faq_dns">
|
||||
<ul>
|
||||
<b class="faq-title"><%:DNS related issues:%></b>
|
||||
<li class="dns-item">1. <span><%:Certain browsers such as Chrome have built-in DNS service, which may affect DNS resolution settings. You can go to "Settings -> Privacy and security -> Use secure DNS" menu to turn it off.%></span></li>
|
||||
<li class="dns-item">1. <span><%:Certain browsers such as Chrome have built-in DNS service, which may affect DNS resolution settings. You can go to 'Settings -> Privacy and security -> Use secure DNS' menu to turn it off.%></span></li>
|
||||
<li class="dns-item">2. <span><%:If you are unable to access the internet after reboot, please try clearing the cache of your terminal devices (make sure to close all open browser application windows first, this step is especially important):%></span>
|
||||
<ul><li class="dns-list"> ◦ <span><%:For Windows systems, open Command Prompt and run the command "ipconfig /flushdns".%></span></li>
|
||||
<li class="dns-list"> ◦ <span><%:For Mac systems, open Terminal and run the command "sudo killall -HUP mDNSResponder".%></span></li>
|
||||
<ul><li class="dns-list"> ◦ <span><%:For Windows systems, open Command Prompt and run the command 'ipconfig /flushdns'.%></span></li>
|
||||
<li class="dns-list"> ◦ <span><%:For Mac systems, open Terminal and run the command 'sudo killall -HUP mDNSResponder'.%></span></li>
|
||||
<li class="dns-list"> ◦ <span><%:For mobile devices, you can clear it by reconnecting to the network, such as toggling Airplane Mode and reconnecting to WiFi.%></span></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
@ -190,17 +190,17 @@ msgstr "你确定要隐藏吗?"
|
||||
msgid "DNS related issues:"
|
||||
msgstr "DNS相关问题:"
|
||||
|
||||
msgid "Certain browsers such as Chrome have built-in DNS service, which may affect DNS resolution settings. You can go to "Settings -> Privacy and security -> Use secure DNS" menu to turn it off."
|
||||
msgstr "某些浏览器如Chrome等内置此功能,这会影响设置的DNS解析。您可以进入"设置->私隐和安全->使用安全DNS"菜单,将其关闭。"
|
||||
msgid "Certain browsers such as Chrome have built-in DNS service, which may affect DNS resolution settings. You can go to 'Settings -> Privacy and security -> Use secure DNS' menu to turn it off."
|
||||
msgstr "某些浏览器如Chrome等内置此功能,这会影响设置的DNS解析。您可以进入 '设置->私隐和安全->使用安全DNS' 菜单,将其关闭。"
|
||||
|
||||
msgid "If you are unable to access the internet after reboot, please try clearing the cache of your terminal devices (make sure to close all open browser application windows first, this step is especially important):"
|
||||
msgstr "如果在重启后无法上网,请尝试清除终端设备的缓存(先关闭所有正在使用的浏览器应用程序,这一步尤其重要):"
|
||||
|
||||
msgid "For Windows systems, open Command Prompt and run the command "ipconfig /flushdns"."
|
||||
msgstr "对于Windows系统,请在命令提示符中运行命令"ipconfig /flushdns"."
|
||||
msgid "For Windows systems, open Command Prompt and run the command 'ipconfig /flushdns'."
|
||||
msgstr "对于Windows系统,请在命令提示符中运行命令 'ipconfig /flushdns'."
|
||||
|
||||
msgid "For Mac systems, open Terminal and run the command "sudo killall -HUP mDNSResponder"."
|
||||
msgstr "对于Mac系统,在终端中运行命令"sudo killall -HUP mDNSResponder"."
|
||||
msgid "For Mac systems, open Terminal and run the command 'sudo killall -HUP mDNSResponder'."
|
||||
msgstr "对于Mac系统,在终端中运行命令 'sudo killall -HUP mDNSResponder'."
|
||||
|
||||
msgid "For mobile devices, you can clear it by reconnecting to the network, such as toggling Airplane Mode and reconnecting to WiFi."
|
||||
msgstr "对于移动设备,可通过重新接入网络的方式清除。比如开关一次飞行模式,重新连接WiFi。"
|
||||
|
@ -1129,25 +1129,25 @@ start() {
|
||||
local use_nft=$(config_t_get global_forwarding use_nft 0)
|
||||
local USE_TABLES
|
||||
if [ "$use_nft" == 0 ]; then
|
||||
if [ -z "$(command -v iptables-legacy || command -v iptables)" ] || [ -z "$(command -v ipset)" ] || [ -z "$(dnsmasq --version | grep 'Compile time options:.* ipset')" ]; then
|
||||
if [ -n "$(command -v nft)" ] && [ -n "$(dnsmasq --version | grep 'Compile time options:.* nftset')" ]; then
|
||||
if [ -n "$(command -v iptables-legacy || command -v iptables)" ] && [ -n "$(command -v ipset)" ] && [ -n "$(dnsmasq --version | grep 'Compile time options:.* ipset')" ]; then
|
||||
USE_TABLES="iptables"
|
||||
else
|
||||
if [ -n "$(command -v fw4)" ] && [ -n "$(command -v nft)" ] && [ -n "$(dnsmasq --version | grep 'Compile time options:.* nftset')" ]; then
|
||||
echolog "检测到fw4,使用nftables进行透明代理。"
|
||||
USE_TABLES="nftables"
|
||||
nftflag=1
|
||||
config_t_set global_forwarding use_nft 1
|
||||
uci commit
|
||||
uci commit ${CONFIG}
|
||||
else
|
||||
echolog "系统未安装iptables或ipset或Dnsmasq没有开启ipset支持,无法透明代理!"
|
||||
fi
|
||||
else
|
||||
USE_TABLES="iptables"
|
||||
fi
|
||||
else
|
||||
if [ -z "$(dnsmasq --version | grep 'Compile time options:.* nftset')" ]; then
|
||||
echolog "Dnsmasq软件包不满足nftables透明代理要求,如需使用请确保dnsmasq版本在2.87以上并开启nftset支持。"
|
||||
elif [ -n "$(dnsmasq --version | grep 'Compile time options:.* nftset')" ]; then
|
||||
if [ -n "$(dnsmasq --version | grep 'Compile time options:.* nftset')" ]; then
|
||||
USE_TABLES="nftables"
|
||||
nftflag=1
|
||||
else
|
||||
echolog "Dnsmasq软件包不满足nftables透明代理要求,如需使用请确保dnsmasq版本在2.87以上并开启nftset支持。"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user