update 2024-02-01 23:35:00
This commit is contained in:
parent
ac8c4d22dd
commit
ffcc115a64
|
@ -6,7 +6,7 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-passwall
|
||||
PKG_VERSION:=4.73-1
|
||||
PKG_VERSION:=4.73-3
|
||||
PKG_RELEASE:=
|
||||
|
||||
PKG_CONFIG_DEPENDS:= \
|
||||
|
|
|
@ -237,10 +237,8 @@ o:depends({ [option_name("protocol")] = "shadowsocks", [option_name("x_ss_encryp
|
|||
o:depends({ [option_name("protocol")] = "shadowsocks", [option_name("x_ss_encrypt_method")] = "chacha20-poly1305" })
|
||||
o:depends({ [option_name("protocol")] = "shadowsocks", [option_name("x_ss_encrypt_method")] = "xchacha20-poly1305" })
|
||||
|
||||
o = s:option(Flag, option_name("uot"), translate("UDP over TCP"), translate("Need Xray-core or sing-box as server side."))
|
||||
o:depends({ [option_name("protocol")] = "shadowsocks", [option_name("x_ss_encrypt_method")] = "2022-blake3-aes-128-gcm" })
|
||||
o:depends({ [option_name("protocol")] = "shadowsocks", [option_name("x_ss_encrypt_method")] = "2022-blake3-aes-256-gcm" })
|
||||
o:depends({ [option_name("protocol")] = "shadowsocks", [option_name("x_ss_encrypt_method")] = "2022-blake3-chacha20-poly1305" })
|
||||
o = s:option(Flag, option_name("uot"), translate("UDP over TCP"))
|
||||
o:depends({ [option_name("protocol")] = "shadowsocks" })
|
||||
|
||||
o = s:option(Value, option_name("uuid"), translate("ID"))
|
||||
o.password = true
|
||||
|
|
|
@ -231,10 +231,9 @@ if singbox_tags:find("with_shadowsocksr") then
|
|||
o:depends({ [option_name("protocol")] = "shadowsocksr" })
|
||||
end
|
||||
|
||||
o = s:option(Flag, option_name("uot"), translate("UDP over TCP"), translate("Need Xray-core or sing-box as server side."))
|
||||
o:depends({ [option_name("protocol")] = "shadowsocks", [option_name("ss_method")] = "2022-blake3-aes-128-gcm" })
|
||||
o:depends({ [option_name("protocol")] = "shadowsocks", [option_name("ss_method")] = "2022-blake3-aes-256-gcm" })
|
||||
o:depends({ [option_name("protocol")] = "shadowsocks", [option_name("ss_method")] = "2022-blake3-chacha20-poly1305" })
|
||||
o = s:option(Flag, option_name("uot"), translate("UDP over TCP"))
|
||||
o:depends({ [option_name("protocol")] = "socks" })
|
||||
o:depends({ [option_name("protocol")] = "shadowsocks" })
|
||||
|
||||
o = s:option(Value, option_name("uuid"), translate("ID"))
|
||||
o.password = true
|
||||
|
|
|
@ -183,7 +183,10 @@ function gen_outbound(flag, node, tag, proxy_table)
|
|||
version = "5",
|
||||
username = (node.username and node.password) and node.username or nil,
|
||||
password = (node.username and node.password) and node.password or nil,
|
||||
udp_over_tcp = false,
|
||||
udp_over_tcp = node.uot == "1" and {
|
||||
enabled = true,
|
||||
version = 2
|
||||
} or nil,
|
||||
}
|
||||
end
|
||||
|
||||
|
@ -734,6 +737,8 @@ function gen_config(var)
|
|||
local loglevel = var["-loglevel"] or "warn"
|
||||
local logfile = var["-logfile"] or "/dev/null"
|
||||
local node_id = var["-node"]
|
||||
local server_host = var["-server_host"]
|
||||
local server_port = var["-server_port"]
|
||||
local tcp_proxy_way = var["-tcp_proxy_way"]
|
||||
local tcp_redir_port = var["-tcp_redir_port"]
|
||||
local udp_redir_port = var["-udp_redir_port"]
|
||||
|
@ -787,6 +792,12 @@ function gen_config(var)
|
|||
local default_outTag = nil
|
||||
if node_id then
|
||||
local node = uci:get_all(appname, node_id)
|
||||
if node then
|
||||
if server_host and server_port then
|
||||
node.address = server_host
|
||||
node.port = server_port
|
||||
end
|
||||
end
|
||||
|
||||
if local_socks_port then
|
||||
local inbound = {
|
||||
|
@ -880,6 +891,7 @@ function gen_config(var)
|
|||
password = parsed1.password,
|
||||
address = parsed1.host,
|
||||
port = parsed1.port,
|
||||
uot = "1",
|
||||
}
|
||||
local preproxy_outbound = gen_outbound(flag, _node, preproxy_tag)
|
||||
if preproxy_outbound then
|
||||
|
@ -936,6 +948,7 @@ function gen_config(var)
|
|||
password = parsed1.password,
|
||||
address = parsed1.host,
|
||||
port = parsed1.port,
|
||||
uot = "1",
|
||||
}
|
||||
local _outbound = gen_outbound(flag, _node, rule_name)
|
||||
if _outbound then
|
||||
|
@ -964,10 +977,6 @@ function gen_config(var)
|
|||
local pre_proxy = nil
|
||||
if _node.type ~= "sing-box" then
|
||||
pre_proxy = true
|
||||
else
|
||||
if _node.flow == "xtls-rprx-vision" then
|
||||
pre_proxy = true
|
||||
end
|
||||
end
|
||||
if pre_proxy then
|
||||
new_port = get_new_port()
|
||||
|
|
|
@ -510,6 +510,8 @@ end
|
|||
function gen_config(var)
|
||||
local flag = var["-flag"]
|
||||
local node_id = var["-node"]
|
||||
local server_host = var["-server_host"]
|
||||
local server_port = var["-server_port"]
|
||||
local tcp_proxy_way = var["-tcp_proxy_way"] or "redirect"
|
||||
local tcp_redir_port = var["-tcp_redir_port"]
|
||||
local udp_redir_port = var["-udp_redir_port"]
|
||||
|
@ -545,6 +547,12 @@ function gen_config(var)
|
|||
|
||||
if node_id then
|
||||
local node = uci:get_all(appname, node_id)
|
||||
if node then
|
||||
if server_host and server_port then
|
||||
node.address = server_host
|
||||
node.port = server_port
|
||||
end
|
||||
end
|
||||
if local_socks_port then
|
||||
local inbound = {
|
||||
tag = "socks-in",
|
||||
|
|
|
@ -415,25 +415,38 @@ local api = require "luci.passwall.api"
|
|||
url += url_protocol;
|
||||
url += params;
|
||||
} else if ((v_type === "Hysteria2") || (v_type === "sing-box" && opt.get(dom_prefix + "protocol").value === "hysteria2")) {
|
||||
protocol = "hysteria2"
|
||||
var v_port = opt.get(dom_prefix + "port");
|
||||
var params = "";
|
||||
params += opt.query("sni", dom_prefix + "tls_serverName");
|
||||
params += opt.query("insecure", dom_prefix + "tls_allowInsecure");
|
||||
|
||||
params += opt.query("obfs", "salamander");
|
||||
var v_password = null;
|
||||
|
||||
if (v_type === "Hysteria2") {
|
||||
params += opt.query("obfs-password", "hysteria2_obfs");
|
||||
params += opt.query("auth", "hysteria2_auth_password");
|
||||
v_password = opt.get("hysteria2_auth_password");
|
||||
params += opt.query("pinSHA256", "hysteria2_tls_pinSHA256");
|
||||
var dom_obfs = opt.get("hysteria2_obfs");
|
||||
if (dom_obfs && dom_obfs.value != "") {
|
||||
params += "&obfs=" + "salamander";
|
||||
params += opt.query("obfs-password", "hysteria2_obfs");
|
||||
}
|
||||
} else {
|
||||
params += opt.query("obfs-password", dom_prefix + "hysteria2_obfs_password");
|
||||
params += opt.query("auth", dom_prefix + "hysteria2_auth_password");
|
||||
v_password = opt.get(dom_prefix + "hysteria2_auth_password");
|
||||
var dom_obfs_type = opt.get(dom_prefix + "hysteria2_obfs_type");
|
||||
if (dom_obfs_type && dom_obfs_type.value != "") {
|
||||
params += opt.query("obfs", dom_prefix + "hysteria2_obfs_type");
|
||||
params += opt.query("obfs-password", dom_prefix + "hysteria2_obfs_password");
|
||||
}
|
||||
}
|
||||
var url =
|
||||
url =
|
||||
_address + ":" +
|
||||
v_port.value + "?" +
|
||||
params +
|
||||
"#" + encodeURI(v_alias.value);
|
||||
if (v_password) {
|
||||
url = encodeURIComponent(v_password.value) + "@" + url
|
||||
}
|
||||
}
|
||||
if (url) {
|
||||
url = protocol.toLowerCase() + "://" + url;
|
||||
|
|
|
@ -1078,9 +1078,6 @@ msgstr "IV 检查"
|
|||
msgid "UDP over TCP"
|
||||
msgstr "TCP 封装 UDP"
|
||||
|
||||
msgid "Need Xray-core or sing-box as server side."
|
||||
msgstr "需要 Xray-core 或者 sing-box 作为服务器端。"
|
||||
|
||||
msgid "Connection Timeout"
|
||||
msgstr "连接超时时间"
|
||||
|
||||
|
|
|
@ -594,6 +594,7 @@ run_socks() {
|
|||
config_file=$(echo $config_file | sed "s/SOCKS/HTTP_SOCKS/g")
|
||||
local _args="http_port=$http_port"
|
||||
}
|
||||
[ -n "$relay_port" ] && _args="${_args} -server_host $server_host -server_port $port"
|
||||
run_singbox flag=$flag node=$node socks_port=$socks_port config_file=$config_file log_file=$log_file ${_args}
|
||||
;;
|
||||
xray)
|
||||
|
@ -602,6 +603,7 @@ run_socks() {
|
|||
config_file=$(echo $config_file | sed "s/SOCKS/HTTP_SOCKS/g")
|
||||
local _args="http_port=$http_port"
|
||||
}
|
||||
[ -n "$relay_port" ] && _args="${_args} -server_host $server_host -server_port $port"
|
||||
run_xray flag=$flag node=$node socks_port=$socks_port config_file=$config_file log_file=$log_file ${_args}
|
||||
;;
|
||||
trojan-go)
|
||||
|
|
|
@ -398,7 +398,12 @@ local function processData(szType, content, add_mode, add_from)
|
|||
result.remarks = info.ps
|
||||
-- result.mux = 1
|
||||
-- result.mux_concurrency = 8
|
||||
|
||||
if not info.net then
|
||||
info.net = "tcp"
|
||||
end
|
||||
info.net = string.lower(info.net)
|
||||
result.transport = info.net
|
||||
if info.net == 'ws' then
|
||||
result.ws_host = info.host
|
||||
result.ws_path = info.path
|
||||
|
@ -434,7 +439,6 @@ local function processData(szType, content, add_mode, add_from)
|
|||
if info.net == 'grpc' then
|
||||
result.grpc_serviceName = info.path
|
||||
end
|
||||
result.transport = info.net
|
||||
if not info.security then result.security = "auto" end
|
||||
if info.tls == "tls" or info.tls == "1" then
|
||||
result.tls = "1"
|
||||
|
@ -757,7 +761,11 @@ local function processData(szType, content, add_mode, add_from)
|
|||
result.address = host_port
|
||||
end
|
||||
|
||||
if not params.type then
|
||||
params.type = "tcp"
|
||||
end
|
||||
params.type = string.lower(params.type)
|
||||
result.transport = params.type
|
||||
if params.type == 'ws' then
|
||||
result.ws_host = params.host
|
||||
result.ws_path = params.path
|
||||
|
@ -793,7 +801,6 @@ local function processData(szType, content, add_mode, add_from)
|
|||
if params.serviceName then result.grpc_serviceName = params.serviceName end
|
||||
result.grpc_mode = params.mode
|
||||
end
|
||||
result.transport = params.type
|
||||
|
||||
result.encryption = params.encryption or "none"
|
||||
|
||||
|
|
|
@ -611,4 +611,18 @@ if singbox_tags:find("with_utls") then
|
|||
o:depends({ [option_name("shadowtls")] = true, [option_name("shadowtls_utls")] = true })
|
||||
end
|
||||
|
||||
-- [[ SIP003 plugin ]]--
|
||||
o = s:option(Flag, option_name("plugin_enabled"), translate("plugin"))
|
||||
o.default = 0
|
||||
o:depends({ [option_name("protocol")] = "shadowsocks" })
|
||||
|
||||
o = s:option(ListValue, option_name("plugin"), "SIP003 " .. translate("plugin"))
|
||||
o.default = "obfs-local"
|
||||
o:depends({ [option_name("plugin_enabled")] = true })
|
||||
o:value("obfs-local")
|
||||
o:value("v2ray-plugin")
|
||||
|
||||
o = s:option(Value, option_name("plugin_opts"), translate("opts"))
|
||||
o:depends({ [option_name("plugin_enabled")] = true })
|
||||
|
||||
api.luci_types(arg[1], m, s, type_name, option_prefix)
|
||||
|
|
|
@ -205,8 +205,8 @@ function gen_outbound(flag, node, tag, proxy_table)
|
|||
protocol_table = {
|
||||
method = node.method or nil,
|
||||
password = node.password or "",
|
||||
plugin = node.plugin and nil,
|
||||
plugin_opts = node.plugin_opts and nil,
|
||||
plugin = (node.plugin_enabled and node.plugin) or nil,
|
||||
plugin_opts = (node.plugin_enabled and node.plugin_opts) or nil,
|
||||
udp_over_tcp = node.uot == "1" and {
|
||||
enabled = true,
|
||||
version = 2
|
||||
|
|
Loading…
Reference in New Issue